46#ifndef __MEM_PORT_HH__
47#define __MEM_PORT_HH__
89 [[deprecated(
"RequestPort ownership is deprecated. "
90 "Owner should now be registered in derived classes.")]]
248 panic(
"%s was not expecting an atomic snoop request\n",
name());
255 panic(
"%s was not expecting a functional snoop request\n",
name());
261 panic(
"%s was not expecting a timing snoop request.\n",
name());
267 panic(
"%s was not expecting a snoop retry.\n",
name());
274 using RequestPort::RequestPort;
300 [[deprecated(
"ResponsePort ownership is deprecated. "
301 "Owner should now be registered in derived classes.")]]
470 panic(
"%s was not expecting a %s\n",
name(), __func__);
476 panic(
"%s was not expecting a timing snoop response\n",
name());
483 using ResponsePort::ResponsePort;
Tick sendBackdoor(AtomicResponseProtocol *peer, PacketPtr pkt, MemBackdoorPtr &backdoor)
Send an atomic request packet like above, but also request a backdoor to the data being accessed.
Tick send(AtomicResponseProtocol *peer, PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
Tick sendSnoop(AtomicRequestProtocol *peer, PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time,...
void sendMemBackdoorReq(FunctionalResponseProtocol *peer, const MemBackdoorReq &req, MemBackdoorPtr &backdoor)
Send a request for a back door to a range of memory.
void send(FunctionalResponseProtocol *peer, PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
void sendSnoop(FunctionalRequestProtocol *peer, PacketPtr pkt) const
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Ports are used to interface objects to each other.
const std::string name() const
Return port name (for DPRINTF).
void reportUnbound() const
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
void sendMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor)
Send a request for a back door to a range of memory.
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
virtual void recvRangeChange()
Called to receive an address range change from the peer response port.
void unbind() override
Unbind this request port and the associated response port.
virtual bool isSnooping() const
Determine if this request port is snooping or not.
bool tryTiming(PacketPtr pkt) const
Check if the responder can handle a timing request.
Tick recvAtomicSnoop(PacketPtr pkt) override
Default implementations.
ResponsePort * _responsePort
Tick sendAtomic(PacketPtr pkt)
Send an atomic request packet, where the data is moved and the state is updated in zero time,...
AddrRangeList getAddrRanges() const
Get the address ranges of the connected responder port.
void bind(Port &peer) override
Bind this request port to a response port.
bool sendTimingReq(PacketPtr pkt)
Attempt to send a timing request to the responder port by calling its corresponding receive function.
void recvRetrySnoopResp() override
Called by the peer if sendTimingSnoopResp was called on this protocol (causing recvTimingSnoopResp to...
bool sendTimingSnoopResp(PacketPtr pkt)
Attempt to send a timing snoop response packet to the response port by calling its corresponding rece...
void sendFunctional(PacketPtr pkt) const
Send a functional request packet, where the data is instantly updated everywhere in the memory system...
void printAddr(Addr a)
Inject a PrintReq for the given address to print the state of that address throughout the memory syst...
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
Tick sendAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor)
Send an atomic request packet like above, but also request a backdoor to the data being accessed.
A ResponsePort is a specialization of a port.
bool sendTimingResp(PacketPtr pkt)
Attempt to send a timing response to the request port by calling its corresponding receive function.
void sendFunctionalSnoop(PacketPtr pkt) const
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory ...
bool tryTiming(PacketPtr pkt) override
Availability request from the peer.
void bind(Port &peer) override
Attach to a peer port.
void sendRetrySnoopResp()
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response por...
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Default implementations.
bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
Tick sendAtomicSnoop(PacketPtr pkt)
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time,...
void sendTimingSnoopReq(PacketPtr pkt)
Attempt to send a timing snoop request packet to the request port by calling its corresponding receiv...
bool isSnooping() const
Find out if the peer request port is snooping or not.
void responderUnbind()
Called by the request port to unbind.
bool defaultBackdoorWarned
void unbind() override
We let the request port do the work, so these don't do anything.
void sendRangeChange() const
Called by the owner to send a range change.
void responderBind(RequestPort &request_port)
Called by the request port to bind.
virtual AddrRangeList getAddrRanges() const =0
Get a list of the non-overlapping address ranges the owner is responsible for.
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override
Receive a request for a back door to a range of memory.
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
RequestPort * _requestPort
Abstract superclass for simulation objects.
void sendRetryResp(TimingResponseProtocol *peer)
Send a retry to the peer that previously attempted a sendTimingResp to this protocol and failed.
bool trySend(TimingResponseProtocol *peer, PacketPtr pkt) const
Check if the peer can handle a timing request.
bool sendReq(TimingResponseProtocol *peer, PacketPtr pkt)
Attempt to send a timing request to the peer by calling its corresponding receive function.
bool sendSnoopResp(TimingResponseProtocol *peer, PacketPtr pkt)
Attempt to send a timing snoop response packet to it's peer by calling its corresponding receive func...
bool sendResp(TimingRequestProtocol *peer, PacketPtr pkt)
Attempt to send a timing response to the peer by calling its corresponding receive function.
void sendSnoopReq(TimingRequestProtocol *peer, PacketPtr pkt)
Attempt to send a timing snoop request packet to the peer by calling its corresponding receive functi...
void sendRetrySnoopResp(TimingRequestProtocol *peer)
Send a retry to the peer that previously attempted a sendTimingSnoopResp to this peer and failed.
void sendRetryReq(TimingRequestProtocol *peer)
Send a retry to the peer that previously attempted a sendTimingReq to this protocol and failed.
#define panic(...)
This implements a cprintf based panic() function.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const PortID InvalidPortID
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
Declaration of the Packet class.