1/* |
2 * Copyright (c) 2011-2019 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 --- 43 unchanged lines hidden (view full) --- 54#include "base/trace.hh" 55#include "debug/AddrRanges.hh" 56#include "debug/CoherentXBar.hh" 57#include "sim/system.hh" 58 59CoherentXBar::CoherentXBar(const CoherentXBarParams *p) 60 : BaseXBar(p), system(p->system), snoopFilter(p->snoop_filter), 61 snoopResponseLatency(p->snoop_response_latency), |
62 maxOutstandingSnoopCheck(p->max_outstanding_snoops), 63 maxRoutingTableSizeCheck(p->max_routing_table_size), |
64 pointOfCoherency(p->point_of_coherency), 65 pointOfUnification(p->point_of_unification) 66{ 67 // create the ports based on the size of the master and slave 68 // vector ports, and the presence of the default port, the ports 69 // are enumerated starting from zero 70 for (int i = 0; i < p->port_master_connection_count; ++i) { 71 std::string portName = csprintf("%s.master[%d]", name(), i); --- 250 unchanged lines hidden (view full) --- 322 // response 323 if (expect_snoop_resp) { 324 // we should never have an exsiting request outstanding 325 assert(outstandingSnoop.find(pkt->req) == 326 outstandingSnoop.end()); 327 outstandingSnoop.insert(pkt->req); 328 329 // basic sanity check on the outstanding snoops |
330 panic_if(outstandingSnoop.size() > maxOutstandingSnoopCheck, 331 "%s: Outstanding snoop requests exceeded %d\n", 332 name(), maxOutstandingSnoopCheck); |
333 } 334 335 // remember where to route the normal response to 336 if (expect_response || expect_snoop_resp) { 337 assert(routeTo.find(pkt->req) == routeTo.end()); 338 routeTo[pkt->req] = slave_port_id; 339 |
340 panic_if(routeTo.size() > maxRoutingTableSizeCheck, 341 "%s: Routing table exceeds %d packets\n", 342 name(), maxRoutingTableSizeCheck); |
343 } 344 345 // update the layer state and schedule an idle event 346 reqLayers[master_port_id]->succeededTiming(packetFinishTime); 347 } 348 349 // stats updates only consider packets that were successfully sent 350 pktCount[slave_port_id][master_port_id]++; --- 49 unchanged lines hidden (view full) --- 400 outstandingCMO.erase(cmo_lookup); 401 } else { 402 respond_directly = false; 403 outstandingCMO.emplace(pkt->id, deferred_rsp); 404 if (!pkt->isWrite()) { 405 assert(routeTo.find(pkt->req) == routeTo.end()); 406 routeTo[pkt->req] = slave_port_id; 407 |
408 panic_if(routeTo.size() > maxRoutingTableSizeCheck, 409 "%s: Routing table exceeds %d packets\n", 410 name(), maxRoutingTableSizeCheck); |
411 } 412 } 413 } 414 415 416 if (respond_directly) { 417 assert(rsp_pkt->needsResponse()); 418 assert(success); --- 720 unchanged lines hidden --- |