summaryrefslogtreecommitdiff
path: root/src/base/addr_range.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-03-07 05:55:03 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2013-03-07 05:55:03 -0500
commit82f600e02ded4d7162dd9286f790462b9ab5d554 (patch)
tree183e05bb83c03a1df8fa6aea7586e3af50365c49 /src/base/addr_range.hh
parent92e973b310a18508e51114abe936919df091fc38 (diff)
downloadgem5-82f600e02ded4d7162dd9286f790462b9ab5d554.tar.xz
base: Fix address range granularity calculations
This patch fixes a bug in the address range granularity calculations. Previously it incorrectly used the high bit to establish the size of the regions created, when it should really be looking at the low bit.
Diffstat (limited to 'src/base/addr_range.hh')
-rw-r--r--src/base/addr_range.hh5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh
index 368a96401..1620a00d3 100644
--- a/src/base/addr_range.hh
+++ b/src/base/addr_range.hh
@@ -140,7 +140,10 @@ class AddrRange
*
* @return The size of the regions created by the interleaving bits
*/
- uint64_t granularity() const { return ULL(1) << intlvHighBit; }
+ uint64_t granularity() const
+ {
+ return ULL(1) << (intlvHighBit - intlvBits);
+ }
/**
* Determine the number of interleaved address stripes this range