coherent_xbar.cc (13856:c4a7f25aacb4) coherent_xbar.cc (14006:5258c91ede20)
1/*
1/*
2 * Copyright (c) 2011-2018 ARM Limited
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),
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),
62 pointOfCoherency(p->point_of_coherency),
63 pointOfUnification(p->point_of_unification)
64{
65 // create the ports based on the size of the master and slave
66 // vector ports, and the presence of the default port, the ports
67 // are enumerated starting from zero
68 for (int i = 0; i < p->port_master_connection_count; ++i) {
69 std::string portName = csprintf("%s.master[%d]", name(), i);

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

320 // response
321 if (expect_snoop_resp) {
322 // we should never have an exsiting request outstanding
323 assert(outstandingSnoop.find(pkt->req) ==
324 outstandingSnoop.end());
325 outstandingSnoop.insert(pkt->req);
326
327 // basic sanity check on the outstanding snoops
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
328 panic_if(outstandingSnoop.size() > 512,
329 "Outstanding snoop requests exceeded 512\n");
330 panic_if(outstandingSnoop.size() > maxOutstandingSnoopCheck,
331 "%s: Outstanding snoop requests exceeded %d\n",
332 name(), maxOutstandingSnoopCheck);
330 }
331
332 // remember where to route the normal response to
333 if (expect_response || expect_snoop_resp) {
334 assert(routeTo.find(pkt->req) == routeTo.end());
335 routeTo[pkt->req] = slave_port_id;
336
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
337 panic_if(routeTo.size() > 512,
338 "Routing table exceeds 512 packets\n");
340 panic_if(routeTo.size() > maxRoutingTableSizeCheck,
341 "%s: Routing table exceeds %d packets\n",
342 name(), maxRoutingTableSizeCheck);
339 }
340
341 // update the layer state and schedule an idle event
342 reqLayers[master_port_id]->succeededTiming(packetFinishTime);
343 }
344
345 // stats updates only consider packets that were successfully sent
346 pktCount[slave_port_id][master_port_id]++;

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

396 outstandingCMO.erase(cmo_lookup);
397 } else {
398 respond_directly = false;
399 outstandingCMO.emplace(pkt->id, deferred_rsp);
400 if (!pkt->isWrite()) {
401 assert(routeTo.find(pkt->req) == routeTo.end());
402 routeTo[pkt->req] = slave_port_id;
403
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
404 panic_if(routeTo.size() > 512,
405 "Routing table exceeds 512 packets\n");
408 panic_if(routeTo.size() > maxRoutingTableSizeCheck,
409 "%s: Routing table exceeds %d packets\n",
410 name(), maxRoutingTableSizeCheck);
406 }
407 }
408 }
409
410
411 if (respond_directly) {
412 assert(rsp_pkt->needsResponse());
413 assert(success);

--- 720 unchanged lines hidden ---
411 }
412 }
413 }
414
415
416 if (respond_directly) {
417 assert(rsp_pkt->needsResponse());
418 assert(success);

--- 720 unchanged lines hidden ---