53 #ifndef __MEM_SERIAL_LINK_HH__
54 #define __MEM_SERIAL_LINK_HH__
60 #include "params/SerialLink.hh"
90 class SerialLinkMasterPort;
167 Cycles _delay,
int _resp_limit,
const
267 _delay,
int _req_limit);
332 #endif //__MEM_SERIAL_LINK_HH__
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
bool retryReq
If we should send a retry when space becomes available.
Cycles is a wrapper class for representing cycle counts, i.e.
bool respQueueFull() const
Is this side blocked from accepting new response packets.
SerialLink & serial_link
The serial_link to which this port belongs.
void retryStalledReq()
Retry any stalled request that we have failed to accept at an earlier point in time.
const PortID InvalidPortID
bool recvTimingReq(PacketPtr pkt)
When receiving a timing request from the peer port, pass it to the serial_link.
void recvReqRetry()
When receiving a retry request from the peer port, pass it to the serial_link.
const AddrRangeList ranges
Address ranges to pass through the serial_link.
const Cycles delay
Minimum delay though this serial_link.
SerialLink is a simple variation of the Bridge class, with the ability to account for the latency of ...
EventWrapper< SerialLinkSlavePort,&SerialLinkSlavePort::trySendTiming > sendEvent
Send event for the response queue.
SerialLinkSlavePort slavePort
Slave port of the serial_link.
A SlavePort is a specialisation of a port.
std::deque< DeferredPacket > transmitList
Request packet queue.
const Cycles delay
Minimum request delay though this serial_link.
AddrRangeList getAddrRanges() const
When receiving a address range request the peer port, pass it to the serial_link. ...
A BaseSlavePort is a protocol-agnostic slave port, responsible only for the structural connection to ...
SerialLink(SerialLinkParams *p)
bool reqQueueFull() const
Is this side blocked from accepting new request packets.
virtual BaseSlavePort & getSlavePort(const std::string &if_name, PortID idx=InvalidPortID)
Get a slave port with a given name and index.
unsigned int respQueueLimit
Max queue size for reserved responses.
SerialLink & serial_link
The serial_link to which this port belongs.
DeferredPacket(PacketPtr _pkt, Tick _tick)
bool checkFunctional(PacketPtr pkt)
Check a functional request against the packets in our request queue.
unsigned int outstandingResponses
Counter to track the outstanding responses.
SerialLinkSlavePort & slavePort
The slave port on the other side of the serial_link.
uint64_t Tick
Tick count type.
virtual BaseMasterPort & getMasterPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a master port with a given name and index.
const unsigned int reqQueueLimit
Max queue size for request packets.
Tick recvAtomic(PacketPtr pkt)
When receiving a Atomic requestfrom the peer port, pass it to the serial_link.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
void recvRespRetry()
When receiving a retry request from the peer port, pass it to the serial_link.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
The port on the side that receives requests and sends responses.
void schedTimingResp(PacketPtr pkt, Tick when)
Queue a response packet to be sent out later and also schedule a send if necessary.
Port on the side that forwards requests and receives responses.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (...
std::deque< DeferredPacket > transmitList
Response packet queue.
SerialLinkSlavePort(const std::string &_name, SerialLink &_serial_link, SerialLinkMasterPort &_masterPort, Cycles _delay, int _resp_limit, const std::vector< AddrRange > &_ranges)
Constructor for the SerialLinkSlavePort.
SerialLinkMasterPort & masterPort
Master port on the other side of the serial_link.
The MemObject class extends the ClockedObject with accessor functions to get its master and slave por...
A BaseMasterPort is a protocol-agnostic master port, responsible only for the structural connection t...
void schedTimingReq(PacketPtr pkt, Tick when)
Queue a request packet to be sent out later and also schedule a send if necessary.
uint64_t link_speed
Speed of each link (Gb/s) in this serial link.
EventWrapper< SerialLinkMasterPort,&SerialLinkMasterPort::trySendTiming > sendEvent
Send event for the request queue.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the outbound queue is ready to transmit (...
A deferred packet stores a packet along with its scheduled transmission time.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool recvTimingResp(PacketPtr pkt)
When receiving a timing request from the peer port, pass it to the serial_link.
unsigned num_lanes
Number of parallel lanes in this serial link.
SerialLinkMasterPort masterPort
Master port of the serial_link.
void recvFunctional(PacketPtr pkt)
When receiving a Functional request from the peer port, pass it to the serial_link.
SerialLinkMasterPort(const std::string &_name, SerialLink &_serial_link, SerialLinkSlavePort &_slavePort, Cycles _delay, int _req_limit)
Constructor for the SerialLinkMasterPort.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.