20 #ifndef __SIMPLE_LT_TARGET2_H__ 21 #define __SIMPLE_LT_TARGET2_H__ 24 #include "tlm_utils/simple_target_socket.h" 71 std::cout <<
name() <<
": ERROR, extension not present" << std::endl;
75 std::cout <<
name() <<
": OK, extension data = " 76 << tmp_ext->
m_data << std::endl;
83 std::cout <<
name() <<
": Received write request: A = 0x" 84 << std::hex << (
unsigned int)address
85 <<
", D = 0x" << data << std::dec
88 *
reinterpret_cast<unsigned int*
>(&
mMem[address]) = data;
92 std::cout <<
name() <<
": Received read request: A = 0x" 93 << std::hex << (
unsigned int)address << std::dec
96 data = *
reinterpret_cast<unsigned int*
>(&
mMem[address]);
115 unsigned int num_bytes;
117 num_bytes = 400 - tmp;
123 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
128 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
147 std::cout <<
name() <<
": get_direct_mem_ptr OK, extension data = " 148 <<tmp_ext->
m_data << std::endl;
152 std::cout <<
name() <<
", get_direct_mem_ptr ERROR: " 153 <<
"didn't get pointer to extension" 178 socket->invalidate_direct_mem_ptr(start_address, end_address);
void set_response_status(const tlm_response_status response_status)
void get_extension(T *&ext) const
void invalidate_dmi_method()
unsigned int transport_dbg(transaction_type &r)
void set_dmi_ptr(unsigned char *p)
tlm_utils::simple_target_socket< SimpleLTTarget_ext, 32, my_extended_payload_types > target_socket_type
void set_start_address(sc_dt::uint64 addr)
target_socket_type socket
const char * name() const
sc_dt::uint64 get_address() const
tlm::tlm_sync_enum sync_enum_type
sync_enum_type myNBTransport(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
tlm::tlm_phase phase_type
unsigned char * get_data_ptr() const
bool myGetDMIPtr(transaction_type &trans, tlm::tlm_dmi &dmi_data)
unsigned int get_data_length() const
SimpleLTTarget_ext(sc_core::sc_module_name name, sc_core::sc_time invalidate_dmi_time=sc_core::sc_time(25, sc_core::SC_NS))
SC_HAS_PROCESS(SimpleLTTarget_ext)
void set_read_latency(sc_core::sc_time t)
void register_get_direct_mem_ptr(MODULE *mod, bool(MODULE::*cb)(transaction_type &, tlm::tlm_dmi &))
void set_write_latency(sc_core::sc_time t)
const sc_time & sc_time_stamp()
void register_transport_dbg(MODULE *mod, unsigned int(MODULE::*cb)(transaction_type &))
void set_dmi_allowed(bool dmi_allowed)
void register_nb_transport_fw(MODULE *mod, sync_enum_type(MODULE::*cb)(transaction_type &, phase_type &, sc_core::sc_time &))
tlm_command get_command() const
tlm::tlm_generic_payload transaction_type
sc_core::sc_time m_invalidate_dmi_time
void set_end_address(sc_dt::uint64 addr)
sc_core::sc_event m_invalidate_dmi_event