Go to the documentation of this file.
20 #ifndef __EXPLICIT_AT_TARGET_H__
21 #define __EXPLICIT_AT_TARGET_H__
24 #include "tlm_utils/simple_target_socket.h"
60 assert(address < 400);
66 unsigned int&
data = *
reinterpret_cast<unsigned int*
>(trans.get_data_ptr());
68 std::cout <<
name() <<
": Received write request: A = 0x"
69 << std::hex << (
unsigned int)address <<
", D = 0x" <<
data
73 *
reinterpret_cast<unsigned int*
>(&
mMem[address]) =
data;
84 std::cout <<
name() <<
": Received read request: A = 0x"
85 << std::hex << (
unsigned int)address
89 data = *
reinterpret_cast<unsigned int*
>(&
mMem[address]);
125 assert(address < 400);
127 *
reinterpret_cast<unsigned int*
>(&
mMem[address]);
144 if (
r.get_address() >= 400)
return 0;
146 unsigned int tmp = (int)
r.get_address();
147 unsigned int num_bytes;
148 if (tmp +
r.get_data_length() >= 400) {
149 num_bytes = 400 - tmp;
152 num_bytes =
r.get_data_length();
154 if (!
r.is_read() && !
r.is_write()) {
158 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
163 for (
unsigned int i = 0;
i < num_bytes; ++
i) {
164 mMem[
i + tmp] =
r.get_data_ptr()[
i];
171 unsigned char mMem[400];
transaction_type * mCurrentTransaction
target_socket_type socket
tlm::tlm_generic_payload transaction_type
tlm::tlm_phase phase_type
SC_HAS_PROCESS(ExplicitATTarget)
const sc_time SC_ZERO_TIME
tlm_utils::simple_target_socket< ExplicitATTarget > target_socket_type
void register_transport_dbg(MODULE *mod, unsigned int(MODULE::*cb)(transaction_type &))
tlm::tlm_sync_enum sync_enum_type
sc_core::sc_event mResponseEvent
tlm_command get_command() const
unsigned int transport_dbg(transaction_type &r)
const char * name() const
sync_enum_type myNBTransport(transaction_type &trans, phase_type &phase, sc_core::sc_time &t)
sc_dt::uint64 get_address() const
const sc_time & sc_time_stamp()
unsigned char * get_data_ptr() const
ExplicitATTarget(sc_core::sc_module_name name)
void register_nb_transport_fw(MODULE *mod, sync_enum_type(MODULE::*cb)(transaction_type &, phase_type &, sc_core::sc_time &))
void set_response_status(const tlm_response_status response_status)
Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17