summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/CacheMemory.cc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-08-20 11:46:14 -0700
commit8b28848321f301e6b13cab55e539f86a0e6c71ca (patch)
tree32ea7af10f561fe7b6156a932387ec468194064b /src/mem/ruby/system/CacheMemory.cc
parent593ae7457e0bd1150a08535ee6c79d52a0dfd175 (diff)
downloadgem5-8b28848321f301e6b13cab55e539f86a0e6c71ca.tar.xz
ruby: added probe filter support to hammer
Diffstat (limited to 'src/mem/ruby/system/CacheMemory.cc')
-rw-r--r--src/mem/ruby/system/CacheMemory.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/ruby/system/CacheMemory.cc b/src/mem/ruby/system/CacheMemory.cc
index 604113238..59f97e5fe 100644
--- a/src/mem/ruby/system/CacheMemory.cc
+++ b/src/mem/ruby/system/CacheMemory.cc
@@ -53,6 +53,7 @@ CacheMemory::CacheMemory(const Params *p)
m_cache_assoc = p->assoc;
m_policy = p->replacement_policy;
m_profiler_ptr = new CacheProfiler(name());
+ m_start_index_bit = p->start_index_bit;
}
void
@@ -127,8 +128,8 @@ Index
CacheMemory::addressToCacheSet(const Address& address) const
{
assert(address == line_address(address));
- return address.bitSelect(RubySystem::getBlockSizeBits(),
- RubySystem::getBlockSizeBits() + m_cache_num_set_bits - 1);
+ return address.bitSelect(m_start_index_bit,
+ m_start_index_bit + m_cache_num_set_bits - 1);
}
// Given a cache index: returns the index of the tag in a set.