scc  2022.4.0
SystemC components library
scc::tlm_target_bfs_register_base< derived_t, use_URID > Class Template Reference

#include <tlm_target_bfs_register_base.h>

Inheritance diagram for scc::tlm_target_bfs_register_base< derived_t, use_URID >:
Collaboration diagram for scc::tlm_target_bfs_register_base< derived_t, use_URID >:

Public Member Functions

 tlm_target_bfs_register_base (sc_core::sc_module_name name)
 
template<unsigned buswidth>
void registerResources (scc::tlm_target< buswidth > &target)
 
bitfield_register< uint32_t > & getRegister (const std::string &name)
 Search for a register by name. More...
 
bitfield< uint32_t > & getBitfieldByName (const std::string &regname, const std::string &name)
 Search for a bitfield by name and register name. More...
 
bitfield< uint32_t > & getBitfieldById (const std::string &urid)
 Search for a bitfield by urid. More...
 
bitfield< uint32_t > & getBitfield (const std::string &regname, const std::string &name, const std::string &urid)
 Preferred way to get access to a bitfield. More...
 
- Public Member Functions inherited from scc::resetable
virtual void reset_start ()
 distributes the begin of the reset to all registered components and set the reset state
 
virtual void reset_stop ()
 distributes the end of the reset to all registered components and finishes the reset state
 
bool in_reset ()
 get the current state of this reset domain More...
 
void register_resource (resource_access_if *res)
 register a resource with this reset domain More...
 

Additional Inherited Members

- Protected Attributes inherited from scc::resetable
std::vector< resource_access_if * > resources
 
bool _in_reset = false
 

Detailed Description

template<typename derived_t, bool use_URID = false>
class scc::tlm_target_bfs_register_base< derived_t, use_URID >

Base class the register layout classes for peripheral_base_minres must derive from.

Template Parameters
derived_tType of the concrete register class. Used for CRTP.
use_URIDSet this to true if the bitfield/register layout is not the same as the original. If true, then register lookups work by urid and not by regname and bitfield name.

Definition at line 326 of file tlm_target_bfs_register_base.h.

Member Function Documentation

◆ getBitfield()

template<typename derived_t , bool use_URID = false>
bitfield<uint32_t>& scc::tlm_target_bfs_register_base< derived_t, use_URID >::getBitfield ( const std::string &  regname,
const std::string &  name,
const std::string &  urid 
)
inline

Preferred way to get access to a bitfield.

If use_URID is true searches a bitfield by the specified urid. If use_URID is false searches a bitfield by name and regname. Also generates a warning if the found bitfield has an urid different from the specified urid.

If no matching bitfield is found a FATALERROR is generated.

Definition at line 395 of file tlm_target_bfs_register_base.h.

◆ getBitfieldById()

template<typename derived_t , bool use_URID = false>
bitfield<uint32_t>& scc::tlm_target_bfs_register_base< derived_t, use_URID >::getBitfieldById ( const std::string &  urid)
inline

Search for a bitfield by urid.

If no matching bitfield is found a FATALERROR is generated.

See also
getBitfield()

Definition at line 376 of file tlm_target_bfs_register_base.h.

◆ getBitfieldByName()

template<typename derived_t , bool use_URID = false>
bitfield<uint32_t>& scc::tlm_target_bfs_register_base< derived_t, use_URID >::getBitfieldByName ( const std::string &  regname,
const std::string &  name 
)
inline

Search for a bitfield by name and register name.

If the register layout could change use getBitfield() instead.

If no matching bitfield is found a FATALERROR is generated.

Definition at line 359 of file tlm_target_bfs_register_base.h.

◆ getRegister()

template<typename derived_t , bool use_URID = false>
bitfield_register<uint32_t>& scc::tlm_target_bfs_register_base< derived_t, use_URID >::getRegister ( const std::string &  name)
inline

Search for a register by name.

If no matching register is found a FATALERROR is generated.

Definition at line 343 of file tlm_target_bfs_register_base.h.


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