summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-06-27 05:49:49 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-06-27 05:49:49 -0400
commit997a6a4adda05ad1c3c205513b280214cb6e01c5 (patch)
tree295786428c8fa3fad5409124cab66a14295a28eb
parentf330b3c28d489d28743f2c31b607d33036b37006 (diff)
downloadgem5-997a6a4adda05ad1c3c205513b280214cb6e01c5.tar.xz
base: Fix address range granularity calculation
This patch fixes a bug in the granularity calculation. For example, if the high bit is 6 (counting from 0) and we have one interleaving bit, then the granularity is now 2 ** (6 - 1 + 1) = 64.
-rw-r--r--src/base/addr_range.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/base/addr_range.hh b/src/base/addr_range.hh
index 1620a00d3..7f275e5a9 100644
--- a/src/base/addr_range.hh
+++ b/src/base/addr_range.hh
@@ -142,7 +142,7 @@ class AddrRange
*/
uint64_t granularity() const
{
- return ULL(1) << (intlvHighBit - intlvBits);
+ return ULL(1) << (intlvHighBit - intlvBits + 1);
}
/**