coherent_xbar.cc (11126:823a6aa11fbd) coherent_xbar.cc (11127:f39c2cc0d44e)
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

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

182
183 // set the packet header and payload delay
184 calcPacketTiming(pkt, xbar_delay);
185
186 // determine how long to be crossbar layer is busy
187 Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay;
188
189 if (!system->bypassCaches()) {
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

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

182
183 // set the packet header and payload delay
184 calcPacketTiming(pkt, xbar_delay);
185
186 // determine how long to be crossbar layer is busy
187 Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay;
188
189 if (!system->bypassCaches()) {
190 assert(pkt->snoopDelay == 0);
191
190 // the packet is a memory-mapped request and should be
191 // broadcasted to our snoopers but the source
192 if (snoopFilter) {
193 // check with the snoop filter where to forward this packet
194 auto sf_res = snoopFilter->lookupRequest(pkt, *src_port);
195 // the time required by a packet to be delivered through
196 // the xbar has to be charged also with to lookup latency
197 // of the snoop filter
198 pkt->headerDelay += sf_res.second * clockPeriod();
199 DPRINTF(CoherentXBar, "recvTimingReq: src %s %s 0x%x"\
200 " SF size: %i lat: %i\n", src_port->name(),
201 pkt->cmdString(), pkt->getAddr(), sf_res.first.size(),
202 sf_res.second);
203 forwardTiming(pkt, slave_port_id, sf_res.first);
204 } else {
205 forwardTiming(pkt, slave_port_id);
206 }
192 // the packet is a memory-mapped request and should be
193 // broadcasted to our snoopers but the source
194 if (snoopFilter) {
195 // check with the snoop filter where to forward this packet
196 auto sf_res = snoopFilter->lookupRequest(pkt, *src_port);
197 // the time required by a packet to be delivered through
198 // the xbar has to be charged also with to lookup latency
199 // of the snoop filter
200 pkt->headerDelay += sf_res.second * clockPeriod();
201 DPRINTF(CoherentXBar, "recvTimingReq: src %s %s 0x%x"\
202 " SF size: %i lat: %i\n", src_port->name(),
203 pkt->cmdString(), pkt->getAddr(), sf_res.first.size(),
204 sf_res.second);
205 forwardTiming(pkt, slave_port_id, sf_res.first);
206 } else {
207 forwardTiming(pkt, slave_port_id);
208 }
209
210 // add the snoop delay to our header delay, and then reset it
211 pkt->headerDelay += pkt->snoopDelay;
212 pkt->snoopDelay = 0;
207 }
208
209 // forwardTiming snooped into peer caches of the sender, and if
210 // this is a clean evict, but the packet is found in a cache, do
211 // not forward it
212 if (pkt->cmd == MemCmd::CleanEvict && pkt->isBlockCached()) {
213 DPRINTF(CoherentXBar, "recvTimingReq: Clean evict 0x%x still cached, "
214 "not forwarding\n", pkt->getAddr());

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

372
373 // update stats here as we know the forwarding will succeed
374 transDist[pkt->cmdToIndex()]++;
375 snoops++;
376
377 // we should only see express snoops from caches
378 assert(pkt->isExpressSnoop());
379
213 }
214
215 // forwardTiming snooped into peer caches of the sender, and if
216 // this is a clean evict, but the packet is found in a cache, do
217 // not forward it
218 if (pkt->cmd == MemCmd::CleanEvict && pkt->isBlockCached()) {
219 DPRINTF(CoherentXBar, "recvTimingReq: Clean evict 0x%x still cached, "
220 "not forwarding\n", pkt->getAddr());

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

378
379 // update stats here as we know the forwarding will succeed
380 transDist[pkt->cmdToIndex()]++;
381 snoops++;
382
383 // we should only see express snoops from caches
384 assert(pkt->isExpressSnoop());
385
386 // set the packet header and payload delay, for now use forward latency
387 // @todo Assess the choice of latency further
388 calcPacketTiming(pkt, forwardLatency * clockPeriod());
389
380 // remeber if the packet is inhibited so we can see if it changes
381 const bool is_inhibited = pkt->memInhibitAsserted();
382
390 // remeber if the packet is inhibited so we can see if it changes
391 const bool is_inhibited = pkt->memInhibitAsserted();
392
393 assert(pkt->snoopDelay == 0);
394
383 if (snoopFilter) {
384 // let the Snoop Filter work its magic and guide probing
385 auto sf_res = snoopFilter->lookupSnoop(pkt);
386 // the time required by a packet to be delivered through
387 // the xbar has to be charged also with to lookup latency
388 // of the snoop filter
389 pkt->headerDelay += sf_res.second * clockPeriod();
390 DPRINTF(CoherentXBar, "recvTimingSnoopReq: src %s %s 0x%x"\
391 " SF size: %i lat: %i\n", masterPorts[master_port_id]->name(),
392 pkt->cmdString(), pkt->getAddr(), sf_res.first.size(),
393 sf_res.second);
394
395 // forward to all snoopers
396 forwardTiming(pkt, InvalidPortID, sf_res.first);
397 } else {
398 forwardTiming(pkt, InvalidPortID);
399 }
400
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
400 // of the snoop filter
401 pkt->headerDelay += sf_res.second * clockPeriod();
402 DPRINTF(CoherentXBar, "recvTimingSnoopReq: src %s %s 0x%x"\
403 " SF size: %i lat: %i\n", masterPorts[master_port_id]->name(),
404 pkt->cmdString(), pkt->getAddr(), sf_res.first.size(),
405 sf_res.second);
406
407 // forward to all snoopers
408 forwardTiming(pkt, InvalidPortID, sf_res.first);
409 } else {
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
401 // if we can expect a response, remember how to route it
402 if (!is_inhibited && pkt->memInhibitAsserted()) {
403 assert(routeTo.find(pkt->req) == routeTo.end());
404 routeTo[pkt->req] = master_port_id;
405 }
406
407 // a snoop request came from a connected slave device (one of
408 // our master ports), and if it is not coming from the slave

--- 459 unchanged lines hidden ---
417 // if we can expect a response, remember how to route it
418 if (!is_inhibited && pkt->memInhibitAsserted()) {
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

--- 459 unchanged lines hidden ---