Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Types | Public Member Functions | Protected Attributes | List of all members
sr_register_bank< ADDR_TYPE, DATA_TYPE > Class Template Reference

#include <sr_register.h>

Inheritance diagram for sr_register_bank< ADDR_TYPE, DATA_TYPE >:
Collaboration diagram for sr_register_bank< ADDR_TYPE, DATA_TYPE >:

Public Types

typedef std::map< ADDR_TYPE,
sr_register< DATA_TYPE > * > 
register_map_t
 
typedef std::map< ADDR_TYPE,
sr_register< DATA_TYPE > * > 
register_map_t
 

Public Member Functions

 sr_register_bank (const char *name)
 
 ~sr_register_bank ()
 
sr_register< DATA_TYPE > & create_register (const char *name, ADDR_TYPE addr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
sr_register< DATA_TYPE > & create_register (const char *name, const char *descr, ADDR_TYPE addr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
bool bus_read (ADDR_TYPE offset, DATA_TYPE &i) const
 
bool bus_write (ADDR_TYPE offset, DATA_TYPE val)
 
bool bus_read_dbg (ADDR_TYPE offset, DATA_TYPE &i) const
 
bool bus_write_dbg (ADDR_TYPE offset, DATA_TYPE val)
 
bool is_valid_offset (ADDR_TYPE offset) const
 
bool supports_action_type (ADDR_TYPE offset, sc_register_access_type mode)
 
const sc_register_vecget_registers () const
 
const sr_register< DATA_TYPE > * get_sr_register (const ADDR_TYPE &offset) const
 
sr_register< DATA_TYPE > * get_sr_register (const ADDR_TYPE &offset)
 
sc_register_baseget_register (const ADDR_TYPE offset)
 
sr_register< DATA_TYPE > & operator[] (ADDR_TYPE offset)
 
bool get_offset (sc_register_base *reg, DATA_TYPE &offset) const
 
sc_dt::uint64 scireg_get_bit_width () const
 Get bit width and byte width of this region. More...
 
scireg_ns::scireg_response scireg_read (scireg_ns::vector_byte &v, sc_dt::uint64 size, sc_dt::uint64 offset=0) const
 Read a vector of "size" bytes at given offset in this region: More...
 
scireg_ns::scireg_response scireg_write (const scireg_ns::vector_byte &v, sc_dt::uint64 size, sc_dt::uint64 offset=0)
 Write a vector of "size" bytes at given offset in this region: More...
 
 sr_register_bank (const char *name)
 
 ~sr_register_bank ()
 
sr_register< DATA_TYPE > & create_register (const char *name, ADDR_TYPE addr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
sr_register< DATA_TYPE > & create_register (const char *name, const char *descr, ADDR_TYPE addr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
bool bus_read (ADDR_TYPE offset, DATA_TYPE &i) const
 
bool bus_write (ADDR_TYPE offset, DATA_TYPE val)
 
bool bus_read_dbg (ADDR_TYPE offset, DATA_TYPE &i) const
 
bool bus_write_dbg (ADDR_TYPE offset, DATA_TYPE val)
 
bool is_valid_offset (ADDR_TYPE offset) const
 
bool supports_action_type (ADDR_TYPE offset, sc_register_access_type mode)
 
const sc_register_vecget_registers () const
 
const sr_register< DATA_TYPE > * get_sr_register (const ADDR_TYPE &offset) const
 
sr_register< DATA_TYPE > * get_sr_register (const ADDR_TYPE &offset)
 
sc_register_baseget_register (const ADDR_TYPE offset)
 
sr_register< DATA_TYPE > & operator[] (ADDR_TYPE offset)
 
bool get_offset (sc_register_base *reg, DATA_TYPE &offset) const
 
sc_dt::uint64 scireg_get_bit_width () const
 Get bit width and byte width of this region. More...
 
scireg_ns::scireg_response scireg_read (scireg_ns::vector_byte &v, sc_dt::uint64 size, sc_dt::uint64 offset=0) const
 Read a vector of "size" bytes at given offset in this region: More...
 
scireg_ns::scireg_response scireg_write (const scireg_ns::vector_byte &v, sc_dt::uint64 size, sc_dt::uint64 offset=0)
 Write a vector of "size" bytes at given offset in this region: More...
 
- Public Member Functions inherited from sc_register_bank< ADDR_TYPE, DATA_TYPE >
 sc_register_bank (const unsigned long long size)
 
 sc_register_bank (const char *name, const unsigned long long size)
 
virtual ~sc_register_bank ()
 
- Public Member Functions inherited from sc_register_bank_base
 sc_register_bank_base ()
 
 sc_register_bank_base (unsigned long long size)
 
 sc_register_bank_base (const char *name, const unsigned long long size)
 
virtual ~sc_register_bank_base ()
 
virtual const charkind () const
 
unsigned long long size () const
 
bool add_associate_busport (sc_object *busport)
 
- Public Member Functions inherited from scireg_ns::scireg_region_if
 scireg_region_if ()
 
virtual ~scireg_region_if ()
 
virtual scireg_response scireg_get_bit_attributes (vector_byte &v, scireg_bit_attributes_type t, sc_dt::uint64 size, sc_dt::uint64 offset=0) const
 Get bit attributes of type "t" into "v". "size" represents number of bytes returned, offset can be used to constrain the range. More...
 
virtual sc_dt::uint64 scireg_get_low_pos () const
 If this region is a register field, these functions return low bit and high bit positions: More...
 
virtual sc_dt::uint64 scireg_get_high_pos () const
 
virtual scireg_response scireg_get_parent_regions (std::vector< scireg_region_if * > &v) const
 Get parent regions of this region. More...
 
virtual scireg_response scireg_add_callback (scireg_callback &cb)
 Add/Delete Callback objects associated with this region. More...
 
virtual scireg_response scireg_remove_callback (scireg_callback &cb)
 
virtual scireg_response scireg_get_target_sockets (std::vector< sc_core::sc_object * > &v) const
 Get SC TLM2 Target socket associated with this region. More...
 
virtual scireg_response scireg_get_value_info (std::vector< scireg_value_info > &v) const
 Get a vector of value_info objects for this region. More...
 
virtual scireg_response scireg_get_dmi_granted (bool &granted, sc_dt::uint64 size, sc_dt::uint64 offset=0) const
 Query to see if DMI access has been granted to this region. "size" and offset can be used to constrain the range. More...
 

Protected Attributes

sc_register_vec m_registers
 
register_map_t m_register
 
- Protected Attributes inherited from sc_register_bank_base
unsigned long long m_size
 
::std::vector
< sc_core::sc_object * > 
m_associate_busports
 

Additional Inherited Members

- Protected Member Functions inherited from sc_register_bank< ADDR_TYPE, DATA_TYPE >
virtual bool get_offset (sc_register_base *reg, ADDR_TYPE &offset) const =0
 
virtual void print_offset (sc_register_base *reg,::std::ostream &os) const
 
scireg_ns::scireg_response scireg_get_child_regions (std::vector< scireg_ns::scireg_mapped_region > &mapped_regions, sc_dt::uint64 size, sc_dt::uint64 offset) const
 
- Protected Member Functions inherited from sc_register_bank_base
const std::vector< sc_object * > & get_associate_busports () const
 
virtual scireg_ns::scireg_response scireg_get_string_attribute (const char *&s, scireg_ns::scireg_string_attribute_type t) const
 Get string attributes of type "t" associated with this region. The returned string is assigned to "s". More...
 
virtual sc_dt::uint64 scireg_get_byte_width () const
 
virtual scireg_ns::scireg_response scireg_get_region_type (scireg_ns::scireg_region_type &t) const
 Get the region_type of this region: More...
 
virtual scireg_ns::scireg_response scireg_get_target_sockets (::std::vector< sc_core::sc_object * > &v) const
 
virtual scireg_ns::scireg_response scireg_get_parent_modules (std::vector< sc_core::sc_module * > &v) const
 Get parent SystemC modules associated with this region. More...
 

Member Typedef Documentation

template<typename ADDR_TYPE, typename DATA_TYPE>
typedef std::map<ADDR_TYPE, sr_register<DATA_TYPE> *> sr_register_bank< ADDR_TYPE, DATA_TYPE >::register_map_t
template<typename ADDR_TYPE, typename DATA_TYPE>
typedef std::map<ADDR_TYPE, sr_register<DATA_TYPE> *> sr_register_bank< ADDR_TYPE, DATA_TYPE >::register_map_t

Constructor & Destructor Documentation

template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register_bank< ADDR_TYPE, DATA_TYPE >::sr_register_bank ( const char name)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register_bank< ADDR_TYPE, DATA_TYPE >::~sr_register_bank ( )
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register_bank< ADDR_TYPE, DATA_TYPE >::sr_register_bank ( const char name)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register_bank< ADDR_TYPE, DATA_TYPE >::~sr_register_bank ( )
inline

Member Function Documentation

template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_read ( ADDR_TYPE  offset,
DATA_TYPE i 
) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_read ( ADDR_TYPE  offset,
DATA_TYPE i 
) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_read_dbg ( ADDR_TYPE  offset,
DATA_TYPE i 
) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_read_dbg ( ADDR_TYPE  offset,
DATA_TYPE i 
) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_write ( ADDR_TYPE  offset,
DATA_TYPE  val 
)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_write ( ADDR_TYPE  offset,
DATA_TYPE  val 
)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_write_dbg ( ADDR_TYPE  offset,
DATA_TYPE  val 
)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::bus_write_dbg ( ADDR_TYPE  offset,
DATA_TYPE  val 
)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::create_register ( const char name,
ADDR_TYPE  addr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::create_register ( const char name,
ADDR_TYPE  addr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::create_register ( const char name,
const char descr,
ADDR_TYPE  addr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::create_register ( const char name,
const char descr,
ADDR_TYPE  addr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_offset ( sc_register_base reg,
DATA_TYPE offset 
) const
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_offset ( sc_register_base reg,
DATA_TYPE offset 
) const
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sc_register_base* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_register ( const ADDR_TYPE  offset)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
sc_register_base* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_register ( const ADDR_TYPE  offset)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
const sc_register_vec& sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_registers ( ) const
inlinevirtual

Implements sc_register_bank_base.

template<typename ADDR_TYPE, typename DATA_TYPE>
const sc_register_vec& sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_registers ( ) const
inlinevirtual

Implements sc_register_bank_base.

template<typename ADDR_TYPE, typename DATA_TYPE>
const sr_register<DATA_TYPE>* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_sr_register ( const ADDR_TYPE &  offset) const
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
const sr_register<DATA_TYPE>* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_sr_register ( const ADDR_TYPE &  offset) const
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_sr_register ( const ADDR_TYPE &  offset)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>* sr_register_bank< ADDR_TYPE, DATA_TYPE >::get_sr_register ( const ADDR_TYPE &  offset)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::is_valid_offset ( ADDR_TYPE  offset) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::is_valid_offset ( ADDR_TYPE  offset) const
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::operator[] ( ADDR_TYPE  offset)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register_bank< ADDR_TYPE, DATA_TYPE >::operator[] ( ADDR_TYPE  offset)
inline
template<typename ADDR_TYPE, typename DATA_TYPE>
sc_dt::uint64 sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_get_bit_width ( ) const
inlinevirtual

Get bit width and byte width of this region.

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
sc_dt::uint64 sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_get_bit_width ( ) const
inlinevirtual

Get bit width and byte width of this region.

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
scireg_ns::scireg_response sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_read ( scireg_ns::vector_byte v,
sc_dt::uint64  size,
sc_dt::uint64  offset = 0 
) const
inlinevirtual

Read a vector of "size" bytes at given offset in this region:

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
scireg_ns::scireg_response sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_read ( scireg_ns::vector_byte v,
sc_dt::uint64  size,
sc_dt::uint64  offset = 0 
) const
inlinevirtual

Read a vector of "size" bytes at given offset in this region:

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
scireg_ns::scireg_response sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_write ( const scireg_ns::vector_byte v,
sc_dt::uint64  size,
sc_dt::uint64  offset = 0 
)
inlinevirtual

Write a vector of "size" bytes at given offset in this region:

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
scireg_ns::scireg_response sr_register_bank< ADDR_TYPE, DATA_TYPE >::scireg_write ( const scireg_ns::vector_byte v,
sc_dt::uint64  size,
sc_dt::uint64  offset = 0 
)
inlinevirtual

Write a vector of "size" bytes at given offset in this region:

Reimplemented from scireg_ns::scireg_region_if.

template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::supports_action_type ( ADDR_TYPE  offset,
sc_register_access_type  mode 
)
inlinevirtual
template<typename ADDR_TYPE, typename DATA_TYPE>
bool sr_register_bank< ADDR_TYPE, DATA_TYPE >::supports_action_type ( ADDR_TYPE  offset,
sc_register_access_type  mode 
)
inlinevirtual

Member Data Documentation

template<typename ADDR_TYPE, typename DATA_TYPE>
register_map_t sr_register_bank< ADDR_TYPE, DATA_TYPE >::m_register
protected
template<typename ADDR_TYPE, typename DATA_TYPE>
sc_register_vec sr_register_bank< ADDR_TYPE, DATA_TYPE >::m_registers
protected

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