gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::SerialLink::SerialLinkResponsePort Class Reference

The port on the side that receives requests and sends responses. More...

#include <serial_link.hh>

Inheritance diagram for gem5::SerialLink::SerialLinkResponsePort:
gem5::ResponsePort gem5::Port gem5::AtomicResponseProtocol gem5::TimingResponseProtocol gem5::FunctionalResponseProtocol

Public Member Functions

 SerialLinkResponsePort (const std::string &_name, SerialLink &_serial_link, SerialLinkRequestPort &_mem_side_port, Cycles _delay, int _resp_limit, const std::vector< AddrRange > &_ranges)
 Constructor for the SerialLinkResponsePort.
 
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.
 
PortgetPeer ()
 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)
 When receiving a timing request from the peer port, pass it to the serial_link.
 
void recvRespRetry ()
 When receiving a retry request from the peer port, pass it to the serial_link.
 
Tick recvAtomic (PacketPtr pkt)
 When receiving a Atomic requestfrom the peer port, pass it to the serial_link.
 
void recvFunctional (PacketPtr pkt)
 When receiving a Functional request from the peer port, pass it to the serial_link.
 
AddrRangeList getAddrRanges () const
 When receiving a address range request the peer port, pass it to the serial_link.
 
- 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

SerialLinkserial_link
 The serial_link to which this port belongs.
 
SerialLinkRequestPortmem_side_port
 Request port on the other side of the serial_link.
 
const Cycles delay
 Minimum request delay though this serial_link.
 
const AddrRangeList ranges
 Address ranges to pass through the serial_link.
 
std::deque< DeferredPackettransmitList
 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.
 
EventFunctionWrapper sendEvent
 Send event for the response queue.
 

Additional Inherited Members

- Protected Attributes inherited from gem5::ResponsePort
SimObjectowner
 
- 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.
 

Detailed Description

The port on the side that receives requests and sends responses.

The CPU-side port has a set of address ranges that it is responsible for. The CPU-side port also has a buffer for the responses not yet sent.

Definition at line 97 of file serial_link.hh.

Constructor & Destructor Documentation

◆ SerialLinkResponsePort()

gem5::SerialLink::SerialLinkResponsePort::SerialLinkResponsePort ( const std::string & _name,
SerialLink & _serial_link,
SerialLinkRequestPort & _mem_side_port,
Cycles _delay,
int _resp_limit,
const std::vector< AddrRange > & _ranges )

Constructor for the SerialLinkResponsePort.

Parameters
_namethe port name including the owner
_serial_linkthe structural owner
_mem_side_portthe memory-side port on the other side of the serial_link
_delaythe delay in cycles from receiving to sending
_resp_limitthe size of the response queue
_rangesa number of address ranges to forward

Definition at line 57 of file serial_link.cc.

References trySendTiming().

Member Function Documentation

◆ getAddrRanges()

AddrRangeList gem5::SerialLink::SerialLinkResponsePort::getAddrRanges ( ) const
protectedvirtual

When receiving a address range request the peer port, pass it to the serial_link.

Implements gem5::ResponsePort.

Definition at line 422 of file serial_link.cc.

◆ recvAtomic()

Tick gem5::SerialLink::SerialLinkResponsePort::recvAtomic ( PacketPtr pkt)
protectedvirtual

When receiving a Atomic requestfrom the peer port, pass it to the serial_link.

Implements gem5::AtomicResponseProtocol.

Definition at line 375 of file serial_link.cc.

References gem5::SerialLink::mem_side_port, and gem5::RequestPort::sendAtomic().

◆ recvFunctional()

void gem5::SerialLink::SerialLinkResponsePort::recvFunctional ( PacketPtr pkt)
protectedvirtual

◆ recvRespRetry()

void gem5::SerialLink::SerialLinkResponsePort::recvRespRetry ( )
protectedvirtual

When receiving a retry request from the peer port, pass it to the serial_link.

Implements gem5::TimingResponseProtocol.

Definition at line 369 of file serial_link.cc.

◆ recvTimingReq()

◆ respQueueFull()

bool gem5::SerialLink::SerialLinkResponsePort::respQueueFull ( ) const
private

Is this side blocked from accepting new response packets.

Returns
true if the reserved space has reached the set limit

Definition at line 119 of file serial_link.cc.

References outstandingResponses, and respQueueLimit.

◆ retryStalledReq()

void gem5::SerialLink::SerialLinkResponsePort::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 231 of file serial_link.cc.

References DPRINTF.

Referenced by gem5::SerialLink::SerialLinkRequestPort::trySendTiming().

◆ schedTimingResp()

void gem5::SerialLink::SerialLinkResponsePort::schedTimingResp ( PacketPtr pkt,
Tick when )

Queue a response packet to be sent out later and also schedule a send if necessary.

Parameters
pkta response to send out after a delay
whentick when response packet should be sent

Definition at line 258 of file serial_link.cc.

References gem5::ArmISA::sendEvent().

Referenced by gem5::SerialLink::SerialLinkRequestPort::recvTimingResp().

◆ trySendTiming()

void gem5::SerialLink::SerialLinkResponsePort::trySendTiming ( )
private

Member Data Documentation

◆ delay

const Cycles gem5::SerialLink::SerialLinkResponsePort::delay
private

Minimum request delay though this serial_link.

Definition at line 111 of file serial_link.hh.

◆ mem_side_port

SerialLinkRequestPort& gem5::SerialLink::SerialLinkResponsePort::mem_side_port
private

Request port on the other side of the serial_link.

Definition at line 108 of file serial_link.hh.

◆ outstandingResponses

unsigned int gem5::SerialLink::SerialLinkResponsePort::outstandingResponses
private

Counter to track the outstanding responses.

Definition at line 125 of file serial_link.hh.

Referenced by respQueueFull().

◆ ranges

const AddrRangeList gem5::SerialLink::SerialLinkResponsePort::ranges
private

Address ranges to pass through the serial_link.

Definition at line 114 of file serial_link.hh.

◆ respQueueLimit

unsigned int gem5::SerialLink::SerialLinkResponsePort::respQueueLimit
private

Max queue size for reserved responses.

Definition at line 131 of file serial_link.hh.

Referenced by respQueueFull().

◆ retryReq

bool gem5::SerialLink::SerialLinkResponsePort::retryReq
private

If we should send a retry when space becomes available.

Definition at line 128 of file serial_link.hh.

◆ sendEvent

EventFunctionWrapper gem5::SerialLink::SerialLinkResponsePort::sendEvent
private

Send event for the response queue.

Definition at line 148 of file serial_link.hh.

◆ serial_link

SerialLink& gem5::SerialLink::SerialLinkResponsePort::serial_link
private

The serial_link to which this port belongs.

Definition at line 103 of file serial_link.hh.

◆ transmitList

std::deque<DeferredPacket> gem5::SerialLink::SerialLinkResponsePort::transmitList
private

Response packet queue.

Response packets are held in this queue for a specified delay to model the processing delay of the serial_link. We use a deque as we need to iterate over the items for functional accesses.

Definition at line 122 of file serial_link.hh.


The documentation for this class was generated from the following files:

Generated on Tue Jun 18 2024 16:24:14 for gem5 by doxygen 1.11.0