dont_initialize();
}
+void
+Target::check_address(unsigned long long int addr)
+{
+ if (addr < offset || addr >= offset + size)
+ SC_REPORT_FATAL("Target", "Address out of range. Did you set an "
+ "appropriate size and offset?");
+}
+
void
Target::b_transport(tlm::tlm_generic_payload& trans, sc_time& delay)
{
unsigned int
Target::transport_dbg(tlm::tlm_generic_payload& trans)
{
+ check_address(trans.get_address());
+
tlm::tlm_command cmd = trans.get_command();
sc_dt::uint64 adr = trans.get_address() - offset;
unsigned char* ptr = trans.get_data_ptr();
void
Target::execute_transaction(tlm::tlm_generic_payload& trans)
{
+ check_address(trans.get_address());
+
tlm::tlm_command cmd = trans.get_command();
sc_dt::uint64 adr = trans.get_address() - offset;
unsigned char* ptr = trans.get_data_ptr();
/** Method process that runs on target_done_event */
void execute_transaction_process();
+ /** Helping function that checks if a requested address is with range */
+ void check_address(unsigned long long int addr);
+
/** Helping Variables **/
unsigned long long int size;
unsigned offset;