# Node ID 631472483bc891b540ae41349bc6ea375c9d536b # Parent 530ea35752b719a4fd41daa7e5408327d3c9cd06 diff --git a/src/mem/protocol/RubySlicc_Types.sm b/src/mem/protocol/RubySlicc_Types.sm --- a/src/mem/protocol/RubySlicc_Types.sm +++ b/src/mem/protocol/RubySlicc_Types.sm @@ -146,6 +146,7 @@ bool cacheAvail(Address); Address cacheProbe(Address); AbstractCacheEntry allocate(Address, AbstractCacheEntry); + AbstractCacheEntry allocate(Address, AbstractCacheEntry, bool); void allocateVoid(Address, AbstractCacheEntry); void deallocate(Address); AbstractCacheEntry lookup(Address); diff --git a/src/mem/ruby/structures/CacheMemory.hh b/src/mem/ruby/structures/CacheMemory.hh --- a/src/mem/ruby/structures/CacheMemory.hh +++ b/src/mem/ruby/structures/CacheMemory.hh @@ -74,10 +74,16 @@ bool cacheAvail(const Address& address) const; // find an unused entry and sets the tag appropriate for the address - AbstractCacheEntry* allocate(const Address& address, AbstractCacheEntry* new_entry); + AbstractCacheEntry* allocate(const Address& address, + AbstractCacheEntry* new_entry, bool touch); + AbstractCacheEntry* allocate(const Address& address, + AbstractCacheEntry* new_entry) + { + return allocate(address, new_entry, true); + } void allocateVoid(const Address& address, AbstractCacheEntry* new_entry) { - allocate(address, new_entry); + allocate(address, new_entry, true); } // Explicitly free up this address diff --git a/src/mem/ruby/structures/CacheMemory.cc b/src/mem/ruby/structures/CacheMemory.cc --- a/src/mem/ruby/structures/CacheMemory.cc +++ b/src/mem/ruby/structures/CacheMemory.cc @@ -249,7 +249,7 @@ } 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)); @@ -269,7 +269,9 @@ 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; }