48#ifndef __MEM_SERIAL_LINK_HH__
49#define __MEM_SERIAL_LINK_HH__
55#include "params/SerialLink.hh"
89 class SerialLinkRequestPort;
165 Cycles _delay,
int _resp_limit,
const
265 Cycles _delay,
int _req_limit);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
Cycles is a wrapper class for representing cycle counts, i.e.
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.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
A ResponsePort is a specialization of a port.
A deferred packet stores a packet along with its scheduled transmission time.
DeferredPacket(PacketPtr _pkt, Tick _tick)
Port on the side that forwards requests and receives responses.
bool reqQueueFull() const
Is this side blocked from accepting new request packets.
SerialLinkResponsePort & cpu_side_port
The response (CPU-side port) port on the other side of the serial_link.
const unsigned int reqQueueLimit
Max queue size for request packets.
SerialLink & serial_link
The serial_link to which this port belongs.
SerialLinkRequestPort(const std::string &_name, SerialLink &_serial_link, SerialLinkResponsePort &_cpu_side_port, Cycles _delay, int _req_limit)
Constructor for the SerialLinkRequestPort.
bool recvTimingResp(PacketPtr pkt)
When receiving a timing request from the peer port, pass it to the serial_link.
bool trySatisfyFunctional(PacketPtr pkt)
Check a functional request against the packets in our request queue.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the outbound queue is ready to transmit (...
EventFunctionWrapper sendEvent
Send event for the request queue.
std::deque< DeferredPacket > transmitList
Request packet queue.
const Cycles delay
Minimum delay though this serial_link.
void schedTimingReq(PacketPtr pkt, Tick when)
Queue a request packet to be sent out later and also schedule a send if necessary.
void recvReqRetry()
When receiving a retry request from the peer port, pass it to the serial_link.
The port on the side that receives requests and sends responses.
SerialLinkRequestPort & mem_side_port
Request port on the other side of the serial_link.
unsigned int respQueueLimit
Max queue size for reserved responses.
EventFunctionWrapper sendEvent
Send event for the response queue.
bool retryReq
If we should send a retry when space becomes available.
void schedTimingResp(PacketPtr pkt, Tick when)
Queue a response packet to be sent out later and also schedule a send if necessary.
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 recvFunctional(PacketPtr pkt)
When receiving a Functional request from the peer port, pass it to the serial_link.
std::deque< DeferredPacket > transmitList
Response packet queue.
Tick recvAtomic(PacketPtr pkt)
When receiving a Atomic requestfrom 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.
bool recvTimingReq(PacketPtr pkt)
When receiving a timing request from the peer port, pass it to the serial_link.
void retryStalledReq()
Retry any stalled request that we have failed to accept at an earlier point in time.
SerialLink & serial_link
The serial_link to which this port belongs.
AddrRangeList getAddrRanges() const
When receiving a address range request the peer port, pass it to the serial_link.
bool respQueueFull() const
Is this side blocked from accepting new response packets.
const AddrRangeList ranges
Address ranges to pass through the serial_link.
unsigned int outstandingResponses
Counter to track the outstanding responses.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (...
const Cycles delay
Minimum request delay though this serial_link.
SerialLink is a simple variation of the Bridge class, with the ability to account for the latency of ...
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID)
Get a port with a given name and index.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
uint64_t link_speed
Speed of each link (Gb/s) in this serial link.
SerialLinkRequestPort mem_side_port
Request port of the serial_link.
unsigned num_lanes
Number of parallel lanes in this serial link.
SerialLinkResponsePort cpu_side_port
Response port of the serial_link.
SerialLink(const SerialLinkParams &p)
ClockedObject declaration and implementation.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const PortID InvalidPortID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.