quic/qbox
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
gs::ModuleFactory::ContainerBase Class Reference
Inheritance diagram for gs::ModuleFactory::ContainerBase:
Inheritance graph
[legend]
Collaboration diagram for gs::ModuleFactory::ContainerBase:
Collaboration graph
[legend]

Public Types

using tlm_initiator_socket_type = tlm_utils::simple_initiator_socket_b< ContainerBase, DEFAULT_TLM_BUSWIDTH, tlm::tlm_base_protocol_types, sc_core::SC_ZERO_OR_MORE_BOUND >
 
using tlm_target_socket_type = tlm_utils::simple_target_socket_tagged_b< ContainerBase, DEFAULT_TLM_BUSWIDTH, tlm::tlm_base_protocol_types, sc_core::SC_ZERO_OR_MORE_BOUND >
 

Public Member Functions

 SCP_LOGGER (())
 construct a module using the pre-register CCI functor, with typed arguments from a CCI value list. The functor is expected to call new.
 
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_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)
 
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_tp_tlm_initiator_ports_num
 
cci::cci_param< uint32_tp_tlm_target_ports_num
 
cci::cci_param< uint32_tp_initiator_signals_num
 
cci::cci_param< uint32_tp_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< boolcontainer_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
 

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

◆ 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.

◆ SCP_LOGGER()

gs::ModuleFactory::ContainerBase::SCP_LOGGER ( ()  )

construct a module using the pre-register CCI functor, with typed arguments from a CCI value list. The functor is expected to call new.

Parameters
moduletypeThe name of the type of module to be constructed
nameThe name to be given to this instance of the module
argsThe CCI list of arguments passed to the constructor (which will be type punned)
Returns
sc_core::sc_module* The module constructed.

◆ 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: