gem5
v20.0.0.0
|
The port on the side that receives requests and sends responses. More...
#include <bridge.hh>
Public Member Functions | |
BridgeSlavePort (const std::string &_name, Bridge &_bridge, BridgeMasterPort &_masterPort, Cycles _delay, int _resp_limit, std::vector< AddrRange > _ranges) | |
Constructor for the BridgeSlavePort. More... | |
void | schedTimingResp (PacketPtr pkt, Tick when) |
Queue a response packet to be sent out later and also schedule a send if necessary. More... | |
void | retryStalledReq () |
Retry any stalled request that we have failed to accept at an earlier point in time. More... | |
![]() | |
SlavePort (const std::string &name, SimObject *_owner, PortID id=InvalidPortID) | |
Slave port. More... | |
virtual | ~SlavePort () |
bool | isSnooping () const |
Find out if the peer master port is snooping or not. More... | |
void | sendRangeChange () const |
Called by the owner to send a range change. More... | |
void | unbind () override |
We let the master port do the work, so these don't do anything. More... | |
void | bind (Port &peer) override |
Attach to a peer port. More... | |
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. More... | |
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. More... | |
bool | sendTimingResp (PacketPtr pkt) |
Attempt to send a timing response to the master port by calling its corresponding receive function. More... | |
void | sendTimingSnoopReq (PacketPtr pkt) |
Attempt to send a timing snoop request packet to the master port by calling its corresponding receive function. More... | |
void | sendRetryReq () |
Send a retry to the master port that previously attempted a sendTimingReq to this slave port and failed. More... | |
void | sendRetrySnoopResp () |
Send a retry to the master port that previously attempted a sendTimingSnoopResp to this slave port and failed. More... | |
![]() | |
virtual | ~Port () |
Virtual destructor due to inheritance. More... | |
Port & | getPeer () |
Return a reference to this port's peer. More... | |
const std::string | name () const |
Return port name (for DPRINTF). More... | |
PortID | getId () const |
Get the port id. More... | |
bool | isConnected () const |
Is this port currently connected to a peer? More... | |
void | takeOverFrom (Port *old) |
A utility function to make it easier to swap out ports. More... | |
Protected Member Functions | |
bool | recvTimingReq (PacketPtr pkt) |
When receiving a timing request from the peer port, pass it to the bridge. More... | |
void | recvRespRetry () |
When receiving a retry request from the peer port, pass it to the bridge. More... | |
Tick | recvAtomic (PacketPtr pkt) |
When receiving a Atomic requestfrom the peer port, pass it to the bridge. More... | |
void | recvFunctional (PacketPtr pkt) |
When receiving a Functional request from the peer port, pass it to the bridge. More... | |
AddrRangeList | getAddrRanges () const |
When receiving a address range request the peer port, pass it to the bridge. More... | |
![]() | |
void | slaveUnbind () |
Called by the master port to unbind. More... | |
void | slaveBind (MasterPort &master_port) |
Called by the master port to bind. More... | |
Tick | recvAtomicBackdoor (PacketPtr pkt, MemBackdoorPtr &backdoor) override |
Default implementations. More... | |
bool | tryTiming (PacketPtr pkt) override |
Availability request from the peer. More... | |
bool | recvTimingSnoopResp (PacketPtr pkt) override |
Receive a timing snoop response from the peer. More... | |
![]() | |
Port (const std::string &_name, PortID _id) | |
Abstract base class for ports. More... | |
![]() | |
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. More... | |
![]() | |
bool | sendResp (TimingRequestProtocol *peer, PacketPtr pkt) |
Attempt to send a timing response to the peer by calling its corresponding receive function. More... | |
void | sendSnoopReq (TimingRequestProtocol *peer, PacketPtr pkt) |
Attempt to send a timing snoop request packet to the peer by calling its corresponding receive function. More... | |
void | sendRetryReq (TimingRequestProtocol *peer) |
Send a retry to the peer that previously attempted a sendTimingReq to this protocol and failed. More... | |
void | sendRetrySnoopResp (TimingRequestProtocol *peer) |
Send a retry to the peer that previously attempted a sendTimingSnoopResp to this peer and failed. More... | |
![]() | |
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. More... | |
Private Member Functions | |
bool | respQueueFull () const |
Is this side blocked from accepting new response packets. More... | |
void | trySendTiming () |
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (for timing accesses only). More... | |
Private Attributes | |
Bridge & | bridge |
The bridge to which this port belongs. More... | |
BridgeMasterPort & | masterPort |
Master port on the other side of the bridge. More... | |
const Cycles | delay |
Minimum request delay though this bridge. More... | |
const AddrRangeList | ranges |
Address ranges to pass through the bridge. More... | |
std::deque< DeferredPacket > | transmitList |
Response packet queue. More... | |
unsigned int | outstandingResponses |
Counter to track the outstanding responses. More... | |
bool | retryReq |
If we should send a retry when space becomes available. More... | |
unsigned int | respQueueLimit |
Max queue size for reserved responses. More... | |
std::unique_ptr< Packet > | pendingDelete |
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent call. More... | |
EventFunctionWrapper | sendEvent |
Send event for the response queue. More... | |
Additional Inherited Members | |
![]() | |
SimObject & | owner |
![]() | |
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. More... | |
Port * | _peer |
A pointer to this port's peer. More... | |
bool | _connected |
Whether this port is currently connected to a peer port. More... | |
The port on the side that receives requests and sends responses.
The slave port has a set of address ranges that it is responsible for. The slave port also has a buffer for the responses not yet sent.
Bridge::BridgeSlavePort::BridgeSlavePort | ( | const std::string & | _name, |
Bridge & | _bridge, | ||
BridgeMasterPort & | _masterPort, | ||
Cycles | _delay, | ||
int | _resp_limit, | ||
std::vector< AddrRange > | _ranges | ||
) |
Constructor for the BridgeSlavePort.
_name | the port name including the owner |
_bridge | the structural owner |
_masterPort | the master 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 53 of file bridge.cc.
References trySendTiming().
|
protectedvirtual |
When receiving a address range request the peer port, pass it to the bridge.
Implements SlavePort.
Definition at line 387 of file bridge.cc.
References Bridge::Bridge().
When receiving a Atomic requestfrom the peer port, pass it to the bridge.
Implements AtomicResponseProtocol.
Definition at line 337 of file bridge.cc.
References Packet::cacheResponding(), Bridge::masterPort, panic_if, and MasterPort::sendAtomic().
|
protectedvirtual |
When receiving a Functional request from the peer port, pass it to the bridge.
Implements FunctionalResponseProtocol.
Definition at line 346 of file bridge.cc.
References ArmISA::i, Packet::makeResponse(), Bridge::masterPort, SimObject::name(), Packet::popLabel(), Packet::pushLabel(), MasterPort::sendFunctional(), Bridge::BridgeMasterPort::trySatisfyFunctional(), and Packet::trySatisfyFunctional().
|
protectedvirtual |
When receiving a retry request from the peer port, pass it to the bridge.
Implements TimingResponseProtocol.
|
protectedvirtual |
When receiving a timing request from the peer port, pass it to the bridge.
Implements TimingResponseProtocol.
Definition at line 142 of file bridge.cc.
References Packet::cacheResponding(), Packet::cmdString(), DPRINTF, Packet::getAddr(), Packet::headerDelay, Bridge::masterPort, Packet::needsResponse(), panic_if, Packet::payloadDelay, Bridge::BridgeMasterPort::reqQueueFull(), and Bridge::BridgeMasterPort::schedTimingReq().
|
private |
void Bridge::BridgeSlavePort::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 202 of file bridge.cc.
References DPRINTF.
Referenced by Bridge::BridgeMasterPort::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 229 of file bridge.cc.
References ArmISA::sendEvent().
Referenced by Bridge::BridgeMasterPort::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 281 of file bridge.cc.
References curTick(), DPRINTF, Packet::getAddr(), Bridge::masterPort, Bridge::BridgeMasterPort::reqQueueFull(), ArmISA::sendEvent(), and Bridge::DeferredPacket::tick.
Referenced by BridgeSlavePort().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |