20 #ifndef __SIMPLE_LT_TARGET2_H__ 21 #define __SIMPLE_LT_TARGET2_H__ 24 #include "tlm_utils/passthrough_target_socket.h" 59 assert(address < 400);
63 std::cout <<
name() <<
": Received write request: A = 0x" 64 << std::hex << (
unsigned int)address
65 <<
", D = 0x" << data << std::dec
68 *
reinterpret_cast<unsigned int*
>(&
mMem[address]) = data;
72 std::cout <<
name() <<
": Received read request: A = 0x" 73 << std::hex << (
unsigned int)address << std::dec
76 data = *
reinterpret_cast<unsigned int*
>(&
mMem[address]);
104 unsigned int num_bytes;
106 num_bytes = 400 - tmp;
112 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
117 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
tlm_utils::passthrough_target_socket< SimpleLTTarget2 > target_socket_type
void set_response_status(const tlm_response_status response_status)
void register_get_direct_mem_ptr(MODULE *mod, bool(MODULE::*cb)(transaction_type &, tlm::tlm_dmi &))
tlm::tlm_sync_enum sync_enum_type
void set_dmi_ptr(unsigned char *p)
void set_start_address(sc_dt::uint64 addr)
unsigned int transport_dbg(transaction_type &r)
sync_enum_type myNBTransport(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
const char * name() const
sc_dt::uint64 get_address() const
tlm::tlm_generic_payload transaction_type
void myBTransport(transaction_type &trans, sc_core::sc_time &t)
SimpleLTTarget2(sc_core::sc_module_name name)
unsigned char * get_data_ptr() const
unsigned int get_data_length() const
void register_nb_transport_fw(MODULE *mod, sync_enum_type(MODULE::*cb)(transaction_type &, phase_type &, sc_core::sc_time &))
bool myGetDMIPtr(transaction_type &trans, tlm::tlm_dmi &dmi_data)
void register_b_transport(MODULE *mod, void(MODULE::*cb)(transaction_type &, sc_core::sc_time &))
void set_read_latency(sc_core::sc_time t)
void set_write_latency(sc_core::sc_time t)
const sc_time & sc_time_stamp()
void set_dmi_allowed(bool dmi_allowed)
target_socket_type socket
tlm::tlm_phase phase_type
tlm_command get_command() const
void set_end_address(sc_dt::uint64 addr)