diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2019-02-08 15:31:43 +0100 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2019-04-19 16:34:00 +0000 |
commit | 22abf7916e1bce66469020c6fa4d458a13ae84f3 (patch) | |
tree | a6900a1b816ce8540c782cbe165e8578f81e8ef8 /src/mem/coherent_xbar.cc | |
parent | 3d4e412694359f826757b0ca71dea184ff00b457 (diff) | |
download | gem5-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/coherent_xbar.cc')
-rw-r--r-- | src/mem/coherent_xbar.cc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index 96e855f75..839d95b9d 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -152,8 +152,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) assert(is_express_snoop == cache_responding); // determine the destination based on the destination address range - 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 crossbar should be considered occupied for the current // port, and exclude express snoops from the check @@ -552,9 +551,7 @@ CoherentXBar::recvTimingSnoopReq(PacketPtr pkt, PortID master_port_id) // device responsible for the address range something is // wrong, hence there is nothing further to do as the packet // would be going back to where it came from - AddrRange addr_range M5_VAR_USED = - RangeSize(pkt->getAddr(), pkt->getSize()); - assert(findPort(addr_range) == master_port_id); + assert(findPort(pkt->getAddrRange()) == master_port_id); } bool @@ -785,8 +782,7 @@ CoherentXBar::recvAtomicBackdoor(PacketPtr pkt, PortID slave_port_id, // even if we had a snoop response, we must continue and also // perform the actual request at the destination - AddrRange addr_range = RangeSize(pkt->getAddr(), pkt->getSize()); - PortID master_port_id = findPort(addr_range); + PortID master_port_id = findPort(pkt->getAddrRange()); if (sink_packet) { DPRINTF(CoherentXBar, "%s: Not forwarding %s\n", __func__, @@ -1013,7 +1009,7 @@ CoherentXBar::recvFunctional(PacketPtr pkt, PortID slave_port_id) } } - PortID dest_id = findPort(RangeSize(pkt->getAddr(), pkt->getSize())); + PortID dest_id = findPort(pkt->getAddrRange()); masterPorts[dest_id]->sendFunctional(pkt); } |