Go to the documentation of this file.
50 #include "debug/NoncoherentXBar.hh"
51 #include "debug/XBar.hh"
62 for (
int i = 0;
i <
p.port_mem_side_ports_connection_count; ++
i) {
63 std::string portName =
csprintf(
"%s.mem_side_port[%d]",
name(),
i);
72 if (
p.port_default_connection_count) {
74 std::string portName =
name() +
".default";
83 for (
int i = 0;
i <
p.port_cpu_side_ports_connection_count; ++
i) {
84 std::string portName =
csprintf(
"%s.cpu_side_ports[%d]",
name(),
i);
115 if (!
reqLayers[mem_side_port_id]->tryTiming(src_port)) {
147 bool success =
memSidePorts[mem_side_port_id]->sendTimingReq(pkt);
157 reqLayers[mem_side_port_id]->failedTiming(src_port,
164 if (expect_response) {
169 reqLayers[mem_side_port_id]->succeededTiming(packetFinishTime);
172 pktCount[cpu_side_port_id][mem_side_port_id]++;
173 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
186 const auto route_lookup =
routeTo.find(pkt->
req);
187 assert(route_lookup !=
routeTo.end());
188 const PortID cpu_side_port_id = route_lookup->second;
194 if (!
respLayers[cpu_side_port_id]->tryTiming(src_port)) {
227 respLayers[cpu_side_port_id]->succeededTiming(packetFinishTime);
230 pktCount[cpu_side_port_id][mem_side_port_id]++;
231 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
243 reqLayers[mem_side_port_id]->recvRetry();
261 pktCount[cpu_side_port_id][mem_side_port_id]++;
262 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
267 Tick response_latency = backdoor ?
268 mem_side_port->sendAtomicBackdoor(pkt, *backdoor) :
269 mem_side_port->sendAtomic(pkt);
277 pktCount[cpu_side_port_id][mem_side_port_id]++;
278 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
284 return response_latency;
293 "recvFunctional: packet src %s addr 0x%x cmd %s\n",
303 if (
p->trySatisfyFunctional(pkt)) {
Tick curTick()
The universal simulation clock.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
const std::string name() const
Return port name (for DPRINTF).
Declaration of the crossbar memory-side port type, one will be instantiated for each of the CPU-side ...
std::vector< QueuedResponsePort * > cpuSidePorts
The memory-side ports and CPU-side ports of the crossbar.
const Cycles frontendLatency
Cycles of front-end pipeline including the delay to accept the request and to decode the address.
A non-coherent crossbar connects a number of non-snooping memory-side ports and cpu_sides,...
std::unordered_map< RequestPtr, PortID > routeTo
Remember where request packets came from so that we can route responses to the appropriate port.
RequestPtr req
A pointer to the original request.
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests and one for responses.
void recvFunctional(PacketPtr pkt, PortID cpu_side_port_id)
statistics::Vector2d pktCount
bool cacheResponding() const
const Cycles responseLatency
std::string csprintf(const char *format, const Args &...args)
Tick recvAtomicBackdoor(PacketPtr pkt, PortID cpu_side_port_id, MemBackdoorPtr *backdoor=nullptr)
const PortID InvalidPortID
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Cycles is a wrapper class for representing cycle counts, i.e.
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
Declaration of the non-coherent crossbar CPU-side port type, one will be instantiated for each of the...
virtual ~NoncoherentXBar()
const Cycles forwardLatency
virtual std::string name() const
statistics::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
uint64_t Tick
Tick count type.
std::vector< RespLayer * > respLayers
bool needsResponse() const
virtual bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id)
PortID defaultPortID
Port that handles requests that don't match any of the interfaces.
Tick clockEdge(Cycles cycles=Cycles(0)) const
Determine the tick when a cycle begins, by default the current one, but the argument also enables the...
A ResponsePort is a specialization of a port.
NoncoherentXBar(const NoncoherentXBarParams &p)
statistics::Vector2d pktSize
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
virtual bool recvTimingResp(PacketPtr pkt, PortID mem_side_port_id)
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
bool isExpressSnoop() const
PortID findPort(AddrRange addr_range)
Find which port connected to this crossbar (if any) should be given a packet with this address range.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
AddrRange getAddrRange() const
Get address range to which this packet belongs.
int cmdToIndex() const
Return the index of this command.
void recvReqRetry(PortID mem_side_port_id)
std::vector< RequestPort * > memSidePorts
Generated on Tue Sep 7 2021 14:53:48 for gem5 by doxygen 1.8.17