28#ifndef __SYSTEMC_EXT_CORE_SC_PORT_HH__
29#define __SYSTEMC_EXT_CORE_SC_PORT_HH__
85 const char *
kind()
const {
return "sc_port_base"; }
92 friend class ::sc_gem5::Module;
103 void report_error(
const char *
id,
const char *add_msg)
const;
106 friend class ::sc_gem5::Port;
107 friend class ::sc_gem5::Kernel;
119#pragma GCC diagnostic push
120#pragma GCC diagnostic ignored "-Woverloaded-virtual"
153 if (n < 0 || n >=
size()) {
162 if (n < 0 || n >=
size()) {
202 IF *
interface = dynamic_cast<IF *>(&i);
224 if (n < 0 || n >=
size()) {
233 IF *
interface = dynamic_cast<IF *>(iface);
235 for (
unsigned i = 0; i <
_interfaces.size(); i++) {
238 "interface already bound to port");
251#pragma GCC diagnostic pop
253template <
class IF,
int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND>
295 virtual const char *
kind()
const override {
return "sc_port"; }
const char * name() const
sc_port_b(const char *name, int n, sc_port_policy p)
void start_of_simulation() override
void end_of_simulation() override
std::vector< IF * > _interfaces
const sc_interface * get_interface() const
virtual void bind(sc_port_b< IF > &p)
sc_interface * _gem5Interface(int n) const override
int vbind(sc_port_base &pb) override
int vbind(sc_interface &i) override
sc_interface * get_interface()
sc_port_b(const sc_port_b< IF > &)
sc_port_b(int n, sc_port_policy p)
void before_end_of_elaboration() override
const char * _ifTypeName() const override
void _gem5AddInterface(sc_interface *iface) override
sc_port_b< IF > & operator=(const sc_port_b< IF > &)
void end_of_elaboration() override
const char * kind() const
virtual const char * _ifTypeName() const =0
virtual sc_port_policy _portPolicy() const =0
virtual sc_interface * _gem5Interface(int n) const =0
virtual int vbind(sc_port_base &)=0
virtual void _gem5AddInterface(sc_interface *i)=0
virtual void before_end_of_elaboration()=0
::sc_gem5::Port * _gem5Port
virtual void start_of_simulation()=0
void bind(sc_interface &)
void report_error(const char *id, const char *add_msg) const
virtual void end_of_simulation()=0
virtual int vbind(sc_interface &)=0
void warn_port_constructor() const
virtual void end_of_elaboration()=0
sc_port_base(const char *name, int n, sc_port_policy p)
sc_port(const char *name, sc_port< IF, N, P > &parent)
sc_port(const sc_port< IF, N, P > &)
sc_port(const char *name, const IF &interface)
sc_port(const char *name)
sc_port(sc_port< IF, N, P > &parent)
sc_port(const IF &interface)
virtual sc_port_policy _portPolicy() const override
sc_port< IF, N, P > & operator=(const sc_port< IF, N, P > &)
sc_port(const char *name, sc_port_b< IF > &parent)
sc_port(sc_port_b< IF > &parent)
virtual const char * kind() const override
std::vector< sc_trace_params * > sc_trace_params_vec
sc_trace_params(sc_trace_file *tf, const std::string &name)