30 #ifndef __SYSTEMC_TLM_PORT_WRAPPER_HH__ 31 #define __SYSTEMC_TLM_PORT_WRAPPER_HH__ 40 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
44 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
48 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
68 auto *target =
dynamic_cast<TargetWrapper *
>(&peer);
69 fatal_if(!target,
"Attempt to bind TLM initiator socket %s to " 70 "incompatible port %s.",
name(), peer.name());
79 panic(
"TLM sockets can't be unbound.");
86 template <
unsigned int BUSWIDTH,
typename FW_IF,
typename BW_IF,
int N,
98 Port(_name, _id), _target(t)
112 panic(
"TLM sockets can't be unbound.");
119 template <
unsigned int BUSWIDTH=32,
126 template <
unsigned int BUSWIDTH=32,
135 #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.