Deleted Added
sdiff udiff text old ( 11199:929fd978ab4e ) new ( 11284:b3926db25371 )
full compact
1/*
2 * Copyright (c) 2011-2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 131 unchanged lines hidden (view full) ---

140bool
141CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
142{
143 // determine the source port based on the id
144 SlavePort *src_port = slavePorts[slave_port_id];
145
146 // remember if the packet is an express snoop
147 bool is_express_snoop = pkt->isExpressSnoop();
148 bool is_inhibited = pkt->memInhibitAsserted();
149 // for normal requests, going downstream, the express snoop flag
150 // and the inhibited flag should always be the same
151 assert(is_express_snoop == is_inhibited);
152
153 // determine the destination based on the address
154 PortID master_port_id = findPort(pkt->getAddr());
155
156 // test if the crossbar should be considered occupied for the current
157 // port, and exclude express snoops from the check
158 if (!is_express_snoop && !reqLayers[master_port_id]->tryTiming(src_port)) {
159 DPRINTF(CoherentXBar, "recvTimingReq: src %s %s 0x%x BUSY\n",

--- 71 unchanged lines hidden (view full) ---

231 reqLayers[master_port_id]->succeededTiming(packetFinishTime);
232
233 // queue the packet for deletion
234 pendingDelete.reset(pkt);
235
236 return true;
237 }
238
239 // remember if the packet will generate a snoop response
240 const bool expect_snoop_resp = !is_inhibited && pkt->memInhibitAsserted();
241 const bool expect_response = pkt->needsResponse() &&
242 !pkt->memInhibitAsserted();
243
244 // since it is a normal request, attempt to send the packet
245 bool success = masterPorts[master_port_id]->sendTimingReq(pkt);
246
247 if (snoopFilter && !system->bypassCaches()) {
248 // Let the snoop filter know about the success of the send operation
249 snoopFilter->finishRequest(!success, pkt);
250 }
251
252 // check if we were successful in sending the packet onwards
253 if (!success) {
254 // express snoops and inhibited packets should never be forced
255 // to retry
256 assert(!is_express_snoop);
257 assert(!pkt->memInhibitAsserted());
258
259 // restore the header delay
260 pkt->headerDelay = old_header_delay;
261
262 DPRINTF(CoherentXBar, "recvTimingReq: src %s %s 0x%x RETRY\n",
263 src_port->name(), pkt->cmdString(), pkt->getAddr());
264
265 // update the layer state and schedule an idle event

--- 115 unchanged lines hidden (view full) ---

381
382 // we should only see express snoops from caches
383 assert(pkt->isExpressSnoop());
384
385 // set the packet header and payload delay, for now use forward latency
386 // @todo Assess the choice of latency further
387 calcPacketTiming(pkt, forwardLatency * clockPeriod());
388
389 // remeber if the packet is inhibited so we can see if it changes
390 const bool is_inhibited = pkt->memInhibitAsserted();
391
392 assert(pkt->snoopDelay == 0);
393
394 if (snoopFilter) {
395 // let the Snoop Filter work its magic and guide probing
396 auto sf_res = snoopFilter->lookupSnoop(pkt);
397 // the time required by a packet to be delivered through
398 // the xbar has to be charged also with to lookup latency

--- 10 unchanged lines hidden (view full) ---

409 forwardTiming(pkt, InvalidPortID);
410 }
411
412 // add the snoop delay to our header delay, and then reset it
413 pkt->headerDelay += pkt->snoopDelay;
414 pkt->snoopDelay = 0;
415
416 // if we can expect a response, remember how to route it
417 if (!is_inhibited && pkt->memInhibitAsserted()) {
418 assert(routeTo.find(pkt->req) == routeTo.end());
419 routeTo[pkt->req] = master_port_id;
420 }
421
422 // a snoop request came from a connected slave device (one of
423 // our master ports), and if it is not coming from the slave
424 // device responsible for the address range something is
425 // wrong, hence there is nothing further to do as the packet

--- 329 unchanged lines hidden (view full) ---

755 // in contrast to a functional access, we have to keep on
756 // going as all snoopers must be updated even if we get a
757 // response
758 if (!pkt->isResponse())
759 continue;
760
761 // response from snoop agent
762 assert(pkt->cmd != orig_cmd);
763 assert(pkt->memInhibitAsserted());
764 // should only happen once
765 assert(snoop_response_cmd == MemCmd::InvalidCmd);
766 // save response state
767 snoop_response_cmd = pkt->cmd;
768 snoop_response_latency = latency;
769
770 if (snoopFilter) {
771 // Handle responses by the snoopers and differentiate between

--- 136 unchanged lines hidden ---