Transaction-Level Modeling Framework for Space Applications
#include <basememory.h>
Public Member Functions | |
BaseMemory () | |
~BaseMemory () | |
void | set_storage (std::string implementation, uint32_t size) |
uint8_t | read (const uint32_t &addr) |
uint8_t | read_dbg (const uint32_t &addr) |
void | write (const uint32_t &addr, const uint8_t &byte) |
void | write_dbg (const uint32_t &addr, const uint8_t &byte) |
void | write_block (const uint32_t &addr, uint8_t *data, const uint32_t &len) |
void | write_block_dbg (const uint32_t &addr, const uint8_t *data, const uint32_t &len) |
void | read_block (const uint32_t &addr, uint8_t *data, const uint32_t &len) |
void | read_block_dbg (const uint32_t &addr, uint8_t *data, const uint32_t &len) const |
void | erase (const uint32_t &start, const uint32_t &end) |
void | erase_dbg (const uint32_t &start, const uint32_t &end) |
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_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... | |
virtual 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... | |
virtual sc_dt::uint64 | scireg_get_bit_width () const |
Get bit width and byte width of this region. 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_ns::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... | |
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 scireg_response | scireg_get_string_attribute (const char *&s, 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_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... | |
Public Attributes | |
unsigned long long | reads |
byte read count More... | |
unsigned long long | writes |
byte write count More... | |
unsigned long long | reads32 |
word (4 bytes) read count More... | |
unsigned long long | writes32 |
word (4 bytes) write count More... | |
Protected Attributes | |
Storage * | m_storage |
|
inlinevirtual |
Get bit width and byte width of this region.
Reimplemented from scireg_ns::scireg_region_if.
|
inlinevirtual |
Query to see if DMI access has been granted to this region. "size" and offset can be used to constrain the range.
Reimplemented from scireg_ns::scireg_region_if.
References scireg_ns::SCIREG_UNSUPPORTED.
|
inlinevirtual |
Reimplemented from scireg_ns::scireg_region_if.
|
inlinevirtual |
If this region is a register field, these functions return low bit and high bit positions:
Reimplemented from scireg_ns::scireg_region_if.
|
inlinevirtual |
Get the region_type of this region:
Reimplemented from scireg_ns::scireg_region_if.
References scireg_ns::SCIREG_MEMORY, and scireg_ns::SCIREG_SUCCESS.
|
inlinevirtual |
Read a vector of "size" bytes at given offset in this region:
Reimplemented from scireg_ns::scireg_region_if.
References offset, read_block_dbg(), and scireg_ns::SCIREG_SUCCESS.
|
inlinevirtual |
Write a vector of "size" bytes at given offset in this region:
Reimplemented from scireg_ns::scireg_region_if.
References offset, scireg_ns::SCIREG_SUCCESS, and write_block_dbg().
|
protected |
Referenced by erase_dbg(), AHBMem::exec_func(), AHBMem::get_direct_mem_ptr(), read_block_dbg(), read_dbg(), set_storage(), write_block_dbg(), write_dbg(), and ~BaseMemory().
unsigned long long BaseMemory::reads |
byte read count
Referenced by BaseMemory(), read(), and read_block().
unsigned long long BaseMemory::reads32 |
word (4 bytes) read count
Referenced by BaseMemory(), MemoryPower::dyn_reads_cb(), MemoryPower::dyn_reads_write_cb(), read(), read_block(), and MemoryPower::swi_power_cb().
unsigned long long BaseMemory::writes |
byte write count
Referenced by BaseMemory(), write(), and write_block().
unsigned long long BaseMemory::writes32 |
word (4 bytes) write count
Referenced by BaseMemory(), MemoryPower::dyn_writes_cb(), MemoryPower::dyn_writes_write_cb(), MemoryPower::swi_power_cb(), write(), and write_block().