Deleted Added
sdiff udiff text old ( 12778:ca8c50112a66 ) new ( 12780:14937f6495b4 )
full compact
1/*
2 * Copyright (c) 2011-2018 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

146
147 // remember if the packet is an express snoop
148 bool is_express_snoop = pkt->isExpressSnoop();
149 bool cache_responding = pkt->cacheResponding();
150 // for normal requests, going downstream, the express snoop flag
151 // and the cache responding flag should always be the same
152 assert(is_express_snoop == cache_responding);
153
154 // determine the destination based on the destination address range
155 AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
156 PortID master_port_id = findPort(addr_range);
157
158 // test if the crossbar should be considered occupied for the current
159 // port, and exclude express snoops from the check
160 if (!is_express_snoop && !reqLayers[master_port_id]->tryTiming(src_port)) {
161 DPRINTF(CoherentXBar, "%s: src %s packet %s BUSY\n", __func__,
162 src_port->name(), pkt->print());
163 return false;
164 }

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

547 routeTo[pkt->req] = master_port_id;
548 }
549
550 // a snoop request came from a connected slave device (one of
551 // our master ports), and if it is not coming from the slave
552 // device responsible for the address range something is
553 // wrong, hence there is nothing further to do as the packet
554 // would be going back to where it came from
555 AddrRange addr_range M5_VAR_USED =
556 RangeSize(pkt->getAddr(), pkt->getSize());
557 assert(findPort(addr_range) == master_port_id);
558}
559
560bool
561CoherentXBar::recvTimingSnoopResp(PacketPtr pkt, PortID slave_port_id)
562{
563 // determine the source port based on the id
564 SlavePort* src_port = slavePorts[slave_port_id];
565

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

779
780 // set up a sensible default value
781 Tick response_latency = 0;
782
783 const bool sink_packet = sinkPacket(pkt);
784
785 // even if we had a snoop response, we must continue and also
786 // perform the actual request at the destination
787 AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
788 PortID master_port_id = findPort(addr_range);
789
790 if (sink_packet) {
791 DPRINTF(CoherentXBar, "%s: Not forwarding %s\n", __func__,
792 pkt->print());
793 } else {
794 if (forwardPacket(pkt)) {
795 // make sure that the write request (e.g., WriteClean)
796 // will stop at the memory below if this crossbar is its

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

1004 // here
1005 if (p->checkFunctional(pkt)) {
1006 if (pkt->needsResponse())
1007 pkt->makeResponse();
1008 return;
1009 }
1010 }
1011
1012 PortID dest_id = findPort(RangeSize(pkt->getAddr(), pkt->getSize()));
1013
1014 masterPorts[dest_id]->sendFunctional(pkt);
1015 }
1016}
1017
1018void
1019CoherentXBar::recvFunctionalSnoop(PacketPtr pkt, PortID master_port_id)
1020{

--- 113 unchanged lines hidden ---