47#ifndef __MEM_BRIDGE_HH__
48#define __MEM_BRIDGE_HH__
54#include "params/Bridge.hh"
94 class BridgeRequestPort;
336 void init()
override;
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Port on the side that forwards requests and receives responses.
const Cycles delay
Minimum delay though this bridge.
void recvReqRetry() override
When receiving a retry request from the peer port, pass it to the bridge.
std::deque< DeferredPacket > transmitList
Request packet queue.
BridgeResponsePort & cpuSidePort
The response port on the other side of the bridge.
BridgeRequestPort(const std::string &_name, Bridge &_bridge, BridgeResponsePort &_cpuSidePort, Cycles _delay, int _req_limit)
Constructor for the BridgeRequestPort.
bool trySatisfyFunctional(PacketPtr pkt)
Check a functional request against the packets in our request queue.
bool reqQueueFull() const
Is this side blocked from accepting new request packets.
const unsigned int reqQueueLimit
Max queue size for request packets.
bool recvTimingResp(PacketPtr pkt) override
When receiving a timing request from the peer port, pass it to the bridge.
void schedTimingReq(PacketPtr pkt, Tick when)
Queue a request packet to be sent out later and also schedule a send if necessary.
EventFunctionWrapper 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 (...
Bridge & bridge
The bridge to which this port belongs.
The port on the side that receives requests and sends responses.
void recvFunctional(PacketPtr pkt) override
When receiving a Functional request from the peer port, pass it to the bridge.
bool respQueueFull() const
Is this side blocked from accepting new response packets.
bool recvTimingReq(PacketPtr pkt) override
When receiving a timing request from the peer port, pass it to the bridge.
unsigned int respQueueLimit
Max queue size for reserved responses.
const AddrRangeList ranges
Address ranges to pass through the bridge.
unsigned int outstandingResponses
Counter to track the outstanding responses.
bool retryReq
If we should send a retry when space becomes available.
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override
When receiving a Functional backdoor request from the peer port, pass it to the bridge.
BridgeResponsePort(const std::string &_name, Bridge &_bridge, BridgeRequestPort &_memSidePort, Cycles _delay, int _resp_limit, std::vector< AddrRange > _ranges)
Constructor for the BridgeResponsePort.
void recvRespRetry() override
When receiving a retry request from the peer port, pass it to the bridge.
void schedTimingResp(PacketPtr pkt, Tick when)
Queue a response packet to be sent out later and also schedule a send if necessary.
EventFunctionWrapper sendEvent
Send event for the response queue.
const Cycles delay
Minimum request delay though this bridge.
AddrRangeList getAddrRanges() const override
When receiving a address range request the peer port, pass it to the bridge.
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
std::deque< DeferredPacket > transmitList
Response packet queue.
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
When receiving an Atomic backdoor 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.
BridgeRequestPort & memSidePort
Request port on the other side of the bridge.
Bridge & bridge
The bridge to which this port belongs.
void retryStalledReq()
Retry any stalled request that we have failed to accept at an earlier point in time.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (...
A deferred packet stores a packet along with its scheduled transmission time.
DeferredPacket(PacketPtr _pkt, Tick _tick)
A bridge is used to interface two different crossbars (or in general a memory-mapped requestor and re...
BridgeRequestPort memSidePort
Request port of the bridge.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
Get a port with a given name and index.
BridgeResponsePort cpuSidePort
Response port of the bridge.
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
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.
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.