coherent_xbar.cc (11334:9bd2e84abdca) | coherent_xbar.cc (11544:2383451ff6a5) |
---|---|
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 --- 101 unchanged lines hidden (view full) --- 110 delete l; 111 for (auto p: snoopRespPorts) 112 delete p; 113} 114 115void 116CoherentXBar::init() 117{ | 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 --- 101 unchanged lines hidden (view full) --- 110 delete l; 111 for (auto p: snoopRespPorts) 112 delete p; 113} 114 115void 116CoherentXBar::init() 117{ |
118 // the base class is responsible for determining the block size | |
119 BaseXBar::init(); 120 121 // iterate over our slave ports and determine which of our 122 // neighbouring master ports are snooping and add them as snoopers 123 for (const auto& p: slavePorts) { 124 // check if the connected master port is snooping 125 if (p->isSnooping()) { 126 DPRINTF(AddrRanges, "Adding snooping master %s\n", --- 101 unchanged lines hidden (view full) --- 228 // snooping above 229 const bool expect_snoop_resp = !cache_responding && pkt->cacheResponding(); 230 bool expect_response = pkt->needsResponse() && !pkt->cacheResponding(); 231 232 const bool sink_packet = sinkPacket(pkt); 233 234 // in certain cases the crossbar is responsible for responding 235 bool respond_directly = false; | 118 BaseXBar::init(); 119 120 // iterate over our slave ports and determine which of our 121 // neighbouring master ports are snooping and add them as snoopers 122 for (const auto& p: slavePorts) { 123 // check if the connected master port is snooping 124 if (p->isSnooping()) { 125 DPRINTF(AddrRanges, "Adding snooping master %s\n", --- 101 unchanged lines hidden (view full) --- 227 // snooping above 228 const bool expect_snoop_resp = !cache_responding && pkt->cacheResponding(); 229 bool expect_response = pkt->needsResponse() && !pkt->cacheResponding(); 230 231 const bool sink_packet = sinkPacket(pkt); 232 233 // in certain cases the crossbar is responsible for responding 234 bool respond_directly = false; |
236 | 235 // store the original address as an address mapper could possibly 236 // modify the address upon a sendTimingRequest 237 const Addr addr(pkt->getAddr()); |
237 if (sink_packet) { 238 DPRINTF(CoherentXBar, "Not forwarding %s to %#llx\n", 239 pkt->cmdString(), pkt->getAddr()); 240 } else { 241 // determine if we are forwarding the packet, or responding to 242 // it 243 if (!pointOfCoherency || pkt->isRead() || pkt->isWrite()) { 244 // if we are passing on, rather than sinking, a packet to --- 15 unchanged lines hidden (view full) --- 260 respond_directly = true; 261 assert(!expect_snoop_resp); 262 expect_response = false; 263 } 264 } 265 266 if (snoopFilter && !system->bypassCaches()) { 267 // Let the snoop filter know about the success of the send operation | 238 if (sink_packet) { 239 DPRINTF(CoherentXBar, "Not forwarding %s to %#llx\n", 240 pkt->cmdString(), pkt->getAddr()); 241 } else { 242 // determine if we are forwarding the packet, or responding to 243 // it 244 if (!pointOfCoherency || pkt->isRead() || pkt->isWrite()) { 245 // if we are passing on, rather than sinking, a packet to --- 15 unchanged lines hidden (view full) --- 261 respond_directly = true; 262 assert(!expect_snoop_resp); 263 expect_response = false; 264 } 265 } 266 267 if (snoopFilter && !system->bypassCaches()) { 268 // Let the snoop filter know about the success of the send operation |
268 snoopFilter->finishRequest(!success, pkt); | 269 snoopFilter->finishRequest(!success, addr); |
269 } 270 271 // check if we were successful in sending the packet onwards 272 if (!success) { 273 // express snoops should never be forced to retry 274 assert(!is_express_snoop); 275 276 // restore the header delay --- 378 unchanged lines hidden (view full) --- 655 " SF size: %i lat: %i\n", __func__, 656 slavePorts[slave_port_id]->name(), pkt->cmdString(), 657 pkt->getAddr(), sf_res.first.size(), sf_res.second); 658 659 // let the snoop filter know about the success of the send 660 // operation, and do it even before sending it onwards to 661 // avoid situations where atomic upward snoops sneak in 662 // between and change the filter state | 270 } 271 272 // check if we were successful in sending the packet onwards 273 if (!success) { 274 // express snoops should never be forced to retry 275 assert(!is_express_snoop); 276 277 // restore the header delay --- 378 unchanged lines hidden (view full) --- 656 " SF size: %i lat: %i\n", __func__, 657 slavePorts[slave_port_id]->name(), pkt->cmdString(), 658 pkt->getAddr(), sf_res.first.size(), sf_res.second); 659 660 // let the snoop filter know about the success of the send 661 // operation, and do it even before sending it onwards to 662 // avoid situations where atomic upward snoops sneak in 663 // between and change the filter state |
663 snoopFilter->finishRequest(false, pkt); | 664 snoopFilter->finishRequest(false, pkt->getAddr()); |
664 665 snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID, 666 sf_res.first); 667 } else { 668 snoop_result = forwardAtomic(pkt, slave_port_id); 669 } 670 snoop_response_cmd = snoop_result.first; 671 snoop_response_latency += snoop_result.second; --- 307 unchanged lines hidden --- | 665 666 snoop_result = forwardAtomic(pkt, slave_port_id, InvalidPortID, 667 sf_res.first); 668 } else { 669 snoop_result = forwardAtomic(pkt, slave_port_id); 670 } 671 snoop_response_cmd = snoop_result.first; 672 snoop_response_latency += snoop_result.second; --- 307 unchanged lines hidden --- |