Go to the documentation of this file.
46 #ifndef __MEM_COHERENT_XBAR_HH__
47 #define __MEM_COHERENT_XBAR_HH__
49 #include <unordered_map>
50 #include <unordered_set>
54 #include "params/CoherentXBar.hh"
238 panic(
"SnoopRespPort should never see retry");
244 panic(
"SnoopRespPort should never see timing response");
365 PortID exclude_cpu_side_port_id,
366 PortID source_mem_side_port_id,
433 #endif //__MEM_COHERENT_XBAR_HH__
void recvFunctionalSnoop(PacketPtr pkt, PortID mem_side_port_id)
Function called by the port when the crossbar is receiving a functional snoop transaction.
CoherentXBarRequestPort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
void recvRangeChange() override
Called to receive an address range change from the peer response port.
bool recvTimingResp(PacketPtr pkt, PortID mem_side_port_id)
bool forwardPacket(const PacketPtr pkt)
Determine if the crossbar should forward the packet, as opposed to responding to it.
bool recvTimingReq(PacketPtr pkt) override
Receive a timing request from the peer.
bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id)
SnoopRespPort(QueuedResponsePort &cpu_side_port, CoherentXBar &_xbar)
Create a snoop response port that mirrors a given CPU-side port.
Stats::Distribution snoopFanout
const PortID InvalidPortID
bool isSnooping() const override
Determine if this port should be considered a snooper.
const bool pointOfUnification
Is this crossbar the point of unification?
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...
System * system
Keep a pointer to the system to be allow to querying memory system properties.
CoherentXBarResponsePort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
uint64_t Tick
Tick count type.
Internal class to bridge between an incoming snoop response from a CPU-side port and forwarding it th...
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
RequestPtr req
A pointer to the original request.
bool sinkPacket(const PacketPtr pkt) const
Determine if the crossbar should sink the packet, as opposed to forwarding it, or responding.
bool recvTimingSnoopResp(PacketPtr pkt) override
Receive a timing snoop response from the peer.
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
void recvFunctionalSnoop(PacketPtr pkt) override
Receive a functional snoop request packet from the peer.
Tick recvAtomicSnoop(PacketPtr pkt, PortID mem_side_port_id)
This is a simple scalar statistic, like a counter.
void recvReqRetry(PortID mem_side_port_id)
std::vector< RespLayer * > respLayers
void recvTimingSnoopReq(PacketPtr pkt, PortID mem_side_port_id)
void recvFunctional(PacketPtr pkt, PortID cpu_side_port_id)
Function called by the port when the crossbar is receiving a Functional transaction.
std::unique_ptr< Packet > pendingDelete
Upstream caches need this packet until true is returned, so hold it for deletion until a subsequent c...
CoherentXBar(const CoherentXBarParams *p)
Declaration of the coherent crossbar memory-side port type, one will be instantiated for each of the ...
std::vector< SnoopRespLayer * > snoopLayers
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
std::unordered_map< PacketId, PacketPtr > outstandingCMO
Store the outstanding cache maintenance that we are expecting snoop responses from so we can determin...
CoherentXBar & xbar
A reference to the crossbar to which this port belongs.
RespPacketQueue queue
A normal packet queue used to store responses.
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
Tick recvAtomicSnoop(PacketPtr pkt) override
Receive an atomic snoop request packet from our peer.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests, one for responses, and one for snoop re...
void recvReqRetry() override
Called by the peer if sendTimingReq was called on this peer (causing recvTimingReq to be called on th...
const std::string name() const
Return port name (for DPRINTF).
A simple distribution stat.
const bool pointOfCoherency
Is this crossbar the point of coherency?
void recvFunctional(PacketPtr pkt) override
Receive a functional request packet from the peer.
SnoopFilter * snoopFilter
A snoop filter that tracks cache line residency and can restrict the broadcast needed for probes.
bool recvTimingSnoopResp(PacketPtr pkt, PortID cpu_side_port_id)
virtual void regStats()
Callback to set stat parameters.
QueuedResponsePort & cpuSidePort
The port which we mirror internally.
Tick recvAtomicBackdoor(PacketPtr pkt, PortID cpu_side_port_id, MemBackdoorPtr *backdoor=nullptr)
void forwardTiming(PacketPtr pkt, PortID exclude_cpu_side_port_id)
Forward a timing packet to our snoopers, potentially excluding one of the connected coherent requesto...
const unsigned int maxOutstandingSnoopCheck
Maximum number of outstading snoops sanity check.
This snoop filter keeps track of which connected port has a particular line of data.
AddrRangeList getAddrRanges() const override
Get a list of the non-overlapping address ranges the owner is responsible for.
std::vector< SnoopRespPort * > snoopRespPorts
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
const unsigned int maxRoutingTableSizeCheck
Maximum routing table size sanity check.
bool isDestination(const PacketPtr pkt) const
Determine if the packet's destination is the memory below.
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
const Cycles snoopResponseLatency
Cycles of snoop response latency.
void sendRetrySnoopResp()
Send a retry to the request port that previously attempted a sendTimingSnoopResp to this response por...
Cycles is a wrapper class for representing cycle counts, i.e.
CoherentXBar & xbar
A reference to the crossbar to which this port belongs.
bool recvTimingResp(PacketPtr pkt) override
Receive a timing response from the peer.
std::vector< QueuedResponsePort * > snoopPorts
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
A coherent crossbar connects a number of (potentially) snooping requestors and responders,...
std::unordered_set< RequestPtr > outstandingSnoop
Store the outstanding requests that we are expecting snoop responses from so we can determine which s...
void sendRetryResp() override
Override the sending of retries and pass them on through the mirrored CPU-side port.
Tick recvAtomic(PacketPtr pkt) override
Receive an atomic request packet from the peer.
std::pair< MemCmd, Tick > forwardAtomic(PacketPtr pkt, PortID exclude_cpu_side_port_id)
Forward an atomic packet to our snoopers, potentially excluding one of the connected coherent request...
Stats::Scalar snoopTraffic
#define panic(...)
This implements a cprintf based panic() function.
void recvTimingSnoopReq(PacketPtr pkt) override
Receive a timing snoop request from the peer.
Declaration of the coherent crossbar CPU-side port type, one will be instantiated for each of the mem...
void forwardFunctional(PacketPtr pkt, PortID exclude_cpu_side_port_id)
Forward a functional packet to our snoopers, potentially excluding one of the connected coherent requ...
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17