summaryrefslogtreecommitdiff
path: root/src/mem/noncoherent_xbar.cc
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2019-02-08 15:31:43 +0100
committerDaniel Carvalho <odanrc@yahoo.com.br>2019-04-19 16:34:00 +0000
commit22abf7916e1bce66469020c6fa4d458a13ae84f3 (patch)
treea6900a1b816ce8540c782cbe165e8578f81e8ef8 /src/mem/noncoherent_xbar.cc
parent3d4e412694359f826757b0ca71dea184ff00b457 (diff)
downloadgem5-22abf7916e1bce66469020c6fa4d458a13ae84f3.tar.xz
mem: Allow packet to provide its own addr range
Add a getter to Packet to allow it to provide its own addr range. Change-Id: I2128ea3b71906502d10d9376b050a62407defd23 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17536 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/noncoherent_xbar.cc')
-rw-r--r--src/mem/noncoherent_xbar.cc9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mem/noncoherent_xbar.cc b/src/mem/noncoherent_xbar.cc
index a7b6b0fdc..730c2b226 100644
--- a/src/mem/noncoherent_xbar.cc
+++ b/src/mem/noncoherent_xbar.cc
@@ -108,8 +108,7 @@ NoncoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id)
assert(!pkt->isExpressSnoop());
// determine the destination based on the address
- AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
- PortID master_port_id = findPort(addr_range);
+ PortID master_port_id = findPort(pkt->getAddrRange());
// test if the layer should be considered occupied for the current
// port
@@ -255,8 +254,7 @@ NoncoherentXBar::recvAtomicBackdoor(PacketPtr pkt, PortID slave_port_id,
unsigned int pkt_cmd = pkt->cmdToIndex();
// determine the destination port
- AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
- PortID master_port_id = findPort(addr_range);
+ PortID master_port_id = findPort(pkt->getAddrRange());
// stats updates for the request
pktCount[slave_port_id][master_port_id]++;
@@ -308,8 +306,7 @@ NoncoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id)
}
// determine the destination port
- AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize());
- PortID dest_id = findPort(addr_range);
+ PortID dest_id = findPort(pkt->getAddrRange());
// forward the request to the appropriate destination
masterPorts[dest_id]->sendFunctional(pkt);