The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta_target::SpartaTLMTargetGasket Class Reference
Inheritance diagram for sparta_target::SpartaTLMTargetGasket:
Collaboration diagram for sparta_target::SpartaTLMTargetGasket:

Classes

class  SpartaTLMTargetGasketParams
 

Public Member Functions

 SC_HAS_PROCESS (SpartaTLMTargetGasket)
 Construction of the Sparta TLM gasket.
 
 SpartaTLMTargetGasket (sparta::TreeNode *node, const SpartaTLMTargetGasketParams *params, sc_core::sc_module_name module_name=scName[nextID])
 
void setTreeNode (sparta::TreeNode *treeNodePtr)
 
tlm::tlm_target_socket & getMemorySocket ()
 
- Public Member Functions inherited from sparta::Unit
 Unit (TreeNode *rc, const std::string &name)
 Construct unit with a ResouceContainer.
 
 Unit (TreeNode *rc)
 Construct unit with a ResouceContainer.
 
virtual ~Unit ()
 Destroy!
 
void setAutoPrecedence (bool auto_p)
 Turn off auto-precedence.
 
PortSetgetPortSet ()
 Return the port set.
 
EventSetgetEventSet ()
 Return the event set.
 
StatisticSetgetStatisticSet ()
 Return the stat set.
 
- Public Member Functions inherited from sparta::Resource
 Resource (TreeNode *rc)
 Construct resource with a resource container.
 
 Resource (TreeNode *rc, const std::string &name)
 Construct resource with a specific name and resource container.
 
 Resource (const std::string &name, const Clock *clk)
 Construct a Resource with the given name and clock having NO association with a resource container. This constructor is reserved for free-standing resources owned by other resources (not containers [TreeNodes])
 
virtual ~Resource ()
 Destroy!
 
const ClockgetClock () const
 
SchedulergetScheduler (const bool must_exist=true) const
 
std::string getName () const
 
TreeNodegetContainer ()
 Gets the TreeNode (container) for this resource (if any)
 
const TreeNodegetContainer () const
 Gets the TreeNode (container) for this resource (if any)
 
ResourceContainergetResourceContainer ()
 Gets the ResourceContainer for this resource (if any)
 
const ResourceContainergetResourceContainer () const
 Gets the ResourceContainer for this resource (if any)
 
virtual void addLink (TreeNode *node, const std::string &label)
 
virtual void activateLink (const std::string &label)
 
 Resource (const Resource &)=delete
 Disallow copying.
 
Resourceoperator= (const Resource &)=delete
 

Static Public Attributes

static constexpr char name [] = "mem_tlm_gasket"
 
static constexpr char scName [2][20] = {"mem_tlm_gasket0", "mem_tlm_gasket1"}
 
- Static Public Attributes inherited from sparta::Unit
static constexpr const char * INFO_LOG = "info"
 
static constexpr const char * WARN_LOG = log::categories::WARN_STR
 
static constexpr const char * DEBUG_LOG = log::categories::DEBUG_STR
 

Static Protected Attributes

static int nextID = 0
 

Additional Inherited Members

- Protected Member Functions inherited from sparta::Unit
virtual void onBindTreeEarly_ () override
 
virtual void onBindTreeLate_ () override
 Dump a dot.
 
- Protected Attributes inherited from sparta::Unit
sparta::PortSet unit_port_set_
 The Unit's Ports.
 
sparta::EventSet unit_event_set_
 The Unit's event set.
 
sparta::StatisticSet unit_stat_set_
 The Unit's statistic set.
 
log::MessageSource info_logger_
 Default info logger.
 
log::MessageSource warn_logger_
 Default warn logger.
 
log::MessageSource debug_logger_
 Default debug logger.
 

Detailed Description

Definition at line 18 of file SpartaTLMTargetGasket.hpp.

Constructor & Destructor Documentation

◆ SpartaTLMTargetGasket()

sparta_target::SpartaTLMTargetGasket::SpartaTLMTargetGasket ( sparta::TreeNode * node,
const SpartaTLMTargetGasketParams * params,
sc_core::sc_module_name module_name = scName[nextID] )
inline

Definition at line 62 of file SpartaTLMTargetGasket.hpp.

Member Function Documentation

◆ getMemorySocket()

tlm::tlm_target_socket & sparta_target::SpartaTLMTargetGasket::getMemorySocket ( )
inline

Definition at line 94 of file SpartaTLMTargetGasket.hpp.

◆ SC_HAS_PROCESS()

sparta_target::SpartaTLMTargetGasket::SC_HAS_PROCESS ( SpartaTLMTargetGasket )

Construction of the Sparta TLM gasket.

Parameters
nodeThe Sparta tree node
paramsThe Gasket parameters
module_nameThe module name – must be a variable that lives through construction.

Explanation of the third parameter "module_name":

SystemC uses a global stack to determine the latest module (based on its name) being constructed for the tlm_fw_transport_if. If this variable is a temporary, it will destruct BEFORE initializing the tlm_fw_transport_if and nullify the "current module being constructed."

You'll get this cryptic message:

"Error: (E122) sc_export specified outside of module: export 'tlm_base_target_socket_0' (sc_object)

To get around this nonsense, the module name (as a sc_core::sc_module_name) must live throughout the construction of the module.

Member Data Documentation

◆ name

char sparta_target::SpartaTLMTargetGasket::name[] = "mem_tlm_gasket"
staticconstexpr

Definition at line 26 of file SpartaTLMTargetGasket.hpp.

◆ nextID

int sparta_target::SpartaTLMTargetGasket::nextID = 0
staticprotected

Definition at line 23 of file SpartaTLMTargetGasket.hpp.

◆ scName

char sparta_target::SpartaTLMTargetGasket::scName[2][20] = {"mem_tlm_gasket0", "mem_tlm_gasket1"}
staticconstexpr

Definition at line 27 of file SpartaTLMTargetGasket.hpp.


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