Go to the documentation of this file.
50 #include "debug/NoncoherentXBar.hh"
51 #include "debug/XBar.hh"
59 for (
int i = 0;
i <
p->port_mem_side_ports_connection_count; ++
i) {
60 std::string portName =
csprintf(
"%s.mem_side_port[%d]",
name(),
i);
69 if (
p->port_default_connection_count) {
71 std::string portName =
name() +
".default";
80 for (
int i = 0;
i <
p->port_cpu_side_ports_connection_count; ++
i) {
81 std::string portName =
csprintf(
"%s.cpu_side_ports[%d]",
name(),
i);
112 if (!
reqLayers[mem_side_port_id]->tryTiming(src_port)) {
144 bool success =
memSidePorts[mem_side_port_id]->sendTimingReq(pkt);
154 reqLayers[mem_side_port_id]->failedTiming(src_port,
161 if (expect_response) {
166 reqLayers[mem_side_port_id]->succeededTiming(packetFinishTime);
169 pktCount[cpu_side_port_id][mem_side_port_id]++;
170 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
183 const auto route_lookup =
routeTo.find(pkt->
req);
184 assert(route_lookup !=
routeTo.end());
185 const PortID cpu_side_port_id = route_lookup->second;
191 if (!
respLayers[cpu_side_port_id]->tryTiming(src_port)) {
224 respLayers[cpu_side_port_id]->succeededTiming(packetFinishTime);
227 pktCount[cpu_side_port_id][mem_side_port_id]++;
228 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
240 reqLayers[mem_side_port_id]->recvRetry();
258 pktCount[cpu_side_port_id][mem_side_port_id]++;
259 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
264 Tick response_latency = backdoor ?
265 mem_side_port->sendAtomicBackdoor(pkt, *backdoor) :
266 mem_side_port->sendAtomic(pkt);
274 pktCount[cpu_side_port_id][mem_side_port_id]++;
275 pktSize[cpu_side_port_id][mem_side_port_id] += pkt_size;
281 return response_latency;
290 "recvFunctional: packet src %s addr 0x%x cmd %s\n",
300 if (
p->trySatisfyFunctional(pkt)) {
315 NoncoherentXBarParams::create()
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.
AddrRange getAddrRange() const
Get address range to which this packet belongs.
bool cacheResponding() const
Stats::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
void recvFunctional(PacketPtr pkt, PortID cpu_side_port_id)
bool isExpressSnoop() const
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
const PortID InvalidPortID
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
virtual bool recvTimingResp(PacketPtr pkt, PortID mem_side_port_id)
RequestPtr req
A pointer to the original request.
PortID findPort(AddrRange addr_range)
Find which port connected to this crossbar (if any) should be given a packet with this address range.
void recvReqRetry(PortID mem_side_port_id)
virtual bool recvTimingReq(PacketPtr pkt, PortID cpu_side_port_id)
const Cycles frontendLatency
Cycles of front-end pipeline including the delay to accept the request and to decode the address.
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
PortID defaultPortID
Port that handles requests that don't match any of the interfaces.
Declaration of the non-coherent crossbar CPU-side port type, one will be instantiated for each of the...
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).
bool needsResponse() const
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...
std::unordered_map< RequestPtr, PortID > routeTo
Remember where request packets came from so that we can route responses to the appropriate port.
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
int cmdToIndex() const
Return the index of this command.
A RequestPort is a specialisation of a Port, which implements the default protocol for the three diff...
Declaration of the crossbar memory-side port type, one will be instantiated for each of the CPU-side ...
const std::string name() const
Return port name (for DPRINTF).
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
virtual ~NoncoherentXBar()
virtual const std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
const Cycles responseLatency
Cycles is a wrapper class for representing cycle counts, i.e.
Tick recvAtomicBackdoor(PacketPtr pkt, PortID cpu_side_port_id, MemBackdoorPtr *backdoor=nullptr)
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests and one for responses.
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
NoncoherentXBar(const NoncoherentXBarParams *p)
A non-coherent crossbar connects a number of non-snooping memory-side ports and cpu_sides,...
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
std::string csprintf(const char *format, const Args &...args)
std::vector< RequestPort * > memSidePorts
std::vector< RespLayer * > respLayers
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:13 for gem5 by doxygen 1.8.17