From: Derek Hower Date: Fri, 13 Nov 2009 15:42:47 +0000 (-0600) Subject: ruby: cache memory bugfix X-Git-Tag: Calvin_Submission~5 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ceb8fde914aebc3568d55d50defb8aed36717ea6;p=gem5.git ruby: cache memory bugfix --- 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")