summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-11-13 09:42:47 -0600
committerDerek Hower <drh5@cs.wisc.edu>2009-11-13 09:42:47 -0600
commitceb8fde914aebc3568d55d50defb8aed36717ea6 (patch)
treed35af6f2f3b297de0f07c978e282e0430069acbd
parent22d9a530806f582aea854c79ea20d3d1a963c2a9 (diff)
downloadgem5-ceb8fde914aebc3568d55d50defb8aed36717ea6.tar.xz
ruby: cache memory bugfix
-rw-r--r--src/mem/ruby/system/CacheMemory.hh3
1 files changed, 2 insertions, 1 deletions
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<string> & 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")