diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-09-19 06:15:44 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-09-19 06:15:44 -0400 |
commit | ffb6aec603c38e16ae91ea975c16fc3e8fb337e5 (patch) | |
tree | fdf6e12bea9788f46589a9bcb15a8fe67581786f /src/mem/physical.cc | |
parent | c34df76272c17401955f6daf30ca9c7e7671ae56 (diff) | |
download | gem5-ffb6aec603c38e16ae91ea975c16fc3e8fb337e5.tar.xz |
AddrRange: Transition from Range<T> to AddrRange
This patch takes the final plunge and transitions from the templated
Range class to the more specific AddrRange. In doing so it changes the
obvious Range<Addr> to AddrRange, and also bumps the range_map to be
AddrRangeMap.
In addition to the obvious changes, including the removal of redundant
includes, this patch also does some house keeping in preparing for the
introduction of address interleaving support in the ranges. The Range
class is also stripped of all the functionality that is never used.
--HG--
rename : src/base/range.hh => src/base/addr_range.hh
rename : src/base/range_map.hh => src/base/addr_range_map.hh
Diffstat (limited to 'src/mem/physical.cc')
-rw-r--r-- | src/mem/physical.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc index 5f92976f9..23556f0ab 100644 --- a/src/mem/physical.cc +++ b/src/mem/physical.cc @@ -64,7 +64,6 @@ PhysicalMemory::PhysicalMemory(const vector<AbstractMemory*>& _memories) : "Skipping memory %s that is not in global address map\n", (*m)->name()); } - rangeCache.invalidate(); } bool @@ -73,8 +72,7 @@ PhysicalMemory::isMemAddr(Addr addr) const // see if the address is within the last matched range if (addr != rangeCache) { // lookup in the interval tree - range_map<Addr, AbstractMemory*>::const_iterator r = - addrMap.find(addr); + AddrRangeMap<AbstractMemory*>::const_iterator r = addrMap.find(addr); if (r == addrMap.end()) { // not in the cache, and not in the tree return false; @@ -110,7 +108,7 @@ PhysicalMemory::access(PacketPtr pkt) { assert(pkt->isRequest()); Addr addr = pkt->getAddr(); - range_map<Addr, AbstractMemory*>::const_iterator m = addrMap.find(addr); + AddrRangeMap<AbstractMemory*>::const_iterator m = addrMap.find(addr); assert(m != addrMap.end()); m->second->access(pkt); } @@ -120,7 +118,7 @@ PhysicalMemory::functionalAccess(PacketPtr pkt) { assert(pkt->isRequest()); Addr addr = pkt->getAddr(); - range_map<Addr, AbstractMemory*>::const_iterator m = addrMap.find(addr); + AddrRangeMap<AbstractMemory*>::const_iterator m = addrMap.find(addr); assert(m != addrMap.end()); m->second->functionalAccess(pkt); } |