Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Types | Public Member Functions | List of all members
sr_register< DATA_TYPE > Class Template Reference

#include <sr_register.h>

Inheritance diagram for sr_register< DATA_TYPE >:
Collaboration diagram for sr_register< DATA_TYPE >:

Public Types

typedef std::vector
< sr_register_callback_base * > 
callback_vector_t
 
typedef std::map
< sr_register_callback_type,
callback_vector_t
callback_map_t
 
typedef std::map< const char
*, sr_register_field
< DATA_TYPE > * > 
field_map_t
 
typedef std::vector
< sr_register_callback_base * > 
callback_vector_t
 
typedef std::map
< sr_register_callback_type,
callback_vector_t
callback_map_t
 
typedef std::map< const char
*, sr_register_field
< DATA_TYPE > * > 
field_map_t
 

Public Member Functions

 sr_register (const char *name, DATA_TYPE init_val, DATA_TYPE write_mask)
 
 sr_register (const char *name, const char *descr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
 ~sr_register ()
 
template<typename OWNER >
sr_registercallback (sr_register_callback_type type, OWNER *owner, typename sr_register_callback< OWNER >::callback_t callback)
 
sr_registercreate_field (const char *name, size_t start, size_t end)
 
sr_register_field< DATA_TYPE > & field (const char *name)
 
const DATA_TYPEget_write_mask ()
 
void raise_callback (const sr_register_callback_type &type) const
 
void bus_read (DATA_TYPE &i) const
 
void bus_write (DATA_TYPE i)
 
bool bit (int pos) const
 
void bit (int pos, bool value)
 
virtual sc_register_access_mode access_mode () const
 
 operator DATA_TYPE ()
 
sr_register< DATA_TYPE > & operator= (const DATA_TYPE &val)
 
 sr_register (const char *name, DATA_TYPE init_val, DATA_TYPE write_mask)
 
 sr_register (const char *name, const char *descr, DATA_TYPE init_val, DATA_TYPE write_mask)
 
 ~sr_register ()
 
template<typename OWNER >
sr_registercallback (sr_register_callback_type type, OWNER *owner, typename sr_register_callback< OWNER >::callback_t callback)
 
sr_registercreate_field (const char *name, size_t start, size_t end)
 
sr_register_field< DATA_TYPE > & field (const char *name)
 
const DATA_TYPEget_write_mask ()
 
void raise_callback (const sr_register_callback_type &type) const
 
void bus_read (DATA_TYPE &i) const
 
void bus_write (DATA_TYPE i)
 
bool bit (int pos) const
 
void bit (int pos, bool value)
 
virtual sc_register_access_mode access_mode () const
 
 operator DATA_TYPE ()
 
sr_register< DATA_TYPE > & operator= (const DATA_TYPE &val)
 
- Public Member Functions inherited from sc_register_b< DATA_TYPE >
 sc_register_b (const char *name, const DATA_TYPE &reset_val)
 
 sc_register_b (const char *name, const DATA_TYPE &reset_val, const char *desc)
 
virtual ~sc_register_b ()
 
void reset ()
 
virtual const DATA_TYPEread () const
 
virtual void write (const DATA_TYPE &)
 
void update ()
 
unsigned int number_of_fields () const
 
const sc_register_field_vecget_all_fields () const
 
virtual const DATA_TYPEget_mask () const
 
scireg_ns::scireg_response scireg_read (scireg_ns::vector_byte &v, sc_dt::uint64 size, sc_dt::uint64 offset) 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)
 Write a vector of "size" bytes at given offset in this region: More...
 
sc_dt::uint64 scireg_get_bit_width () const
 Get bit width and byte width of this region. More...
 
scireg_ns::scireg_response scireg_add_callback (scireg_ns::scireg_callback &cb)
 Add/Delete Callback objects associated with this region. More...
 
scireg_ns::scireg_response scireg_remove_callback (scireg_ns::scireg_callback &cb)
 
- Public Member Functions inherited from sc_register_base
 sc_register_base ()
 
 sc_register_base (const char *name)
 
 sc_register_base (const char *name, const char *desc)
 
virtual ~sc_register_base ()
 
virtual const charkind () const
 
const chardesc () const
 
- 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_byte_width () const
 
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_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...
 

Additional Inherited Members

- Static Public Member Functions inherited from sc_register_base
static const characcess_type_to_str (sc_register_access_type accessType)
 
static const characcess_mode_to_str (sc_register_access_mode accessMode)
 
- Protected Member Functions inherited from sc_register_b< DATA_TYPE >
void add_field (sc_register_field_base *f)
 
virtual const DATA_TYPEmask_read (const DATA_TYPE &, unsigned int) const
 
virtual void mask_write (const DATA_TYPE &, const DATA_TYPE &, unsigned int)
 
void check_and_init ()
 
- Protected Member Functions inherited from sc_register_base
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 scireg_ns::scireg_response scireg_get_region_type (scireg_ns::scireg_region_type &t) const
 Get the region_type of this region: More...
 
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
 
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...
 
- Protected Attributes inherited from sc_register_b< DATA_TYPE >
DATA_TYPE m_cur_val
 
DATA_TYPE m_reset_val
 
sc_core::sc_event * m_probe_event
 
::std::vector
< scireg_ns::scireg_callback * > 
scireg_callback_vec
 
DATA_TYPE m_mask
 
sc_register_field_vec m_fields
 
- Protected Attributes inherited from sc_register_base
::std::string m_desc
 

Member Typedef Documentation

template<typename DATA_TYPE>
typedef std::map<sr_register_callback_type, callback_vector_t > sr_register< DATA_TYPE >::callback_map_t
template<typename DATA_TYPE>
typedef std::map<sr_register_callback_type, callback_vector_t > sr_register< DATA_TYPE >::callback_map_t
template<typename DATA_TYPE>
typedef std::vector<sr_register_callback_base *> sr_register< DATA_TYPE >::callback_vector_t
template<typename DATA_TYPE>
typedef std::vector<sr_register_callback_base *> sr_register< DATA_TYPE >::callback_vector_t
template<typename DATA_TYPE>
typedef std::map<const char *, sr_register_field<DATA_TYPE> *> sr_register< DATA_TYPE >::field_map_t
template<typename DATA_TYPE>
typedef std::map<const char *, sr_register_field<DATA_TYPE> *> sr_register< DATA_TYPE >::field_map_t

Constructor & Destructor Documentation

template<typename DATA_TYPE>
sr_register< DATA_TYPE >::sr_register ( const char name,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::sr_register ( const char name,
const char descr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::~sr_register ( )
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::sr_register ( const char name,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::sr_register ( const char name,
const char descr,
DATA_TYPE  init_val,
DATA_TYPE  write_mask 
)
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::~sr_register ( )
inline

Member Function Documentation

template<typename DATA_TYPE>
virtual sc_register_access_mode sr_register< DATA_TYPE >::access_mode ( ) const
inlinevirtual

Implements sc_register_base.

template<typename DATA_TYPE>
virtual sc_register_access_mode sr_register< DATA_TYPE >::access_mode ( ) const
inlinevirtual
template<typename DATA_TYPE>
bool sr_register< DATA_TYPE >::bit ( int  pos) const
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bit ( int  pos,
bool  value 
)
inline
template<typename DATA_TYPE>
bool sr_register< DATA_TYPE >::bit ( int  pos) const
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bit ( int  pos,
bool  value 
)
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bus_read ( DATA_TYPE i) const
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bus_read ( DATA_TYPE i) const
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bus_write ( DATA_TYPE  i)
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::bus_write ( DATA_TYPE  i)
inline
template<typename DATA_TYPE>
template<typename OWNER >
sr_register& sr_register< DATA_TYPE >::callback ( sr_register_callback_type  type,
OWNER *  owner,
typename sr_register_callback< OWNER >::callback_t  callback 
)
inline
template<typename DATA_TYPE>
template<typename OWNER >
sr_register& sr_register< DATA_TYPE >::callback ( sr_register_callback_type  type,
OWNER *  owner,
typename sr_register_callback< OWNER >::callback_t  callback 
)
inline
template<typename DATA_TYPE>
sr_register& sr_register< DATA_TYPE >::create_field ( const char name,
size_t  start,
size_t  end 
)
inline
template<typename DATA_TYPE>
sr_register& sr_register< DATA_TYPE >::create_field ( const char name,
size_t  start,
size_t  end 
)
inline

Referenced by Mctrl::init_registers().

template<typename DATA_TYPE>
sr_register_field<DATA_TYPE>& sr_register< DATA_TYPE >::field ( const char name)
inline
template<typename DATA_TYPE>
sr_register_field<DATA_TYPE>& sr_register< DATA_TYPE >::field ( const char name)
inline
template<typename DATA_TYPE>
const DATA_TYPE& sr_register< DATA_TYPE >::get_write_mask ( )
inline
template<typename DATA_TYPE>
const DATA_TYPE& sr_register< DATA_TYPE >::get_write_mask ( )
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::operator DATA_TYPE ( )
inline
template<typename DATA_TYPE>
sr_register< DATA_TYPE >::operator DATA_TYPE ( )
inline
template<typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register< DATA_TYPE >::operator= ( const DATA_TYPE val)
inline
template<typename DATA_TYPE>
sr_register<DATA_TYPE>& sr_register< DATA_TYPE >::operator= ( const DATA_TYPE val)
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::raise_callback ( const sr_register_callback_type type) const
inline
template<typename DATA_TYPE>
void sr_register< DATA_TYPE >::raise_callback ( const sr_register_callback_type type) const
inline

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