Go to the documentation of this file.
45 #include "debug/ExternalPort.hh"
89 const std::string &name_,
91 const std::string &port_data)
95 DPRINTF(ExternalPort,
"finding stub port '%s'\n", port_data);
103 if (debug::ExternalPort) {
104 [[maybe_unused]]
unsigned int size = packet->
getSize();
107 " data: ...\n", packet->
getAddr(), size);
156 fatal(
"StubSlavePort: function: %s\n", __func__);
173 fatal(
"StubSlavePort: unimplemented function: %s\n", __func__);
176 std::map<std::string, ExternalSlave::Handler *>
201 if (if_name ==
"port") {
215 fatal(
"%s: Can't find external port type: %s"
229 fatal(
"ExternalSlave %s: externalPort not set!\n",
name());
231 fatal(
"ExternalSlave %s is unconnected!\n",
name());
Tick curTick()
The universal simulation clock.
#define fatal(...)
This implements a cprintf based fatal() function.
StubSlavePort(const std::string &name_, ExternalSlave &owner_)
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
virtual Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
bool mustRetry
Received a new request while processing a first.
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() const
Return port name (for DPRINTF).
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 recvFunctionalSnoop(PacketPtr packet)
void processResponseEvent()
std::string portName
Name of the bound port.
std::string portType
Key to select a port handler.
std::string portData
Handler-specific port configuration.
Derive from this class to create an external port interface.
void recvRespRetry()
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
void schedule(Event &event, Tick when)
Implement a ‘stub’ port which just responds to requests by printing a message.
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Port interface.
ExternalPort(const std::string &name_, ExternalSlave &owner_)
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual std::string name() const
const Params & params() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Tick recvAtomic(PacketPtr packet)
Receive an atomic request packet from the peer.
uint64_t Tick
Tick count type.
ExternalPort * externalPort
The peer port for the gem5 port "port".
const T * getConstPtr() const
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
bool isConnected() const
Is this port currently connected to a peer?
Abstract superclass for simulation objects.
static std::map< std::string, Handler * > portHandlers
Registered handlers.
EventFunctionWrapper responseEvent
PacketPtr responsePacket
Stub can handle a single request at a time.
const std::string & name()
#define DDUMP(x, data, count)
DPRINTF is a debugging trace facility that allows one to selectively enable tracing statements.
void sendRangeChange() const
Called by the owner to send a range change.
bool recvTimingSnoopResp(PacketPtr packet)
Receive a timing snoop response from the peer.
Ports are used to interface objects to each other.
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
ExternalSlave(const ExternalSlaveParams ¶ms)
AddrRangeList getAddrRanges() const
Any or all of recv...
AddrRangeList addrRanges
The Range of addresses supported by the devices on the external side of this port.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
bool recvTimingReq(PacketPtr packet)
Receive a timing request from the peer.
ExternalSlave::ExternalPort * getExternalPort(const std::string &name_, ExternalSlave &owner, const std::string &port_data)
Create or find an external port which can be bound.
Generated on Sun Jul 30 2023 01:56:58 for gem5 by doxygen 1.8.17