51 #ifndef __MEM_COHERENT_XBAR_HH__
52 #define __MEM_COHERENT_XBAR_HH__
54 #include <unordered_set>
58 #include "params/CoherentXBar.hh"
248 panic(
"SnoopRespPort should never see timing response\n");
350 PortID exclude_slave_port_id)
369 PortID exclude_slave_port_id,
370 PortID source_master_port_id,
413 #endif //__MEM_COHERENT_XBAR_HH__
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
std::vector< SnoopRespLayer * > snoopLayers
SnoopRespPort(QueuedSlavePort &slave_port, CoherentXBar &_xbar)
Create a snoop response port that mirrors a given slave port.
Cycles is a wrapper class for representing cycle counts, i.e.
std::vector< RespLayer * > respLayers
const PortID InvalidPortID
const std::string name() const
Return port name (for DPRINTF).
virtual void recvFunctionalSnoop(PacketPtr pkt)
When receiving a functional snoop request, pass it to the crossbar.
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)
Timing function called by port when it is once again able to process requests.
Stats::Distribution snoopFanout
Internal class to bridge between an incoming snoop response from a slave port and forwarding it throu...
virtual bool isSnooping() const
Determine if this port should be considered a snooper.
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...
virtual Tick recvAtomic(PacketPtr pkt)
When receiving an atomic request, pass it to the crossbar.
Stats::Scalar snoopTraffic
const Cycles snoopResponseLatency
Cycles of snoop response latency.
Tick recvAtomic(PacketPtr pkt, PortID slave_port_id)
Function called by the port when the crossbar is recieving a Atomic transaction.
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.
virtual bool recvTimingResp(PacketPtr pkt)
When receiving a timing response, pass it to the crossbar.
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)
Function called by the port when the crossbar is recieving a Timing request packet.
CoherentXBarMasterPort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
virtual AddrRangeList getAddrRanges() const
Return the union of all adress ranges seen by this crossbar.
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
void recvReqRetry()
Provided as necessary.
RespPacketQueue queue
A normal packet queue used to store responses.
uint64_t Tick
Tick count type.
A simple distribution stat.
void recvTimingSnoopReq(PacketPtr pkt, PortID master_port_id)
Function called by the port when the crossbar is recieving a timing snoop request.
virtual bool recvTimingSnoopResp(PacketPtr pkt)
When receiving a timing snoop response, pass it to the crossbar.
CoherentXBar(const CoherentXBarParams *p)
SnoopFilter * snoopFilter
A snoop filter that tracks cache line residency and can restrict the broadcast needed for probes...
bool recvTimingResp(PacketPtr pkt)
Provided as necessary.
void sendRetryResp()
Override the sending of retries and pass them on through the mirrored slave port. ...
bool recvTimingResp(PacketPtr pkt, PortID master_port_id)
Function called by the port when the crossbar is recieving a Timing response packet.
void forwardTiming(PacketPtr pkt, PortID exclude_slave_port_id)
Forward a timing packet to our snoopers, potentially excluding one of the connected coherent masters ...
virtual Tick recvAtomicSnoop(PacketPtr pkt)
When receiving an atomic snoop request, pass it to the crossbar.
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.
virtual void recvReqRetry()
When reciving a retry from the peer port (at id), pass it to the crossbar.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
QueuedSlavePort & slavePort
The port which we mirror internally.
Tick recvAtomicSnoop(PacketPtr pkt, PortID master_port_id)
Function called by the port when the crossbar is recieving an atomic snoop transaction.
std::vector< SnoopRespPort * > snoopRespPorts
virtual void recvRangeChange()
When reciving a range change from the peer port (at id), pass it to the crossbar. ...
CoherentXBarSlavePort(const std::string &_name, CoherentXBar &_xbar, PortID _id)
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...
virtual bool recvTimingReq(PacketPtr pkt)
When receiving a timing request, pass it to the crossbar.
virtual void regStats()
Register statistics for this object.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
virtual void recvTimingSnoopReq(PacketPtr pkt)
When receiving a timing snoop request, pass it to the crossbar.
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
const bool pointOfCoherency
Is this crossbar the point of coherency?
virtual void recvFunctional(PacketPtr pkt)
When receiving a functional request, pass it to the crossbar.
bool recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id)
Function called by the port when the crossbar is recieving a timing snoop response.
This snoop filter keeps track of which connected port has a particular line of data.
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...
void recvFunctional(PacketPtr pkt, PortID slave_port_id)
Function called by the port when the crossbar is recieving a Functional transaction.
bool sinkPacket(const PacketPtr pkt) const
Determine if the crossbar should sink the packet, as opposed to forwarding it, or responding...
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
std::vector< QueuedSlavePort * > snoopPorts