From ceb8fde914aebc3568d55d50defb8aed36717ea6 Mon Sep 17 00:00:00 2001 From: Derek Hower Date: Fri, 13 Nov 2009 09:42:47 -0600 Subject: [PATCH] ruby: cache memory bugfix --- src/mem/ruby/system/CacheMemory.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mem/ruby/system/CacheMemory.hh b/src/mem/ruby/system/CacheMemory.hh index aeb52ba2e..7268189ea 100644 --- a/src/mem/ruby/system/CacheMemory.hh +++ b/src/mem/ruby/system/CacheMemory.hh @@ -218,7 +218,8 @@ void CacheMemory::init(const vector & argv) } } - m_cache_num_sets = cache_size / m_cache_assoc; + int num_lines = (cache_size*1024)/RubySystem::getBlockSizeBytes(); + m_cache_num_sets = num_lines / m_cache_assoc; m_cache_num_set_bits = log_int(m_cache_num_sets); if(policy == "PSEUDO_LRU") -- 2.30.2