summaryrefslogtreecommitdiff
path: root/src/mem/ruby/structures/CacheMemory.cc
diff options
context:
space:
mode:
authorDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
committerDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
commit7e9562013b1592c5cc402c43ee1d21025f375a71 (patch)
tree3e14882024790d898404eb246d37fa51051c4f8f /src/mem/ruby/structures/CacheMemory.cc
parent7e00772bda1a1c74fe659c56fea803642302c1da (diff)
downloadgem5-7e9562013b1592c5cc402c43ee1d21025f375a71.tar.xz
ruby: allocate a block in CacheMemory without updating LRU state
Diffstat (limited to 'src/mem/ruby/structures/CacheMemory.cc')
-rw-r--r--src/mem/ruby/structures/CacheMemory.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mem/ruby/structures/CacheMemory.cc b/src/mem/ruby/structures/CacheMemory.cc
index 486b5ae97..c802d8fb6 100644
--- a/src/mem/ruby/structures/CacheMemory.cc
+++ b/src/mem/ruby/structures/CacheMemory.cc
@@ -251,7 +251,7 @@ CacheMemory::cacheAvail(const Address& address) const
}
AbstractCacheEntry*
-CacheMemory::allocate(const Address& address, AbstractCacheEntry* entry)
+CacheMemory::allocate(const Address& address, AbstractCacheEntry* entry, bool touch)
{
assert(address == line_address(address));
assert(!isTagPresent(address));
@@ -271,7 +271,9 @@ CacheMemory::allocate(const Address& address, AbstractCacheEntry* entry)
set[i]->m_locked = -1;
m_tag_index[address] = i;
- m_replacementPolicy_ptr->touch(cacheSet, i, curTick());
+ if (touch) {
+ m_replacementPolicy_ptr->touch(cacheSet, i, curTick());
+ }
return entry;
}