47#ifndef __MEM_BRIDGE_HH__
48#define __MEM_BRIDGE_HH__
54#include "params/Bridge.hh"
55#include "params/BridgeBase.hh"
98 class BridgeRequestPort;
357 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.
BridgeRequestPort(const std::string &_name, BridgeBase &_bridge, BridgeResponsePort &_cpuSidePort, Cycles _delay, int _req_limit)
Constructor for the BridgeRequestPort.
void recvRangeChange() override
When receiving an address range change from the peer port, pass it to the bridge.
void recvReqRetry() override
When receiving a retry request from the peer port, pass it to the bridge.
bool trySatisfyFunctional(PacketPtr pkt)
Check a functional request against the packets in our request queue.
const unsigned int reqQueueLimit
Max queue size for request packets.
EventFunctionWrapper sendEvent
Send event for the request queue.
bool reqQueueFull() const
Is this side blocked from accepting new request packets.
bool recvTimingResp(PacketPtr pkt) override
When receiving a timing request from the peer port, pass it to the bridge.
BridgeResponsePort & cpuSidePort
The response port on the other side of the bridge.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the outbound queue is ready to transmit (...
std::deque< DeferredPacket > transmitList
Request packet queue.
BridgeBase & bridge
The bridge to which this port belongs.
const Cycles delay
Minimum delay though this bridge.
void schedTimingReq(PacketPtr pkt, Tick when)
Queue a request packet to be sent out later and also schedule a send if necessary.
The port on the side that receives requests and sends responses.
void trySendTiming()
Handle send event, scheduled when the packet at the head of the response queue is ready to transmit (...
void recvFunctional(PacketPtr pkt) override
When receiving a Functional request from the peer port, pass it to the bridge.
void recvRespRetry() override
When receiving a retry request from the peer port, pass it to the bridge.
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
When receiving an Atomic backdoor request from 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...
BridgeResponsePort(const std::string &_name, BridgeBase &_bridge, BridgeRequestPort &_memSidePort, Cycles _delay, int _resp_limit)
Constructor for the BridgeResponsePort.
void retryStalledReq()
Retry any stalled request that we have failed to accept at an earlier point in time.
BridgeBase & bridge
The bridge to which this port belongs.
void recvMemBackdoorReq(const MemBackdoorReq &req, MemBackdoorPtr &backdoor) override
When receiving a Functional backdoor request from the peer port, pass it to the bridge.
bool recvTimingReq(PacketPtr pkt) override
When receiving a timing 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.
void schedTimingResp(PacketPtr pkt, Tick when)
Queue a response packet to be sent out later and also schedule a send if necessary.
bool respQueueFull() const
Is this side blocked from accepting new response packets.
bool retryReq
If we should send a retry when space becomes available.
unsigned int outstandingResponses
Counter to track the outstanding responses.
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.
EventFunctionWrapper sendEvent
Send event for the response queue.
std::deque< DeferredPacket > transmitList
Response packet queue.
BridgeRequestPort & memSidePort
Request port on the other side of the bridge.
unsigned int respQueueLimit
Max queue size for reserved responses.
DeferredPacket(PacketPtr _pkt, Tick _tick)
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.
BridgeBase(const Params &p)
void init() override
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual void recvRangeChange()
Called when the memory side port receives an address range change from the peer response port.
virtual AddrRangeList getAddrRanges() const =0
Get a list of the non-overlapping address ranges the bridge is responsible for.
BridgeRequestPort memSidePort
Request port of the bridge.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the bridge is responsible for.
const AddrRangeList ranges
Address ranges to pass through the bridge.
ClockedObject(const ClockedObjectParams &p)
ClockedObjectParams Params
Parameters of ClockedObject.
Cycles is a wrapper class for representing cycle counts, i.e.
Ports are used to interface objects to each other.
RequestPort(const std::string &name, SimObject *_owner, PortID id=InvalidPortID)
Request port.
ResponsePort(const std::string &name, SimObject *_owner, PortID id=InvalidPortID)
Response port.
ClockedObject declaration and implementation.
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
Copyright (c) 2024 Arm Limited All rights reserved.
const PortID InvalidPortID
MemBackdoor * MemBackdoorPtr
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.