54 #include "debug/NoncoherentXBar.hh" 55 #include "debug/XBar.hh" 63 for (
int i = 0;
i < p->port_master_connection_count; ++
i) {
73 if (p->port_default_connection_count) {
75 std::string portName =
name() +
".default";
84 for (
int i = 0;
i < p->port_slave_connection_count; ++
i) {
115 if (!
reqLayers[master_port_id]->tryTiming(src_port)) {
147 bool success =
masterPorts[master_port_id]->sendTimingReq(pkt);
157 reqLayers[master_port_id]->failedTiming(src_port,
164 if (expect_response) {
169 reqLayers[master_port_id]->succeededTiming(packetFinishTime);
172 pktCount[slave_port_id][master_port_id]++;
173 pktSize[slave_port_id][master_port_id] += pkt_size;
186 const auto route_lookup =
routeTo.find(pkt->
req);
187 assert(route_lookup !=
routeTo.end());
188 const PortID slave_port_id = route_lookup->second;
194 if (!
respLayers[slave_port_id]->tryTiming(src_port)) {
226 respLayers[slave_port_id]->succeededTiming(packetFinishTime);
229 pktCount[slave_port_id][master_port_id]++;
230 pktSize[slave_port_id][master_port_id] += pkt_size;
260 pktCount[slave_port_id][master_port_id]++;
261 pktSize[slave_port_id][master_port_id] += pkt_size;
266 Tick response_latency = backdoor ?
267 master->sendAtomicBackdoor(pkt, *backdoor) : master->sendAtomic(pkt);
275 pktCount[slave_port_id][master_port_id]++;
276 pktSize[slave_port_id][master_port_id] += pkt_size;
282 return response_latency;
291 "recvFunctional: packet src %s addr 0x%x cmd %s\n",
301 if (
p->trySatisfyFunctional(pkt)) {
316 NoncoherentXBarParams::create()
A MasterPort is a specialisation of a BaseMasterPort, which implements the default protocol for the t...
bool isExpressSnoop() const
Cycles is a wrapper class for representing cycle counts, i.e.
Declaration of the non-coherent crossbar slave port type, one will be instantiated for each of the ma...
virtual bool recvTimingResp(PacketPtr pkt, PortID master_port_id)
const PortID InvalidPortID
std::vector< ReqLayer * > reqLayers
Declare the layers of this crossbar, one vector for requests and one for responses.
std::vector< RespLayer * > respLayers
PortID defaultPortID
Port that handles requests that don't match any of the interfaces.
std::unordered_map< RequestPtr, PortID > routeTo
Remember where request packets came from so that we can route responses to the appropriate port...
bool cacheResponding() const
const Cycles responseLatency
A queued port is a port that has an infinite queue for outgoing packets and thus decouples the module...
A SlavePort is a specialisation of a port.
NoncoherentXBar(const NoncoherentXBarParams *p)
virtual bool recvTimingReq(PacketPtr pkt, PortID slave_port_id)
The base crossbar contains the common elements of the non-coherent and coherent crossbar.
RequestPtr req
A pointer to the original request.
void recvFunctional(PacketPtr pkt, PortID slave_port_id)
Tick curTick()
The current simulated tick.
void recvReqRetry(PortID master_port_id)
std::string csprintf(const char *format, const Args &...args)
bool needsResponse() const
uint32_t headerDelay
The extra delay from seeing the packet until the header is transmitted.
uint64_t Tick
Tick count type.
Stats::Vector transDist
Stats for transaction distribution and data passing through the crossbar.
AddrRange getAddrRange() const
Get address range to which this packet belongs.
void calcPacketTiming(PacketPtr pkt, Tick header_delay)
Calculate the timing parameters for the packet.
virtual ~NoncoherentXBar()
uint32_t payloadDelay
The extra pipelining delay from seeing the packet until the end of payload is transmitted by the comp...
virtual const std::string name() const
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
const Cycles frontendLatency
Cycles of front-end pipeline including the delay to accept the request and to decode the address...
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 non-coherent crossbar connects a number of non-snooping masters and slaves, and routes the request ...
int cmdToIndex() const
Return the index of this command.
std::vector< MasterPort * > masterPorts
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
std::vector< QueuedSlavePort * > slavePorts
The master and slave ports of the crossbar.
const std::string name() const
Return port name (for DPRINTF).
PortID findPort(AddrRange addr_range)
Find which port connected to this crossbar (if any) should be given a packet with this address range...
Declaration of the crossbar master port type, one will be instantiated for each of the slave ports co...
Declaration of a non-coherent crossbar.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
const Cycles forwardLatency
Tick recvAtomicBackdoor(PacketPtr pkt, PortID slave_port_id, MemBackdoorPtr *backdoor=nullptr)
const std::string & cmdString() const
Return the string name of the cmd field (for debugging and tracing).