30 #ifndef __SYSTEMC_SC_PORT_WRAPPER_HH__ 31 #define __SYSTEMC_SC_PORT_WRAPPER_HH__ 34 #include <type_traits> 46 template <
typename IF>
48 template <
typename IF>
50 template <
typename IF>
53 template <
typename IF>
72 panic(
"sc_port can't be unbound.");
81 }
else if (
auto* iface =
85 fatal(
"Attempt to bind sc_port %s to incompatible port %s.",
95 template <
typename IF>
100 :
Port(name, id), iface_(i)
112 panic(
"sc_interface can't be unbound.");
121 "Attempt to bind sc_interface %s to incompatible port %s.",
122 name(), peer.name());
134 template <
typename IF>
153 panic(
"sc_export cannot be unbound.");
161 "Attempt to bind sc_export %s to incompatible port %s.",
162 name(), peer.name());
174 #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)