Transaction-Level Modeling Framework for Space Applications
Files | |
file | arraystorage.cpp |
file | arraystorage.h |
file | basememory.cpp |
file | basememory.h |
file | ext_erase.h |
file | arraystorage.cpp |
file | mapstorage.h |
file | memory.h |
file | memorypower.cpp |
file | storage.h |
Classes | |
class | ArrayStorage |
class | BaseMemory |
struct | ext_erase |
class | MapStorage |
struct | Memory |
This class models a generic memory. Depending on the configuration it can be used as ROM, IO, SRAM or SDRAM, in conjunction with the SoCRocket MCTRL. More... | |
class | MemoryPower |
class | Storage |
Macros | |
#define | SR_HAS_MEMORYSTORAGE_GENERATOR(type, factory, isinstance) |
#define | SR_HAS_MEMORYSTORAGE(type) |
Functions | |
SR_HAS_MEMORYSTORAGE (ArrayStorage) | |
SR_HAS_MEMORYSTORAGE (MapStorage) | |
SR_HAS_MODULE (Memory) | |
MemoryPower::GC_HAS_CALLBACKS () | |
MemoryPower::MemoryPower (sc_module_name name, MEMDevice::device_type type=MEMDevice::SRAM, uint32_t banks=4, uint32_t bsize=128, uint32_t bits=32, uint32_t cols=16, bool pow_mon=false) | |
MemoryPower::~MemoryPower () | |
void | MemoryPower::power_model () |
Calculate power/energy values from normalized input data. More... | |
gs::cnf::callback_return_type | MemoryPower::swi_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
Dynamic/Switching power callback. More... | |
gs::cnf::callback_return_type | MemoryPower::dyn_reads_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
32-bit-reads counter callback More... | |
gs::cnf::callback_return_type | MemoryPower::dyn_writes_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
32-bit-writes counter callback More... | |
gs::cnf::callback_return_type | MemoryPower::dyn_reads_write_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
32-bit-reads counter callback, write More... | |
gs::cnf::callback_return_type | MemoryPower::dyn_writes_write_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
32-bit-writes counter callback, write More... | |
ArrayStorage::ArrayStorage (sc_core::sc_module_name mn) | |
ArrayStorage::~ArrayStorage () | |
void | ArrayStorage::set_size (const uint32_t &size) |
void | ArrayStorage::write (const uint32_t &addr, const uint8_t &byte) |
uint8_t | ArrayStorage::read (const uint32_t &addr) const |
void | ArrayStorage::erase (const uint32_t &start, const uint32_t &end) |
void | ArrayStorage::write_block (const uint32_t &addr, const uint8_t *ptr, const uint32_t &len) |
void | ArrayStorage::read_block (const uint32_t &addr, uint8_t *ptr, const uint32_t &len) const |
uint8_t * | ArrayStorage::get_dmi_ptr () |
bool | ArrayStorage::allow_dmi_rw () |
BaseMemory::BaseMemory () | |
BaseMemory::~BaseMemory () | |
void | BaseMemory::set_storage (std::string implementation, uint32_t size) |
uint8_t | BaseMemory::read (const uint32_t &addr) |
void | BaseMemory::write (const uint32_t &addr, const uint8_t &byte) |
uint8_t | BaseMemory::read_dbg (const uint32_t &addr) |
void | BaseMemory::write_dbg (const uint32_t &addr, const uint8_t &byte) |
void | BaseMemory::erase (const uint32_t &start, const uint32_t &end) |
void | BaseMemory::erase_dbg (const uint32_t &start, const uint32_t &end) |
void | BaseMemory::write_block (const uint32_t &addr, uint8_t *data, const uint32_t &len) |
void | BaseMemory::write_block_dbg (const uint32_t &addr, const uint8_t *data, const uint32_t &len) |
void | BaseMemory::read_block (const uint32_t &addr, uint8_t *data, const uint32_t &len) |
void | BaseMemory::read_block_dbg (const uint32_t &addr, uint8_t *data, const uint32_t &len) const |
MapStorage::MapStorage (sc_core::sc_module_name mn) | |
MapStorage::~MapStorage () | |
void | MapStorage::set_size (const uint32_t &size) |
void | MapStorage::write (const uint32_t &addr, const uint8_t &byte) |
uint8_t | MapStorage::read (const uint32_t &addr) const |
void | MapStorage::erase (const uint32_t &start, const uint32_t &end) |
void | MapStorage::read_block (const uint32_t &addr, uint8_t *ptr, const uint32_t &len) const |
void | MapStorage::write_block (const uint32_t &addr, const uint8_t *ptr, const uint32_t &len) |
Memory::~Memory () | |
Destructor. More... | |
void | Memory::before_end_of_elaboration () |
void | Memory::start_of_simulation () |
SystemC start of simulation callback. More... | |
void | Memory::end_of_simulation () |
SystemC end of simulation. More... | |
gs::cnf::callback_return_type | Memory::m_reads_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
read counter callback More... | |
gs::cnf::callback_return_type | Memory::m_writes_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
write counter callback More... | |
void | Memory::b_transport (tlm::tlm_generic_payload &gp, sc_time &delay) |
TLM 2.0 blocking transport function. More... | |
unsigned int | Memory::transport_dbg (tlm::tlm_generic_payload &gp) |
TLM 2.0 debug transport function. More... | |
bool | Memory::get_direct_mem_ptr (tlm::tlm_generic_payload &trans, tlm::tlm_dmi &dmi_data) |
Variables | |
bool | MemoryPower::m_pow_mon |
Power monitoring. More... | |
gs::cnf::cnf_api * | MemoryPower::m_api |
GreenControl API Pointer. More... | |
gs::gs_param_array | MemoryPower::m_performance_counters |
Performance Counter Array. More... | |
gs::gs_param_array | MemoryPower::power |
Performance counter to store transaction byte reads. More... | |
sr_param< double > | MemoryPower::sta_power_norm |
Normalized static power input. More... | |
sr_param< double > | MemoryPower::int_power_norm |
Normalized internal power input (activation independent) More... | |
sr_param< double > | MemoryPower::dyn_read_energy_norm |
Normalized read access energy. More... | |
sr_param< double > | MemoryPower::dyn_write_energy_norm |
Normalized write access energy. More... | |
sr_param< double > | MemoryPower::sta_power |
Static power of module. More... | |
sr_param< double > | MemoryPower::int_power |
Internal power of module. More... | |
sr_param< double > | MemoryPower::swi_power |
Switching power of module. More... | |
sr_param< sc_core::sc_time > | MemoryPower::power_frame_starting_time |
Power frame starting time. More... | |
sr_param< double > | MemoryPower::dyn_read_energy |
Dynamic energy per read access. More... | |
sr_param< double > | MemoryPower::dyn_write_energy |
Dynamic energy per write access. More... | |
sr_param< uint64_t > | MemoryPower::dyn_reads |
Number of reads from memory (read & reset by monitor) More... | |
sr_param< uint64_t > | MemoryPower::dyn_writes |
Number of writes to memory (read & reset by monitor) More... | |
#define SR_HAS_MEMORYSTORAGE | ( | type | ) |
#define SR_HAS_MEMORYSTORAGE_GENERATOR | ( | type, | |
factory, | |||
isinstance | |||
) |
|
explicit |
void Memory::b_transport | ( | tlm::tlm_generic_payload & | gp, |
sc_time & | delay | ||
) |
TLM 2.0 blocking transport function.
References v::debug, v::error, setup::name, srAnalyse, srWarn, start, and v::uint32.
Referenced by Memory::Memory().
BaseMemory::BaseMemory | ( | ) |
References BaseMemory::reads, BaseMemory::reads32, BaseMemory::writes, and BaseMemory::writes32.
void Memory::before_end_of_elaboration | ( | ) |
gs::cnf::callback_return_type MemoryPower::dyn_reads_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
32-bit-reads counter callback
References MemoryPower::dyn_reads, GC_RETURN_OK, and BaseMemory::reads32.
Referenced by MemoryPower::MemoryPower().
gs::cnf::callback_return_type MemoryPower::dyn_reads_write_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
32-bit-reads counter callback, write
References MemoryPower::dyn_reads, GC_RETURN_OK, and BaseMemory::reads32.
Referenced by MemoryPower::MemoryPower().
gs::cnf::callback_return_type MemoryPower::dyn_writes_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
32-bit-writes counter callback
References MemoryPower::dyn_writes, GC_RETURN_OK, and BaseMemory::writes32.
Referenced by MemoryPower::MemoryPower().
gs::cnf::callback_return_type MemoryPower::dyn_writes_write_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
32-bit-writes counter callback, write
References MemoryPower::dyn_writes, GC_RETURN_OK, and BaseMemory::writes32.
Referenced by MemoryPower::MemoryPower().
void Memory::end_of_simulation | ( | ) |
SystemC end of simulation.
References setup::name, and v::report.
Implements Storage.
References BaseMemory::erase_dbg().
Referenced by AHBMem::clear_mem(), and AHBMem::dorst().
References Storage::erase(), and BaseMemory::m_storage.
Referenced by BaseMemory::erase().
MemoryPower::GC_HAS_CALLBACKS | ( | ) |
bool Memory::get_direct_mem_ptr | ( | tlm::tlm_generic_payload & | trans, |
tlm::tlm_dmi & | dmi_data | ||
) |
gs::cnf::callback_return_type Memory::m_reads_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
read counter callback
References GC_RETURN_OK.
gs::cnf::callback_return_type Memory::m_writes_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
write counter callback
References GC_RETURN_OK.
|
explicit |
MemoryPower::MemoryPower | ( | sc_module_name | name, |
MEMDevice::device_type | type = MEMDevice::SRAM , |
||
uint32_t | banks = 4 , |
||
uint32_t | bsize = 128 , |
||
uint32_t | bits = 32 , |
||
uint32_t | cols = 16 , |
||
bool | pow_mon = false |
||
) |
References MemoryPower::dyn_reads, MemoryPower::dyn_reads_cb(), MemoryPower::dyn_reads_write_cb(), MemoryPower::dyn_writes, MemoryPower::dyn_writes_cb(), MemoryPower::dyn_writes_write_cb(), MemoryPower::m_pow_mon, usi.cci.callback::post_write, usi.cci.callback::pre_read, MemoryPower::swi_power, and MemoryPower::swi_power_cb().
void MemoryPower::power_model | ( | ) |
Calculate power/energy values from normalized input data.
References CLKDevice::clock_cycle, MemoryPower::dyn_read_energy, MemoryPower::dyn_read_energy_norm, MemoryPower::dyn_write_energy, MemoryPower::dyn_write_energy_norm, MEMDevice::get_bsize(), MemoryPower::int_power, MemoryPower::int_power_norm, MemoryPower::m_pow_mon, MemoryPower::sta_power, and MemoryPower::sta_power_norm.
Implements Storage.
Referenced by MapStorage::read_block().
References BaseMemory::read_dbg(), BaseMemory::reads, and BaseMemory::reads32.
|
virtual |
Implements Storage.
References BaseMemory::read_block_dbg(), BaseMemory::reads, and BaseMemory::reads32.
Referenced by AHBMem::exec_func().
void BaseMemory::read_block_dbg | ( | const uint32_t & | addr, |
uint8_t * | data, | ||
const uint32_t & | len | ||
) | const |
References BaseMemory::m_storage, and Storage::read_block().
Referenced by BaseMemory::read_block(), and BaseMemory::scireg_read().
References BaseMemory::m_storage, and Storage::read().
Referenced by BaseMemory::read().
void BaseMemory::set_storage | ( | std::string | implementation, |
uint32_t | size | ||
) |
References SrModuleRegistry::create_object_by_name(), BaseMemory::m_storage, Storage::set_size(), and srError.
Referenced by AHBMem::before_end_of_elaboration().
SR_HAS_MEMORYSTORAGE | ( | MapStorage | ) |
SR_HAS_MEMORYSTORAGE | ( | ArrayStorage | ) |
SR_HAS_MODULE | ( | Memory | ) |
void Memory::start_of_simulation | ( | ) |
SystemC start of simulation callback.
gs::cnf::callback_return_type MemoryPower::swi_power_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
Dynamic/Switching power callback.
References MemoryPower::dyn_read_energy, MemoryPower::dyn_write_energy, GC_RETURN_OK, MemoryPower::power_frame_starting_time, BaseMemory::reads32, MemoryPower::swi_power, and BaseMemory::writes32.
Referenced by MemoryPower::MemoryPower().
unsigned int Memory::transport_dbg | ( | tlm::tlm_generic_payload & | gp | ) |
TLM 2.0 debug transport function.
References v::debug, setup::name, and v::uint32.
Implements Storage.
Referenced by usi.shell.console.Console::interact().
Implements Storage.
Referenced by usi.shell.console.Console::interact(), and MapStorage::write_block().
References BaseMemory::write_dbg(), BaseMemory::writes, and BaseMemory::writes32.
Referenced by usi.shell.console.Console::interact().
|
virtual |
Implements Storage.
|
virtual |
Implements Storage.
References i, and MapStorage::write().
References BaseMemory::write_block_dbg(), BaseMemory::writes, and BaseMemory::writes32.
Referenced by AHBMem::exec_func().
void BaseMemory::write_block_dbg | ( | const uint32_t & | addr, |
const uint8_t * | data, | ||
const uint32_t & | len | ||
) |
References BaseMemory::m_storage, and Storage::write_block().
Referenced by BaseMemory::scireg_write(), and BaseMemory::write_block().
References BaseMemory::m_storage, and Storage::write().
Referenced by BaseMemory::write(), and AHBMem::writeByteDBG().
ArrayStorage::~ArrayStorage | ( | ) |
BaseMemory::~BaseMemory | ( | ) |
References BaseMemory::m_storage.
MapStorage::~MapStorage | ( | ) |
Memory::~Memory | ( | ) |
Destructor.
MemoryPower::~MemoryPower | ( | ) |
Dynamic energy per read access.
Referenced by MemoryPower::power_model(), and MemoryPower::swi_power_cb().
Normalized read access energy.
Referenced by MemoryPower::power_model().
Number of reads from memory (read & reset by monitor)
Referenced by MemoryPower::dyn_reads_cb(), MemoryPower::dyn_reads_write_cb(), and MemoryPower::MemoryPower().
Dynamic energy per write access.
Referenced by MemoryPower::power_model(), and MemoryPower::swi_power_cb().
Normalized write access energy.
Referenced by MemoryPower::power_model().
Number of writes to memory (read & reset by monitor)
Referenced by MemoryPower::dyn_writes_cb(), MemoryPower::dyn_writes_write_cb(), and MemoryPower::MemoryPower().
Internal power of module.
Referenced by MemoryPower::power_model().
Normalized internal power input (activation independent)
Referenced by MemoryPower::power_model().
gs::cnf::cnf_api* MemoryPower::m_api |
GreenControl API Pointer.
gs::gs_param_array MemoryPower::m_performance_counters |
Performance Counter Array.
bool MemoryPower::m_pow_mon |
Power monitoring.
Referenced by MemoryPower::MemoryPower(), and MemoryPower::power_model().
gs::gs_param_array MemoryPower::power |
Performance counter to store transaction byte reads.
Performance counter to store the transaction byte writes ***************************************************** Power Modeling Parameters Parameter array for power data output
sr_param<sc_core::sc_time> MemoryPower::power_frame_starting_time |
Power frame starting time.
Referenced by MemoryPower::swi_power_cb().
Static power of module.
Referenced by MemoryPower::power_model().
Normalized static power input.
Referenced by MemoryPower::power_model().
Switching power of module.
Referenced by MemoryPower::MemoryPower(), and MemoryPower::swi_power_cb().