Go to the documentation of this file.
44 #include "debug/ExternalPort.hh"
85 const std::string &name_,
87 const std::string &port_data)
91 DPRINTF(ExternalPort,
"finding stub port '%s'\n", port_data);
100 unsigned int M5_VAR_USED size = packet->
getSize();
103 " data: ...\n", packet->
getAddr(), size);
152 fatal(
"StubSlavePort: function: %s\n", __func__);
169 fatal(
"StubSlavePort: unimplemented function: %s\n", __func__);
172 std::map<std::string, ExternalSlave::Handler *>
197 if (if_name ==
"port") {
211 fatal(
"%s: Can't find external port type: %s"
225 fatal(
"ExternalSlave %s: externalPort not set!\n",
name());
227 fatal(
"ExternalSlave %s is unconnected!\n",
name());
234 ExternalSlaveParams::create()
#define fatal(...)
This implements a cprintf based fatal() function.
bool mustRetry
Received a new request while processing a first.
ExternalPort(const std::string &name_, ExternalSlave &owner_)
EventFunctionWrapper responseEvent
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
std::string portName
Name of the bound port.
uint64_t Tick
Tick count type.
ExternalSlave::ExternalPort * getExternalPort(const std::string &name_, ExternalSlave &owner, const std::string &port_data)
Create or find an external port which can be bound.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool recvTimingSnoopResp(PacketPtr packet)
Receive a timing snoop response from the peer.
void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
Implement a ‘stub’ port which just responds to requests by printing a message.
static void registerHandler(const std::string &handler_name, Handler *handler)
Register a handler which can provide ports with port_type == handler_name.
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
ExternalPort * externalPort
The peer port for the gem5 port "port".
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Port interface.
Derive from this class to create an external port interface.
void schedule(Event &event, Tick when)
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
StubSlavePort(const std::string &name_, ExternalSlave &owner_)
Ports are used to interface objects to each other.
void recvFunctionalSnoop(PacketPtr packet)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
const std::string name() const
Return port name (for DPRINTF).
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
const Params * params() const
const std::string & name()
PacketPtr responsePacket
Stub can handle a single request at a time.
bool recvTimingReq(PacketPtr packet)
Receive a timing request from the peer.
#define DDUMP(x, data, count)
DPRINTF is a debugging trace facility that allows one to selectively enable tracing statements.
virtual const std::string name() const
static std::map< std::string, Handler * > portHandlers
Registered handlers.
std::string portData
Handler-specific port configuration.
AddrRangeList addrRanges
The Range of addresses supported by the devices on the external side of this port.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool isConnected() const
Is this port currently connected to a peer?
void recvFunctional(PacketPtr packet)
Receive a functional request packet from the peer.
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
void processResponseEvent()
void sendRangeChange() const
Called by the owner to send a range change.
AddrRangeList getAddrRanges() const
Any or all of recv...
const T * getConstPtr() const
std::string portType
Key to select a port handler.
ExternalSlave(ExternalSlaveParams *params)
Tick recvAtomic(PacketPtr packet)
Receive an atomic request packet from the peer.
Tick curTick()
The current simulated tick.
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17