diff options
Diffstat (limited to 'src/mem/ruby/system/CacheMemory.cc')
-rw-r--r-- | src/mem/ruby/system/CacheMemory.cc | 5 |
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. |