Go to the documentation of this file.
44 #include "debug/ExternalPort.hh"
47 std::map<std::string, ExternalMaster::Handler *>
53 portName(params->
name +
".port"),
54 portType(params->port_type),
55 portData(params->port_data),
56 id(params->
system->getRequestorId(this))
62 if (if_name ==
"port") {
76 fatal(
"%s: Can't find external port type: %s"
90 fatal(
"ExternalMaster %s: externalPort not set!\n",
name());
92 fatal(
"ExternalMaster %s is unconnected!\n",
name());
97 ExternalMasterParams::create()
#define fatal(...)
This implements a cprintf based fatal() function.
ExternalMaster(ExternalMasterParams *params)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Port interface.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
std::string portName
Name of the bound port.
std::string portData
Handler-specific port configuration.
std::string portType
Key to select a port handler.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
Ports are used to interface objects to each other.
ExternalPort * externalPort
The peer port for the gem5 port "port".
static void registerHandler(const std::string &handler_name, Handler *handler)
Register a handler which can provide ports with port_type == handler_name.
const std::string & name()
Derive from this class to create an external port interface.
virtual const std::string name() const
static std::map< std::string, Handler * > portHandlers
Registered handlers.
bool isConnected() const
Is this port currently connected to a peer?
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17