summaryrefslogtreecommitdiff
path: root/src/mem/noncoherent_xbar.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2018-06-04 16:20:47 +0100
committerNikos Nikoleris <nikos.nikoleris@arm.com>2018-06-19 14:24:25 +0000
commit6cb46ba839b2bf535e294fde9179e2aff6095814 (patch)
tree16cf3f355db2d378b0213406c84de968d51f01fc /src/mem/noncoherent_xbar.cc
parente27448fd0e21dbf4ef77a8bbb33a4053e31cb67d (diff)
downloadgem5-6cb46ba839b2bf535e294fde9179e2aff6095814.tar.xz
mem: Use address range to find the destination port in the xbar
Previously the xbar used the start address to lookup the port map and determine the right destination of an incoming packet. This change uses the full address range to correctly determine the right master. Change-Id: I5118712c43ae65aba64e71bf030bca5c99770bdd Reviewed-on: https://gem5-review.googlesource.com/11117 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/noncoherent_xbar.cc')
-rw-r--r--src/mem/noncoherent_xbar.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/noncoherent_xbar.cc b/src/mem/noncoherent_xbar.cc
index 3ff991fdb..7bd04cb3e 100644
--- a/src/mem/noncoherent_xbar.cc
+++ b/src/mem/noncoherent_xbar.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2015 ARM Limited
+ * Copyright (c) 2011-2015, 2018 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -108,7 +108,8 @@ NoncoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
assert(!pkt->isExpressSnoop());
// determine the destination based on the address
- PortID master_port_id = findPort(pkt->getAddr());
+ AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
+ PortID master_port_id = findPort(addr_range);
// test if the layer should be considered occupied for the current
// port
@@ -253,7 +254,8 @@ NoncoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id)
unsigned int pkt_cmd = pkt->cmdToIndex();
// determine the destination port
- PortID master_port_id = findPort(pkt->getAddr());
+ AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
+ PortID master_port_id = findPort(addr_range);
// stats updates for the request
pktCount[slave_port_id][master_port_id]++;
@@ -303,7 +305,8 @@ NoncoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id)
}
// determine the destination port
- PortID dest_id = findPort(pkt->getAddr());
+ AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
+ PortID dest_id = findPort(addr_range);
// forward the request to the appropriate destination
masterPorts[dest_id]->sendFunctional(pkt);