Deleted Added
sdiff udiff text old ( 11129:48c02e8b0bbb ) new ( 11130:45a23e44e93d )
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

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

600 // check with the snoop filter where to forward this packet
601 auto sf_res =
602 snoopFilter->lookupRequest(pkt, *slavePorts[slave_port_id]);
603 snoop_response_latency += sf_res.second * clockPeriod();
604 DPRINTF(CoherentXBar, "%s: src %s %s 0x%x"\
605 " SF size: %i lat: %i\n", __func__,
606 slavePorts[slave_port_id]->name(), pkt->cmdString(),
607 pkt->getAddr(), sf_res.first.size(), sf_res.second);
608 snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID,
609 sf_res.first);
610 } else {
611 snoop_result = forwardAtomic(pkt, slave_port_id);
612 }
613 snoop_response_cmd = snoop_result.first;
614 snoop_response_latency += snoop_result.second;
615 }
616
617 // even if we had a snoop response, we must continue and also
618 // perform the actual request at the destination
619 PortID master_port_id = findPort(pkt->getAddr());
620
621 // stats updates for the request
622 pktCount[slave_port_id][master_port_id]++;
623 pktSize[slave_port_id][master_port_id] += pkt_size;
624 transDist[pkt_cmd]++;
625
626 // forward the request to the appropriate destination
627 Tick response_latency = masterPorts[master_port_id]->sendAtomic(pkt);
628
629 // Lower levels have replied, tell the snoop filter
630 if (snoopFilter && !system->bypassCaches() && pkt->isResponse()) {
631 snoopFilter->updateResponse(pkt, *slavePorts[slave_port_id]);
632 }
633
634 // if we got a response from a snooper, restore it here
635 if (snoop_response_cmd != MemCmd::InvalidCmd) {
636 // no one else should have responded
637 assert(!pkt->isResponse());
638 pkt->cmd = snoop_response_cmd;

--- 233 unchanged lines hidden ---