32#ifndef __SIMPLE_LT_INITIATOR3_DMI_H__
33#define __SIMPLE_LT_INITIATOR3_DMI_H__
36#include "tlm_utils/simple_initiator_socket.h"
57 unsigned int nrOfTransactions = 0x5,
58 unsigned int baseAddress = 0x0) :
105 std::cout <<
name() <<
": Send write request: A = 0x"
107 <<
", D = 0x" <<
mData << std::dec
111 std::cout <<
name() <<
": Send read request: A = 0x"
112 << std::hex << (
unsigned int)trans.
get_address() << std::dec
120 std::cout <<
name() <<
": Received error response @ "
124 std::cout <<
name() <<
": Received ok response";
126 std::cout <<
": D = 0x" << std::hex <<
mData << std::dec;
166 if((trans.
get_address() < dmi_data.first.get_start_address()) ||
167 (trans.
get_address() > dmi_data.first.get_end_address()) )
171 socket->get_direct_mem_ptr(trans,
176 if (dmi_data.second &&
177 (trans.
get_address() >= dmi_data.first.get_start_address()) &&
178 (trans.
get_address() <= dmi_data.first.get_end_address()) )
188 *(
unsigned int*)&dmi_data.first.get_dmi_ptr()[tmp] =
mData;
192 mData = *(
unsigned int*)&dmi_data.first.get_dmi_ptr()[tmp];
199 wait(dmi_data.first.get_write_latency());
202 wait(dmi_data.first.get_read_latency());
207 socket->b_transport(trans, t);
SimpleLTInitiator3_dmi(sc_core::sc_module_name name, unsigned int nrOfTransactions=0x5, unsigned int baseAddress=0x0)
tlm::tlm_phase phase_type
unsigned int mBaseAddress
unsigned int mNrOfTransactions
tlm::tlm_sync_enum sync_enum_type
tlm_utils::simple_initiator_socket< SimpleLTInitiator3_dmi > initiator_socket_type
void logStartTransation(transaction_type &trans)
tlm::tlm_generic_payload transaction_type
SC_HAS_PROCESS(SimpleLTInitiator3_dmi)
std::pair< dmi_type, bool > mDMIDataWrites
std::pair< dmi_type, bool > mDMIDataReads
unsigned int mTransactionCount
sc_core::sc_event mEndEvent
void logEndTransaction(transaction_type &trans)
bool initTransaction(transaction_type &trans)
void invalidate_direct_mem_ptr(sc_dt::uint64 start_range, sc_dt::uint64 end_range)
std::pair< dmi_type, bool > & getDMIData(const transaction_type &trans)
initiator_socket_type socket
const char * name() const
void set_data_ptr(unsigned char *data)
void set_dmi_allowed(bool dmi_allowed)
void set_response_status(const tlm_response_status response_status)
void set_address(const sc_dt::uint64 address)
void set_command(const tlm_command command)
sc_dt::uint64 get_address() const
tlm_response_status get_response_status() const
void set_data_length(const unsigned int length)
tlm_command get_command() const
void set_streaming_width(const unsigned int streaming_width)
void register_invalidate_direct_mem_ptr(MODULE *mod, void(MODULE::*cb)(sc_dt::uint64, sc_dt::uint64))
const sc_time SC_ZERO_TIME
const sc_time & sc_time_stamp()
@ TLM_INCOMPLETE_RESPONSE