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 cache_responding = pkt->cacheResponding();
149 // for normal requests, going downstream, the express snoop flag
150 // and the cache responding flag should always be the same
151 assert(is_express_snoop == cache_responding);
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 by
240 // checking if a cache set the cacheResponding flag during the
241 // snooping above
242 const bool expect_snoop_resp = !cache_responding && pkt->cacheResponding();
243 const bool expect_response = pkt->needsResponse() &&
244 !pkt->cacheResponding();
245
246 // since it is a normal request, attempt to send the packet
247 bool success = masterPorts[master_port_id]->sendTimingReq(pkt);
248
249 if (snoopFilter && !system->bypassCaches()) {
250 // Let the snoop filter know about the success of the send operation
251 snoopFilter->finishRequest(!success, pkt);
252 }
253
254 // check if we were successful in sending the packet onwards
255 if (!success) {
256 // express snoops should never be forced to retry
257 assert(!is_express_snoop);
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 // remember if a cache has already committed to responding so we
390 // can see if it changes during the snooping
391 const bool cache_responding = pkt->cacheResponding();
392
393 assert(pkt->snoopDelay == 0);
394
395 if (snoopFilter) {
396 // let the Snoop Filter work its magic and guide probing
397 auto sf_res = snoopFilter->lookupSnoop(pkt);
398 // the time required by a packet to be delivered through
399 // the xbar has to be charged also with to lookup latency

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

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

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

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

--- 136 unchanged lines hidden ---