51 #ifndef __MEM_COHERENT_XBAR_HH__ 52 #define __MEM_COHERENT_XBAR_HH__ 54 #include <unordered_map> 55 #include <unordered_set> 59 #include "params/CoherentXBar.hh" 226 slavePort(slave_port) { }
242 panic(
"SnoopRespPort should never see retry");
248 panic(
"SnoopRespPort should never see timing response");
368 PortID exclude_slave_port_id,
369 PortID source_master_port_id,
436 #endif //__MEM_COHERENT_XBAR_HH__ A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
#define panic(...)
This implements a cprintf based panic() function.
std::vector< SnoopRespLayer * > snoopLayers
SnoopRespPort(QueuedSlavePort &slave_port, CoherentXBar &_xbar)
Create a snoop response port that mirrors a given slave port.
bool isSnooping() const override
Determine if this port should be considered a snooper.
Cycles is a wrapper class for representing cycle counts, i.e.
std::vector< RespLayer * > respLayers
const PortID InvalidPortID
Tick recvAtomicBackdoor(PacketPtr pkt, MemBackdoorPtr &backdoor) override
Receive an atomic request packet from the peer, and optionally provide a backdoor to the data being a...
const unsigned int maxOutstandingSnoopCheck
Maximum number of outstading snoops sanity check.
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
void recvReqRetry(PortID master_port_id)
Stats::Distribution snoopFanout
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
Internal class to bridge between an incoming snoop response from a slave port and forwarding it throu...
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
Definition of a snoop filter.
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests, one for responses, and one for snoop re...
Stats::Scalar snoopTraffic
const Cycles snoopResponseLatency
Cycles of snoop response latency.
System * system
Keep a pointer to the system to be allow to querying memory system properties.
Declaration of the coherent crossbar slave port type, one will be instantiated for each of the master...
std::unordered_set< RequestPtr > outstandingSnoop
Store the outstanding requests that we are expecting snoop responses from so we can determine which s...
void sendRetrySnoopResp()
Send a retry to the master port that previously attempted a sendTimingSnoopResp to this slave port an...
CoherentXBar & xbar
A reference to the crossbar to which this port belongs.
This is a simple scalar statistic, like a counter.
bool sinkPacket(const PacketPtr pkt) const
Determine if the crossbar should sink the packet, as opposed to forwarding it, or responding...
void recvFunctionalSnoop(PacketPtr pkt, PortID master_port_id)
Function called by the port when the crossbar is recieving a functional snoop transaction.
CoherentXBar & xbar
A reference to the crossbar to which this port belongs.
bool recvTimingReq(PacketPtr pkt, PortID slave_port_id)
CoherentXBarMasterPort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
RequestPtr req
A pointer to the original request.
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
RespPacketQueue queue
A normal packet queue used to store responses.
uint64_t Tick
Tick count type.
void recvRangeChange() override
Called to receive an address range change from the peer slave port.
bool isDestination(const PacketPtr pkt) const
Determine if the packet's destination is the memory below.
A simple distribution stat.
void recvTimingSnoopReq(PacketPtr pkt, PortID master_port_id)
const unsigned int maxRoutingTableSizeCheck
Maximum routing table size sanity check.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
CoherentXBar(const CoherentXBarParams *p)
SnoopFilter * snoopFilter
A snoop filter that tracks cache line residency and can restrict the broadcast needed for probes...
bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
bool recvTimingResp(PacketPtr pkt, PortID master_port_id)
void forwardTiming(PacketPtr pkt, PortID exclude_slave_port_id)
Forward a timing packet to our snoopers, potentially excluding one of the connected coherent masters ...
A coherent crossbar connects a number of (potentially) snooping masters and slaves, and routes the request and response packets based on the address, and also forwards all requests to the snoopers and deals with the snoop responses.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
QueuedSlavePort & slavePort
The port which we mirror internally.
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
Tick recvAtomicSnoop(PacketPtr pkt, PortID master_port_id)
std::vector< SnoopRespPort * > snoopRespPorts
void sendRetryResp() override
Override the sending of retries and pass them on through the mirrored slave port. ...
bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
CoherentXBarSlavePort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
const std::string name() const
Return port name (for DPRINTF).
void forwardFunctional(PacketPtr pkt, PortID exclude_slave_port_id)
Forward a functional packet to our snoopers, potentially excluding one of the connected coherent mast...
std::pair< MemCmd, Tick > forwardAtomic(PacketPtr pkt, PortID exclude_slave_port_id)
Forward an atomic packet to our snoopers, potentially excluding one of the connected coherent masters...
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
virtual void regStats()
Callback to set stat parameters.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
bool forwardPacket(const PacketPtr pkt)
Determine if the crossbar should forward the packet, as opposed to responding to it.
const bool pointOfCoherency
Is this crossbar the point of coherency?
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
bool recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id)
This snoop filter keeps track of which connected port has a particular line of data.
const bool pointOfUnification
Is this crossbar the point of unification?
std::unordered_map< PacketId, PacketPtr > outstandingCMO
Store the outstanding cache maintenance that we are expecting snoop responses from so we can determin...
Declaration of an abstract crossbar base class.
virtual void recvRangeChange(PortID master_port_id)
Function called by the port when the crossbar is recieving a range change.
Declaration of the coherent crossbar master port type, one will be instantiated for each of the slave...
Tick recvAtomicBackdoor(PacketPtr pkt, PortID slave_port_id, MemBackdoorPtr *backdoor=nullptr)
void recvFunctional(PacketPtr pkt, PortID slave_port_id)
Function called by the port when the crossbar is recieving a Functional transaction.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
Tick recvAtomicSnoop(PacketPtr pkt) override
Receive an atomic snoop request packet from our peer.
std::vector< QueuedSlavePort * > snoopPorts