Go to the documentation of this file.
20 #ifndef __SIMPLEBUSLT_H__
21 #define __SIMPLEBUSLT_H__
26 #include "tlm_utils/simple_target_socket.h"
27 #include "tlm_utils/simple_initiator_socket.h"
29 template <
int NR_OF_INITIATORS,
int NR_OF_TARGETS>
48 for (
unsigned int i = 0;
i < NR_OF_INITIATORS; ++
i) {
53 for (
unsigned int i = 0;
i < NR_OF_TARGETS; ++
i) {
66 return (
unsigned int)address >> 28;
101 assert(portId < NR_OF_TARGETS);
105 (*decodeSocket)->b_transport(trans,
t);
111 unsigned int portId =
decode(trans.get_address());
112 assert(portId < NR_OF_TARGETS);
114 trans.set_address( trans.get_address() &
getAddressMask(portId) );
116 return (*decodeSocket)->transport_dbg(trans);
124 if (low > addressMask) {
129 low += addressOffset;
130 if (high > addressMask) {
131 high = addressOffset + addressMask;
134 high += addressOffset;
145 unsigned int portId =
decode(address);
146 assert(portId < NR_OF_TARGETS);
150 trans.set_address(maskedAddress);
153 (*decodeSocket)->get_direct_mem_ptr(trans, dmi_data);
181 if (!
limitRange(port_id, start_range, end_range)) {
186 for (
unsigned int i = 0;
i < NR_OF_INITIATORS; ++
i) {
187 (
target_socket[
i])->invalidate_direct_mem_ptr(start_range, end_range);
void register_transport_dbg(MODULE *mod, unsigned int(MODULE::*cb)(int id, transaction_type &), int id)
void register_invalidate_direct_mem_ptr(MODULE *mod, void(MODULE::*cb)(int, sc_dt::uint64, sc_dt::uint64), int id)
target_socket_type target_socket[NR_OF_INITIATORS]
void initiatorBTransport(int SocketId, transaction_type &trans, sc_core::sc_time &t)
tlm_utils::simple_target_socket_tagged< SimpleBusLT > target_socket_type
unsigned int transportDebug(int SocketId, transaction_type &trans)
tlm::tlm_generic_payload transaction_type
tlm::tlm_sync_enum sync_enum_type
initiator_socket_type initiator_socket[NR_OF_TARGETS]
tlm_utils::simple_initiator_socket_tagged< SimpleBusLT > initiator_socket_type
unsigned int decode(const sc_dt::uint64 &address)
void set_end_address(sc_dt::uint64 addr)
tlm::tlm_phase phase_type
sc_dt::uint64 get_end_address() const
sc_dt::uint64 get_start_address() const
sc_dt::uint64 getAddressMask(unsigned int portId)
bool getDMIPointer(int SocketId, transaction_type &trans, tlm::tlm_dmi &dmi_data)
sc_dt::uint64 getAddressOffset(unsigned int portId)
bool limitRange(unsigned int portId, sc_dt::uint64 &low, sc_dt::uint64 &high)
void register_b_transport(MODULE *mod, void(MODULE::*cb)(int id, transaction_type &, sc_core::sc_time &), int id)
SC_HAS_PROCESS(SimpleBusLT)
const char * name() const
void set_address(const sc_dt::uint64 address)
unsigned int getPortId(const sc_dt::uint64 &address)
void set_start_address(sc_dt::uint64 addr)
void invalidateDMIPointers(int port_id, sc_dt::uint64 start_range, sc_dt::uint64 end_range)
void register_get_direct_mem_ptr(MODULE *mod, bool(MODULE::*cb)(int id, transaction_type &, tlm::tlm_dmi &), int id)
SimpleBusLT(sc_core::sc_module_name name)
sc_dt::uint64 get_address() const
Generated on Wed Sep 30 2020 14:02:16 for gem5 by doxygen 1.8.17