28 #ifndef __SYSTEMC_TLM_PORT_WRAPPER_HH__ 29 #define __SYSTEMC_TLM_PORT_WRAPPER_HH__ 38 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
42 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
46 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
66 auto *target =
dynamic_cast<TargetWrapper *
>(&peer);
67 fatal_if(!target,
"Attempt to bind TLM initiator socket %s to " 68 "incompatible port %s.",
name(), peer.name());
77 panic(
"TLM sockets can't be unbound.");
84 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
96 Port(_name, _id), _target(t)
110 panic(
"TLM sockets can't be unbound.");
117 template <
unsigned int BUSWIDTH=32,
124 template <
unsigned int BUSWIDTH=32,
133 #endif //__SYSTEMC_TLM_PORT_WRAPPER_HH__ #define panic(...)
This implements a cprintf based panic() function.
tlm::tlm_base_target_socket< BUSWIDTH, FW_IF, BW_IF, N, POL > TargetSocket
void unbind() override
Dettach from a peer port.
TlmTargetBaseWrapper(TargetSocket &t, const std::string &_name, PortID _id)
tlm::tlm_base_initiator_socket< BUSWIDTH, FW_IF, BW_IF, N, POL > InitiatorSocket
InitiatorSocket::base_target_socket_type TargetSocket
virtual void bind(base_target_socket_type &s)
void bind(::Port &peer) override
void bind(::Port &peer) override
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
TlmTargetBaseWrapper< BUSWIDTH, FW_IF, BW_IF, N, POL > TargetWrapper
InitiatorSocket & _initiator
TlmInitiatorBaseWrapper(InitiatorSocket &i, const std::string &_name, PortID _id)
InitiatorSocket & initiator()
const std::string name() const
Return port name (for DPRINTF).
void bind(::sc_core::sc_interface *interface)
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void unbind() override
Dettach from a peer port.