diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-03-07 05:55:03 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-03-07 05:55:03 -0500 |
commit | 82f600e02ded4d7162dd9286f790462b9ab5d554 (patch) | |
tree | 183e05bb83c03a1df8fa6aea7586e3af50365c49 /src/base/addr_range.hh | |
parent | 92e973b310a18508e51114abe936919df091fc38 (diff) | |
download | gem5-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.hh | 5 |
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 |