gem5 v24.0.0.0
|
The port on the side that receives requests and sends responses. More...
#include <bridge.hh>
Public Member Functions | |
BridgeResponsePort (const std::string &_name, Bridge &_bridge, BridgeRequestPort &_memSidePort, Cycles _delay, int _resp_limit, std::vector< AddrRange > _ranges) | |
Constructor for the BridgeResponsePort. | |
void | schedTimingResp (PacketPtr pkt, Tick when) |
Queue a response packet to be sent out later and also schedule a send if necessary. | |
void | retryStalledReq () |
Retry any stalled request that we have failed to accept at an earlier point in time. | |
Public Member Functions inherited from gem5::ResponsePort | |
ResponsePort (const std::string &name, SimObject *_owner, PortID id=InvalidPortID) | |
Response port. | |
ResponsePort (const std::string &name, PortID id=InvalidPortID) | |
virtual | ~ResponsePort () |
bool | isSnooping () const |
Find out if the peer request port is snooping or not. | |
void | sendRangeChange () const |
Called by the owner to send a range change. | |
void | unbind () override |
We let the request port do the work, so these don't do anything. | |
void | bind (Port &peer) override |
Attach to a peer port. | |
Tick | sendAtomicSnoop (PacketPtr pkt) |
Send an atomic snoop request packet, where the data is moved and the state is updated in zero time, without interleaving with other memory accesses. | |
void | sendFunctionalSnoop (PacketPtr pkt) const |
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory system, without affecting the current state of any block or moving the block. | |
bool | sendTimingResp (PacketPtr pkt) |
Attempt to send a timing response to the request port by calling its corresponding receive function. | |
void | sendTimingSnoopReq (PacketPtr pkt) |
Attempt to send a timing snoop request packet to the request port by calling its corresponding receive function. | |
void | sendRetryReq () |
Send a retry to the request port that previously attempted a sendTimingReq to this response port and failed. | |
void | sendRetrySnoopResp () |
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response port and failed. | |
Public Member Functions inherited from gem5::Port | |
virtual | ~Port () |
Virtual destructor due to inheritance. | |
Port & | getPeer () |
Return a reference to this port's peer. | |
const std::string | name () const |
Return port name (for DPRINTF). | |
PortID | getId () const |
Get the port id. | |
bool | isConnected () const |
Is this port currently connected to a peer? | |
void | takeOverFrom (Port *old) |
A utility function to make it easier to swap out ports. | |
Protected Member Functions | |
bool | recvTimingReq (PacketPtr pkt) override |
When receiving a timing request from the peer port, pass it to the bridge. | |
void | recvRespRetry () override |
When receiving a retry request from the peer port, pass it to the bridge. | |
Tick | recvAtomic (PacketPtr pkt) override |
When receiving an Atomic request from the peer port, pass it to the bridge. | |
Tick | recvAtomicBackdoor (PacketPtr pkt, MemBackdoorPtr &backdoor) override |
When receiving an Atomic backdoor request from the peer port, pass it to the bridge. | |
void | recvFunctional (PacketPtr pkt) override |
When receiving a Functional request from the peer port, pass it to the bridge. | |
void | recvMemBackdoorReq (const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override |
When receiving a Functional backdoor request from the peer port, pass it to the bridge. | |
AddrRangeList | getAddrRanges () const override |
When receiving a address range request the peer port, pass it to the bridge. | |
Protected Member Functions inherited from gem5::ResponsePort | |
void | responderUnbind () |
Called by the request port to unbind. | |
void | responderBind (RequestPort &request_port) |
Called by the request port to bind. | |
Tick | recvAtomicBackdoor (PacketPtr pkt, MemBackdoorPtr &backdoor) override |
Default implementations. | |
void | recvMemBackdoorReq (const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override |
Receive a request for a back door to a range of memory. | |
bool | tryTiming (PacketPtr pkt) override |
Availability request from the peer. | |
bool | recvTimingSnoopResp (PacketPtr pkt) override |
Receive a timing snoop response from the peer. | |
Protected Member Functions inherited from gem5::Port | |
void | reportUnbound () const |
Port (const std::string &_name, PortID _id) | |
Abstract base class for ports. | |
Protected Member Functions inherited from gem5::AtomicResponseProtocol | |
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, without interleaving with other memory accesses. | |
Protected Member Functions inherited from gem5::TimingResponseProtocol | |
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 function. | |
void | sendRetryReq (TimingRequestProtocol *peer) |
Send a retry to the peer that previously attempted a sendTimingReq to this protocol and failed. | |
void | sendRetrySnoopResp (TimingRequestProtocol *peer) |
Send a retry to the peer that previously attempted a sendTimingSnoopResp to this peer and failed. | |
Protected Member Functions inherited from gem5::FunctionalResponseProtocol | |
void | sendSnoop (FunctionalRequestProtocol *peer, PacketPtr pkt) const |
Send a functional snoop request packet, where the data is instantly updated everywhere in the memory system, without affecting the current state of any block or moving the block. | |
Private Member Functions | |
bool | respQueueFull () const |
Is this side blocked from accepting new response packets. | |
void | trySendTiming () |
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (for timing accesses only). | |
Private Attributes | |
Bridge & | bridge |
The bridge to which this port belongs. | |
BridgeRequestPort & | memSidePort |
Request port on the other side of the bridge. | |
const Cycles | delay |
Minimum request delay though this bridge. | |
const AddrRangeList | ranges |
Address ranges to pass through the bridge. | |
std::deque< DeferredPacket > | transmitList |
Response packet queue. | |
unsigned int | outstandingResponses |
Counter to track the outstanding responses. | |
bool | retryReq |
If we should send a retry when space becomes available. | |
unsigned int | respQueueLimit |
Max queue size for reserved responses. | |
std::unique_ptr< Packet > | pendingDelete |
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent call. | |
EventFunctionWrapper | sendEvent |
Send event for the response queue. | |
Additional Inherited Members | |
Protected Attributes inherited from gem5::ResponsePort | |
SimObject & | owner |
Protected Attributes inherited from gem5::Port | |
const PortID | id |
A numeric identifier to distinguish ports in a vector, and set to InvalidPortID in case this port is not part of a vector. | |
Port * | _peer |
A pointer to this port's peer. | |
bool | _connected |
Whether this port is currently connected to a peer port. | |
The port on the side that receives requests and sends responses.
The response port has a set of address ranges that it is responsible for. The response port also has a buffer for the responses not yet sent.
gem5::Bridge::BridgeResponsePort::BridgeResponsePort | ( | const std::string & | _name, |
Bridge & | _bridge, | ||
BridgeRequestPort & | _memSidePort, | ||
Cycles | _delay, | ||
int | _resp_limit, | ||
std::vector< AddrRange > | _ranges ) |
Constructor for the BridgeResponsePort.
_name | the port name including the owner |
_bridge | the structural owner |
_memSidePort | the request port on the other side of the bridge |
_delay | the delay in cycles from receiving to sending |
_resp_limit | the size of the response queue |
_ranges | a number of address ranges to forward |
Definition at line 56 of file bridge.cc.
References trySendTiming().
|
overrideprotectedvirtual |
When receiving a address range request the peer port, pass it to the bridge.
Implements gem5::ResponsePort.
When receiving an Atomic request from the peer port, pass it to the bridge.
Implements gem5::AtomicResponseProtocol.
Definition at line 342 of file bridge.cc.
References gem5::Packet::cacheResponding(), gem5::Bridge::memSidePort, panic_if, and gem5::RequestPort::sendAtomic().
|
overrideprotectedvirtual |
When receiving an Atomic backdoor request from the peer port, pass it to the bridge.
Implements gem5::AtomicResponseProtocol.
Definition at line 351 of file bridge.cc.
References gem5::Bridge::memSidePort, and gem5::RequestPort::sendAtomicBackdoor().
|
overrideprotectedvirtual |
When receiving a Functional request from the peer port, pass it to the bridge.
Implements gem5::FunctionalResponseProtocol.
Definition at line 359 of file bridge.cc.
References gem5::ArmISA::i, gem5::Packet::makeResponse(), gem5::Bridge::memSidePort, gem5::Named::name(), gem5::Packet::popLabel(), gem5::Packet::pushLabel(), gem5::RequestPort::sendFunctional(), gem5::Bridge::BridgeRequestPort::trySatisfyFunctional(), and gem5::Packet::trySatisfyFunctional().
|
overrideprotectedvirtual |
When receiving a Functional backdoor request from the peer port, pass it to the bridge.
Implements gem5::FunctionalResponseProtocol.
Definition at line 383 of file bridge.cc.
References gem5::Bridge::memSidePort, and gem5::RequestPort::sendMemBackdoorReq().
|
overrideprotectedvirtual |
When receiving a retry request from the peer port, pass it to the bridge.
Implements gem5::TimingResponseProtocol.
|
overrideprotectedvirtual |
When receiving a timing request from the peer port, pass it to the bridge.
Implements gem5::TimingResponseProtocol.
Definition at line 147 of file bridge.cc.
References gem5::Packet::cacheResponding(), gem5::Packet::cmdString(), DPRINTF, gem5::Packet::getAddr(), gem5::Packet::headerDelay, gem5::Bridge::memSidePort, gem5::Packet::needsResponse(), panic_if, gem5::Packet::payloadDelay, gem5::Bridge::BridgeRequestPort::reqQueueFull(), and gem5::Bridge::BridgeRequestPort::schedTimingReq().
|
private |
Is this side blocked from accepting new response packets.
Definition at line 113 of file bridge.cc.
References outstandingResponses, and respQueueLimit.
void gem5::Bridge::BridgeResponsePort::retryStalledReq | ( | ) |
Retry any stalled request that we have failed to accept at an earlier point in time.
This call will do nothing if no request is waiting.
Definition at line 207 of file bridge.cc.
References DPRINTF.
Referenced by gem5::Bridge::BridgeRequestPort::trySendTiming().
Queue a response packet to be sent out later and also schedule a send if necessary.
pkt | a response to send out after a delay |
when | tick when response packet should be sent |
Definition at line 234 of file bridge.cc.
References gem5::ArmISA::sendEvent().
Referenced by gem5::Bridge::BridgeRequestPort::recvTimingResp().
|
private |
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (for timing accesses only).
Definition at line 286 of file bridge.cc.
References gem5::curTick(), DPRINTF, gem5::Packet::getAddr(), gem5::Bridge::memSidePort, gem5::Bridge::DeferredPacket::pkt, gem5::Bridge::BridgeRequestPort::reqQueueFull(), gem5::ArmISA::sendEvent(), and gem5::Bridge::DeferredPacket::tick.
Referenced by BridgeResponsePort().
|
private |
|
private |
|
private |
|
private |
Counter to track the outstanding responses.
Definition at line 130 of file bridge.hh.
Referenced by respQueueFull().
|
private |
|
private |
|
private |
Max queue size for reserved responses.
Definition at line 136 of file bridge.hh.
Referenced by respQueueFull().
|
private |
|
private |
|
private |