Transaction-Level Modeling Framework for Space Applications
Files | |
file | ahbmem.cpp |
file | ahbmem.h |
Classes | |
class | AHBMem |
Functions | |
SR_HAS_MODULE (AHBMem) | |
AHBMem::AHBMem (const ModuleName nm, uint16_t haddr_=0, uint16_t hmask_=0, AbstractionLayer ambaLayer=amba::amba_LT, uint32_t slave_id=0, bool cacheable=1, uint32_t wait_states=0, bool pow_mon=false) | |
Constructor for the test bench memory class. More... | |
AHBMem::~AHBMem () | |
Destructor. More... | |
void | AHBMem::init_generics () |
Initialize generics. More... | |
void | AHBMem::dorst () |
Reset callback. More... | |
uint32_t | AHBMem::exec_func (tlm::tlm_generic_payload &gp, sc_time &delay, bool debug=false) |
Encapsulated functionality. More... | |
sc_core::sc_time | AHBMem::get_clock () |
Returns clock cycle time from child. More... | |
bool | AHBMem::get_direct_mem_ptr (tlm::tlm_generic_payload &trans, tlm::tlm_dmi &dmi_data) |
void | AHBMem::writeByteDBG (const uint32_t addr, const uint8_t byte) |
Method to write a byte into the memory. More... | |
void | AHBMem::before_end_of_elaboration () |
Creates the memory backend. More... | |
void | AHBMem::start_of_simulation () |
Called by scheduler at start of simulation. More... | |
void | AHBMem::power_model () |
Calculate power/energy values from normalized input data. More... | |
gs::cnf::callback_return_type | AHBMem::sta_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
Static power callback. More... | |
gs::cnf::callback_return_type | AHBMem::int_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
Dynamic/Internal power callback. More... | |
gs::cnf::callback_return_type | AHBMem::swi_power_cb (gs::gs_param_base &changed_param, gs::cnf::callback_type reason) |
Dynamic/Switching power callback. More... | |
void | AHBMem::end_of_simulation () |
Generates execution statistic at end of simulation. More... | |
AHBMem::AHBMem | ( | const ModuleName | nm, |
uint16_t | haddr_ = 0 , |
||
uint16_t | hmask_ = 0 , |
||
AbstractionLayer | ambaLayer = amba::amba_LT , |
||
uint32_t | slave_id = 0 , |
||
bool | cacheable = 1 , |
||
uint32_t | wait_states = 0 , |
||
bool | pow_mon = false |
||
) |
Constructor for the test bench memory class.
Constructor.
Constructor
haddr | AHB address of the AHB slave socket (12 bit) |
hmask | AHB address mask (12 bit) |
ambaLayer | Abstraction layer used (AT/LT) |
infile | File name of a text file to initialize the memory from |
addr | Start address for memory initilization |
References AHBSlave<>::ahb, AHBDevice< BaseModule< DefaultBase > >::get_ahb_base_addr(), AHBDevice< BaseModule< DefaultBase > >::get_ahb_size(), AHBMem::get_direct_mem_ptr(), AHBMem::init_generics(), AHBMem::int_power, AHBMem::int_power_cb(), usi.cci.callback::pre_read, srInfo, AHBMem::sta_power, AHBMem::sta_power_cb(), AHBMem::swi_power, and AHBMem::swi_power_cb().
void AHBMem::before_end_of_elaboration | ( | ) |
Creates the memory backend.
References AHBDevice< BaseModule< DefaultBase > >::get_ahb_bar_size(), and BaseMemory::set_storage().
|
virtual |
Reset callback.
Reimplemented from CLKDevice.
References BaseMemory::erase(), and AHBDevice< BaseModule< DefaultBase > >::get_ahb_size().
void AHBMem::end_of_simulation | ( | ) |
Generates execution statistic at end of simulation.
References setup::name, AHBSlave<>::print_transport_statistics(), and v::report.
|
virtual |
Encapsulated functionality.
Implements AHBSlave<>.
References AHBSlave<>::ahb, Storage::allow_dmi_rw(), CLKDevice::clock_cycle, AHBMem::dyn_reads, AHBMem::dyn_writes, AHBDevice< BaseModule< DefaultBase > >::get_ahb_bar_relative_addr(), BaseMemory::m_storage, setup::name, BaseMemory::read_block(), srDebug, srError, srWarn, trans, and BaseMemory::write_block().
|
virtual |
bool AHBMem::get_direct_mem_ptr | ( | tlm::tlm_generic_payload & | trans, |
tlm::tlm_dmi & | dmi_data | ||
) |
References Storage::allow_dmi_rw(), AHBDevice< BaseModule< DefaultBase > >::get_ahb_bar_size(), Storage::get_dmi_ptr(), v::info, BaseMemory::m_storage, setup::name, and v::uint32.
Referenced by AHBMem::AHBMem().
|
virtual |
Initialize generics.
Reimplemented from BaseModule< DefaultBase >.
References sr_param_base::add_properties().
Referenced by AHBMem::AHBMem().
gs::cnf::callback_return_type AHBMem::int_power_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
void AHBMem::power_model | ( | ) |
Calculate power/energy values from normalized input data.
References CLKDevice::clock_cycle, AHBMem::dyn_read_energy, AHBMem::dyn_read_energy_norm, AHBMem::dyn_write_energy, AHBMem::dyn_write_energy_norm, AHBDevice< BaseModule< DefaultBase > >::get_ahb_size(), AHBMem::int_power, AHBMem::int_power_norm, AHBMem::sta_power, and AHBMem::sta_power_norm.
Referenced by AHBMem::start_of_simulation().
SR_HAS_MODULE | ( | AHBMem | ) |
gs::cnf::callback_return_type AHBMem::sta_power_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
void AHBMem::start_of_simulation | ( | ) |
Called by scheduler at start of simulation.
References AHBMem::power_model().
gs::cnf::callback_return_type AHBMem::swi_power_cb | ( | gs::gs_param_base & | changed_param, |
gs::cnf::callback_type | reason | ||
) |
Dynamic/Switching power callback.
References AHBMem::dyn_read_energy, AHBMem::dyn_reads, AHBMem::dyn_write_energy, AHBMem::dyn_writes, GC_RETURN_OK, AHBMem::power_frame_starting_time, and AHBMem::swi_power.
Referenced by AHBMem::AHBMem().
Method to write a byte into the memory.
addr | Write address |
byte | Write data |
References BaseMemory::write_dbg().
AHBMem::~AHBMem | ( | ) |
Destructor.