qualcomm/qbox
Loading...
Searching...
No Matches
gs::ModuleFactory::ContainerBase Class Reference
Inheritance diagram for gs::ModuleFactory::ContainerBase:
Collaboration diagram for gs::ModuleFactory::ContainerBase:

Public Types

using tlm_initiator_socket_type
using tlm_target_socket_type

Public Member Functions

 SCP_LOGGER (())
sc_core::sc_module * construct_module (std::string moduletype, sc_core::sc_module_name name, cci::cci_value_list args)
sc_core::sc_module * construct_module (std::string moduletype, sc_core::sc_module_name name)
 Helper to construct a module that takes no arguments.
std::string get_parent_name (const std::string &module_name)
bool is_absolute_path (const std::string &name)
 Check if a name refers to an absolute path (outside this container).
bool is_container_arg_mod_name (const std::string &name)
cci::cci_value_list get_module_args (std::string modulename)
 Get the module args helper to find argument list for a module constructor.
template<typename I, typename T>
bool try_bind (sc_core::sc_object *i_obj, sc_core::sc_object *t_obj)
void name_bind (sc_core::sc_module *m)
 Bind all known port types.
template<unsigned int BIND_BUSWIDTH>
bool try_bind_all (sc_core::sc_object *i_obj, sc_core::sc_object *t_obj)
bool is_container_type (const std::string &name)
 Check if a module is a container type.
void get_nested_dependencies (const std::string &container_name, std::set< std::string > &dependencies)
 Get all EXTERNAL nested dependencies from a container's children (excludes dependencies that are internal to the container being checked) Uses CCI configuration parameters to find child modules, then get_module_args for path resolution Also checks config tables for container_builder types.
bool are_dependencies_available (const std::string &name, const std::set< std::string > &done)
std::set< std::string > get_bind_references_to_module (const std::string &module_name, const std::string &target_module_name, const std::list< std::string > &all_modules)
int get_construction_priority (const std::string &name)
std::list< std::string > PriorityConstruct (void)
void register_module_from_dylib (sc_core::sc_module_name name)
void ModulesConstruct (void)
std::shared_ptr< sc_core::sc_module > find_module_by_name (const std::string &mod_name)
template<typename T>
std::shared_ptr< sc_core::sc_module > find_module_by_cci_param (const std::string &cci_param_name, const T &cmp_value)
 ContainerBase (const sc_core::sc_module_name _n, bool defer_modules_construct, sc_core::sc_object *p_container_mod_arg=nullptr)
 construct a Container, and all modules within it, and perform binding
void fw_b_transport (int id, tlm::tlm_generic_payload &trans, sc_core::sc_time &delay) override
unsigned int fw_transport_dbg (int id, tlm::tlm_generic_payload &trans) override
bool fw_get_direct_mem_ptr (int id, tlm::tlm_generic_payload &trans, tlm::tlm_dmi &dmi_data) override
void fw_invalidate_direct_mem_ptr (sc_dt::uint64 start, sc_dt::uint64 end) override
void fw_handle_signal (int id, bool value) override

Public Attributes

cci::cci_broker_handle m_broker
cci::cci_param< std::string > moduletype
cci::cci_param< uint32_t > p_tlm_initiator_ports_num
cci::cci_param< uint32_t > p_tlm_target_ports_num
cci::cci_param< uint32_t > p_initiator_signals_num
cci::cci_param< uint32_t > p_target_signals_num
sc_core::sc_vector< tlm_initiator_socket_type > initiator_sockets
sc_core::sc_vector< tlm_target_socket_type > target_sockets
sc_core::sc_vector< InitiatorSignalSocket< bool > > initiator_signal_sockets
sc_core::sc_vector< TargetSignalSocket< bool > > target_signal_sockets
TargetSignalSocket< bool > container_self_reset
transaction_forwarder_if< PASS > * m_local_pass
std::vector< cci::cci_param< gs::cci_constructor_vl > * > registered_mods
sc_core::sc_object * container_mod_arg

Member Typedef Documentation

◆ tlm_initiator_socket_type

using gs::ModuleFactory::ContainerBase::tlm_initiator_socket_type
Initial value:
tlm_utils::simple_initiator_socket_b<
ContainerBase, DEFAULT_TLM_BUSWIDTH, tlm::tlm_base_protocol_types, sc_core::SC_ZERO_OR_MORE_BOUND>
ContainerBase(const sc_core::sc_module_name _n, bool defer_modules_construct, sc_core::sc_object *p_container_mod_arg=nullptr)
construct a Container, and all modules within it, and perform binding
Definition module_factory_container.h:1126

◆ tlm_target_socket_type

using gs::ModuleFactory::ContainerBase::tlm_target_socket_type
Initial value:
tlm_utils::simple_target_socket_tagged_b<
ContainerBase, DEFAULT_TLM_BUSWIDTH, tlm::tlm_base_protocol_types, sc_core::SC_ZERO_OR_MORE_BOUND>

Constructor & Destructor Documentation

◆ ContainerBase()

gs::ModuleFactory::ContainerBase::ContainerBase ( const sc_core::sc_module_name _n,
bool defer_modules_construct,
sc_core::sc_object * p_container_mod_arg = nullptr )
inline

construct a Container, and all modules within it, and perform binding

Parameters
_nname to give the container

Member Function Documentation

◆ construct_module()

sc_core::sc_module * gs::ModuleFactory::ContainerBase::construct_module ( std::string moduletype,
sc_core::sc_module_name name,
cci::cci_value_list args )
inline

(m_fac)(name, args) will return raw pointer of unmanaged dynamically allocated moduletype: new moduletype(name, args)

◆ fw_b_transport()

void gs::ModuleFactory::ContainerBase::fw_b_transport ( int id,
tlm::tlm_generic_payload & trans,
sc_core::sc_time & delay )
inlineoverridevirtual

◆ fw_get_direct_mem_ptr()

bool gs::ModuleFactory::ContainerBase::fw_get_direct_mem_ptr ( int id,
tlm::tlm_generic_payload & trans,
tlm::tlm_dmi & dmi_data )
inlineoverridevirtual

◆ fw_handle_signal()

void gs::ModuleFactory::ContainerBase::fw_handle_signal ( int id,
bool value )
inlineoverridevirtual

◆ fw_invalidate_direct_mem_ptr()

void gs::ModuleFactory::ContainerBase::fw_invalidate_direct_mem_ptr ( sc_dt::uint64 start,
sc_dt::uint64 end )
inlineoverridevirtual

◆ fw_transport_dbg()

unsigned int gs::ModuleFactory::ContainerBase::fw_transport_dbg ( int id,
tlm::tlm_generic_payload & trans )
inlineoverridevirtual

◆ get_module_args()

cci::cci_value_list gs::ModuleFactory::ContainerBase::get_module_args ( std::string modulename)
inline

Get the module args helper to find argument list for a module constructor.

Parameters
modulenamename of the module from which to get the .arg[...] list
Returns
cci::cci_value_list

◆ get_nested_dependencies()

void gs::ModuleFactory::ContainerBase::get_nested_dependencies ( const std::string & container_name,
std::set< std::string > & dependencies )
inline

Get all EXTERNAL nested dependencies from a container's children (excludes dependencies that are internal to the container being checked) Uses CCI configuration parameters to find child modules, then get_module_args for path resolution Also checks config tables for container_builder types.

Parameters
container_nameContainer name (without parent prefix)
dependenciesSet to populate with dependency paths

◆ is_absolute_path()

bool gs::ModuleFactory::ContainerBase::is_absolute_path ( const std::string & name)
inline

Check if a name refers to an absolute path (outside this container).

Parameters
nameThe name to check (without leading '&')
Returns
true if the path is absolute (not local to this container)

◆ is_container_type()

bool gs::ModuleFactory::ContainerBase::is_container_type ( const std::string & name)
inline

Check if a module is a container type.

Parameters
nameModule name (without parent container prefix)
Returns
true if the module is a container type

◆ name_bind()

void gs::ModuleFactory::ContainerBase::name_bind ( sc_core::sc_module * m)
inline

Bind all known port types.

Parameters
modulenameThe LOCAL name of the module to bind it's ports
typeThe type of the module
mThe module itself.

◆ try_bind_all()

template<unsigned int BIND_BUSWIDTH>
bool gs::ModuleFactory::ContainerBase::try_bind_all ( sc_core::sc_object * i_obj,
sc_core::sc_object * t_obj )
inline

FIXME: There should be a better way of doing that.Trying to bind every possible combination of socket types is not scalable nor readable solution.


The documentation for this class was generated from the following file: