Go to the documentation of this file.
46 #ifndef __MEM_XBAR_HH__
47 #define __MEM_XBAR_HH__
50 #include <unordered_map>
55 #include "params/BaseXBar.hh"
87 template <
typename SrcType,
typename DstType>
172 virtual void sendRetry(SrcType* retry_port) = 0;
245 const std::string&
_name) :
268 const std::string&
_name) :
291 const std::string&
_name) :
324 std::unordered_map<RequestPtr, PortID>
routeTo;
414 #endif //__MEM_XBAR_HH__
void retryWaiting()
Send a retry to the port at the head of waitingForLayer.
Stats::Scalar occupancy
Stats for occupancy and utilization.
const Cycles forwardLatency
A ResponsePort is a specialization of a port.
std::vector< QueuedResponsePort * > cpuSidePorts
The memory-side ports and CPU-side ports of the crossbar.
std::vector< bool > gotAddrRanges
Remember for each of the memory-side ports of the crossbar if we got an address range from the connec...
Stats::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
const PortID InvalidPortID
State
We declare an enum to track the state of the layer.
uint64_t Tick
Tick count type.
Port & getPort(const std::string &if_name, PortID idx=InvalidPortID) override
A function used to return the port associated with this object.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
RespLayer(ResponsePort &_port, BaseXBar &_xbar, const std::string &_name)
Create a response layer and give it a name.
PortID findPort(AddrRange addr_range)
Find which port connected to this crossbar (if any) should be given a packet with this address range.
AddrRangeList getAddrRanges() const
Return the address ranges the crossbar is responsible for.
void sendRetry(RequestPort *retry_port) override
Sending the actual retry, in a manner specific to the individual layers.
Stats::Formula utilization
const Cycles frontendLatency
Cycles of front-end pipeline including the delay to accept the request and to decode the address.
A vector of scalar stats.
BaseXBar(const BaseXBarParams *p)
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
PortID defaultPortID
Port that handles requests that don't match any of the interfaces.
DrainState
Object drain/handover states.
This is a simple scalar statistic, like a counter.
SnoopRespLayer(RequestPort &_port, BaseXBar &_xbar, const std::string &_name)
Create a snoop response layer and give it a name.
void succeededTiming(Tick busy_time)
Deal with a destination port accepting a packet by potentially removing the source port from the retr...
Interface for objects that might require draining before checkpointing.
The AddrRange class encapsulates an address range, and supports a number of tests to check if two ran...
void failedTiming(SrcType *src_port, Tick busy_time)
Deal with a destination port not accepting a packet by potentially adding the source port to the retr...
Ports are used to interface objects to each other.
const bool useDefaultRange
If true, use address range provided by default device.
DstType & port
The destination port this layer converges at.
std::unordered_map< RequestPtr, PortID > routeTo
Remember where request packets came from so that we can route responses to the appropriate port.
virtual void sendRetryResp()
Send a retry to the response port that previously attempted a sendTimingResp to this request port and...
std::deque< SrcType * > waitingForLayer
A deque of ports that retry should be called on because the original send was delayed due to a busy l...
void occupyLayer(Tick until)
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
void sendRetry(ResponsePort *retry_port) override
Sending the actual retry, in a manner specific to the individual layers.
virtual void sendRetry(SrcType *retry_port)=0
Sending the actual retry, in a manner specific to the individual layers.
Layer(DstType &_port, BaseXBar &_xbar, const std::string &_name)
Create a layer and give it a name.
A layer is an internal crossbar arbitration point with its own flow control.
AddrRangeMap< PortID, 3 > portMap
virtual void recvRangeChange(PortID mem_side_port_id)
Function called by the port when the crossbar is recieving a range change.
DrainState drain() override
Drain according to the normal semantics, so that the crossbar can tell the layer to drain,...
A 2-Dimensional vecto of scalar stats.
BaseXBar & xbar
The crossbar this layer is a part of.
EventFunctionWrapper releaseEvent
const Cycles headerLatency
Cycles the layer is occupied processing the packet header.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
bool tryTiming(SrcType *src_port)
Determine if the layer accepts a packet from a specific port.
SrcType * waitingForPeer
Track who is waiting for the retry when receiving it from a peer.
const Cycles responseLatency
void sendRetry(ResponsePort *retry_port) override
Sending the actual retry, in a manner specific to the individual layers.
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.
void sendRetryReq()
Send a retry to the request port that previously attempted a sendTimingReq to this response port and ...
void releaseLayer()
Release the layer after being occupied and return to an idle state where we proceed to send a retry t...
AddrRangeList xbarRanges
all contigous ranges seen by this crossbar
void regStats() override
Callback to set stat parameters.
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
void recvRetry()
Handle a retry from a neighbouring module.
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
ReqLayer(RequestPort &_port, BaseXBar &_xbar, const std::string &_name)
Create a request layer and give it a name.
std::vector< RequestPort * > memSidePorts
const std::string name() const
const uint32_t width
the width of the xbar in bytes
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17