diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-06-04 16:20:47 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2018-06-19 14:24:25 +0000 |
commit | 6cb46ba839b2bf535e294fde9179e2aff6095814 (patch) | |
tree | 16cf3f355db2d378b0213406c84de968d51f01fc /src/mem/xbar.cc | |
parent | e27448fd0e21dbf4ef77a8bbb33a4053e31cb67d (diff) | |
download | gem5-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/xbar.cc')
-rw-r--r-- | src/mem/xbar.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mem/xbar.cc b/src/mem/xbar.cc index c3a5c83fe..b139cdc9b 100644 --- a/src/mem/xbar.cc +++ b/src/mem/xbar.cc @@ -321,34 +321,34 @@ BaseXBar::Layer<SrcType,DstType>::recvRetry() } PortID -BaseXBar::findPort(Addr addr) +BaseXBar::findPort(AddrRange addr_range) { // we should never see any address lookups before we've got the // ranges of all connected slave modules assert(gotAllAddrRanges); // Check the address map interval tree - auto i = portMap.contains(addr); + auto i = portMap.contains(addr_range); if (i != portMap.end()) { return i->second; } // Check if this matches the default range if (useDefaultRange) { - if (defaultRange.contains(addr)) { - DPRINTF(AddrRanges, " found addr %#llx on default\n", - addr); + if (addr_range.isSubset(defaultRange)) { + DPRINTF(AddrRanges, " found addr %s on default\n", + addr_range.to_string()); return defaultPortID; } } else if (defaultPortID != InvalidPortID) { - DPRINTF(AddrRanges, "Unable to find destination for addr %#llx, " - "will use default port\n", addr); + DPRINTF(AddrRanges, "Unable to find destination for %s, " + "will use default port\n", addr_range.to_string()); return defaultPortID; } // we should use the range for the default port and it did not // match, or the default port is not set - fatal("Unable to find destination for addr %#llx on %s\n", addr, + fatal("Unable to find destination for %s on %s\n", addr_range.to_string(), name()); } |