Go to the documentation of this file.
59 throw UnboundPortException();
63 DefaultRequestPort() :
RequestPort(
"default_request_port", nullptr) {}
84 throw UnboundPortException();
88 DefaultResponsePort() :
ResponsePort(
"default_response_port", nullptr) {}
106 DefaultRequestPort defaultRequestPort;
107 DefaultResponsePort defaultResponsePort;
115 PortID _id) :
Port(
name, _id), _responsePort(&defaultResponsePort),
127 auto *response_port =
dynamic_cast<ResponsePort *
>(&peer);
128 fatal_if(!response_port,
"Can't bind port %s to non-response port %s.",
141 "not bound.",
name());
156 auto req = std::make_shared<Request>(
171 defaultBackdoorWarned(false), owner(*_owner)
197 warn(
"Port %s doesn't support requesting a back door.",
name());
A ResponsePort is a specialization of a port.
virtual Tick recvAtomic(PacketPtr pkt)=0
Receive an atomic request packet from the peer.
virtual void recvRespRetry()=0
Called by the peer if sendTimingResp was called on this protocol (causing recvTimingResp to be called...
Tick recvAtomicSnoop(PacketPtr pkt) override
Default implementations.
virtual void unbind()
Dettach from a peer port.
virtual void recvFunctional(PacketPtr pkt)=0
Receive a functional request packet from the peer.
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
AddrRangeList getAddrRanges() const
Get the address ranges of the connected responder port.
void responderUnbind()
Called by the request port to unbind.
ResponsePort(const std::string &name, SimObject *_owner, PortID id=InvalidPortID)
Response port.
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
void bind(Port &peer) override
Bind this request port to a response port.
ResponsePort * _responsePort
bool tryTiming(PacketPtr pkt) override
Availability request from the peer.
void responderBind(RequestPort &request_port)
Called by the request port to bind.
void recvRetrySnoopResp() override
Called by the peer if sendTimingSnoopResp was called on this protocol (causing recvTimingSnoopResp to...
virtual void recvReqRetry()=0
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
bool defaultBackdoorWarned
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Ports are used to interface objects to each other.
RequestPort(const std::string &name, SimObject *_owner, PortID id=InvalidPortID)
Request port.
virtual bool recvTimingResp(PacketPtr pkt)=0
Receive a timing response from the peer.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Object used to maintain state of a PrintReq.
virtual bool recvTimingReq(PacketPtr pkt)=0
Receive a timing request from the peer.
bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const std::string name() const
Return port name (for DPRINTF).
const std::string & name()
@ funcRequestorId
This requestor id is used for functional requests that don't come from a particular device.
virtual AddrRangeList getAddrRanges() const =0
Get a list of the non-overlapping address ranges the owner is responsible for.
#define panic_if(cond,...)
Conditional panic macro that checks the supplied condition and only panics if the condition is true a...
void unbind() override
Unbind this request port and the associated response port.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void printAddr(Addr a)
Inject a PrintReq for the given address to print the state of that address throughout the memory syst...
bool isConnected() const
Is this port currently connected to a peer?
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Default implementations.
SenderState * senderState
This packet's sender state.
#define fatal_if(cond,...)
Conditional fatal macro that checks the supplied condition and only causes a fatal error if the condi...
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
virtual void bind(Port &peer)
Attach to a peer port.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
RequestPort * _requestPort
Abstract superclass for simulation objects.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17