28 #ifndef __SYSTEMC_SC_PORT_WRAPPER_HH__ 29 #define __SYSTEMC_SC_PORT_WRAPPER_HH__ 32 #include <type_traits> 44 template <
typename IF>
46 template <
typename IF>
48 template <
typename IF>
51 template <
typename IF>
70 panic(
"sc_port can't be unbound.");
79 }
else if (
auto* iface =
83 fatal(
"Attempt to bind sc_port %s to incompatible port %s.",
93 template <
typename IF>
98 :
Port(name, id), iface_(i)
110 panic(
"sc_interface can't be unbound.");
119 "Attempt to bind sc_interface %s to incompatible port %s.",
120 name(), peer.name());
132 template <
typename IF>
151 panic(
"sc_export cannot be unbound.");
159 "Attempt to bind sc_export %s to incompatible port %s.",
160 name(), peer.name());
172 #endif // __SYSTEMC_SC_PORT_WRAPPER_HH__ #define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
void unbind() override
Dettach from a peer port.
void bind(::Port &peer) override
void unbind() override
Dettach from a peer port.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
void bind(::Port &peer) override
void unbind() override
Dettach from a peer port.
ScPortWrapper(ScPort &p, const std::string &name, PortID id)
ScExportWrapper(ScExport &p, const std::string &name, PortID id)
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 bind(::Port &peer) override
ScInterfaceWrapper(IF &i, const std::string name, PortID id)