Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sr_register_field< T > Class Template Reference

#include <sr_register.h>

Inheritance diagram for sr_register_field< T >:
Collaboration diagram for sr_register_field< T >:

Public Member Functions

 sr_register_field (const char *name, sc_register_b< T > *c, unsigned int highpos, unsigned int lowpos)
 
 sr_register_field (const char *name, sc_register_b< T > *c, const char *desc, unsigned int highpos, unsigned int lowpos)
 
 ~sr_register_field ()
 
virtual unsigned int low_pos () const
 
virtual unsigned int high_pos () const
 
virtual unsigned int bit_width () const
 
 sr_register_field (const char *name, sc_register_b< T > *c, unsigned int highpos, unsigned int lowpos)
 
 sr_register_field (const char *name, sc_register_b< T > *c, const char *desc, unsigned int highpos, unsigned int lowpos)
 
 ~sr_register_field ()
 
virtual unsigned int low_pos () const
 
virtual unsigned int high_pos () const
 
virtual unsigned int bit_width () const
 
- Public Member Functions inherited from sc_register_field_b< T >
 sc_register_field_b (const char *nm, sc_register_b< T > *r)
 
 sc_register_field_b (const char *nm, sc_register_b< T > *r, const char *desc)
 
virtual ~sc_register_field_b ()
 
const T & read () const
 
void write (const T &v)
 
void add_value_code (const T &v, const ::std::string &n)
 For value-encoding. More...
 
void add_value_code (const T &v, const ::std::string &n, const ::std::string &desc)
 
const charget_value_mnemonic () const
 added by bpriya for debugging More...
 
const charget_value_desc () const
 
virtual void print (::std::ostream &os) 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...
 
template<>
void print (::std::ostream &os) const
 sc_object style print() - print current value of field More...
 
- Public Member Functions inherited from sc_register_field_base
 sc_register_field_base (const char *nm)
 
 sc_register_field_base (const char *nm, const char *desc)
 
virtual ~sc_register_field_base ()
 
const charname () 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 scireg_response scireg_get_child_regions (std::vector< scireg_mapped_region > &mapped_regions, sc_dt::uint64 size=sc_dt::uint64(-1), sc_dt::uint64 offset=0) 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_parent_modules (std::vector< sc_core::sc_module * > &v) const
 Get parent SystemC modules 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 Member Functions

virtual const T & get_mask () const
 
virtual unsigned int get_shift_bits () const
 
virtual const T & get_mask () const
 
virtual unsigned int get_shift_bits () const
 
- Protected Member Functions inherited from sc_register_field_b< T >
const sc_rf_valuecodeget_value_code (const T &v) const
 
const charget_value_mnemonic (const T &v) const
 
const charget_value_desc (const T &v) const
 
- Protected Member Functions inherited from sc_register_field_base
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...
 
sc_dt::uint64 scireg_get_high_pos () const
 
sc_dt::uint64 scireg_get_bit_width () const
 Get bit width and byte width of this region. 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...
 
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...
 

Protected Attributes

m_mask
 
const unsigned int m_highpos
 
const unsigned int m_lowpos
 
- Protected Attributes inherited from sc_register_field_b< T >
sc_register_b< T > * m_reg
 
::std::map< T, sc_rf_valuecode * > m_value_encoding_map
 Value-encoding map. More...
 
- Protected Attributes inherited from sc_register_field_base
::std::string m_name
 
::std::string m_desc
 

Detailed Description

template<typename T>
class sr_register_field< T >

lsb0 mode is used in field position specification. (lsb0 defines the 0 as the least significant bit. It is the default position specification mode in IP-XACT systemRDL.

Constructor & Destructor Documentation

template<typename T>
sr_register_field< T >::sr_register_field ( const char name,
sc_register_b< T > *  c,
unsigned int  highpos,
unsigned int  lowpos 
)
inline
template<typename T>
sr_register_field< T >::sr_register_field ( const char name,
sc_register_b< T > *  c,
const char desc,
unsigned int  highpos,
unsigned int  lowpos 
)
inline
template<typename T>
sr_register_field< T >::~sr_register_field ( )
inline
template<typename T>
sr_register_field< T >::sr_register_field ( const char name,
sc_register_b< T > *  c,
unsigned int  highpos,
unsigned int  lowpos 
)
inline
template<typename T>
sr_register_field< T >::sr_register_field ( const char name,
sc_register_b< T > *  c,
const char desc,
unsigned int  highpos,
unsigned int  lowpos 
)
inline
template<typename T>
sr_register_field< T >::~sr_register_field ( )
inline

Member Function Documentation

template<typename T>
virtual unsigned int sr_register_field< T >::bit_width ( ) const
inlinevirtual
template<typename T>
virtual unsigned int sr_register_field< T >::bit_width ( ) const
inlinevirtual
template<typename T>
virtual const T& sr_register_field< T >::get_mask ( ) const
inlineprotectedvirtual
template<typename T>
virtual const T& sr_register_field< T >::get_mask ( ) const
inlineprotectedvirtual
template<typename T>
virtual unsigned int sr_register_field< T >::get_shift_bits ( ) const
inlineprotectedvirtual
template<typename T>
virtual unsigned int sr_register_field< T >::get_shift_bits ( ) const
inlineprotectedvirtual
template<typename T>
virtual unsigned int sr_register_field< T >::high_pos ( ) const
inlinevirtual
template<typename T>
virtual unsigned int sr_register_field< T >::high_pos ( ) const
inlinevirtual
template<typename T>
virtual unsigned int sr_register_field< T >::low_pos ( ) const
inlinevirtual
template<typename T>
virtual unsigned int sr_register_field< T >::low_pos ( ) const
inlinevirtual

Member Data Documentation

template<typename T>
const unsigned int sr_register_field< T >::m_highpos
protected
template<typename T>
const unsigned int sr_register_field< T >::m_lowpos
protected
template<typename T>
T sr_register_field< T >::m_mask
protected

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