From 8f29298bc7a9aee1572ba3de66ed12db5995509c Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Sat, 5 Sep 2015 09:35:31 -0500 Subject: ruby: adds set and way indices to AbstractCacheEntry --- src/mem/ruby/structures/CacheMemory.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mem/ruby/structures') diff --git a/src/mem/ruby/structures/CacheMemory.cc b/src/mem/ruby/structures/CacheMemory.cc index 17c13502d..ab2647759 100644 --- a/src/mem/ruby/structures/CacheMemory.cc +++ b/src/mem/ruby/structures/CacheMemory.cc @@ -251,7 +251,7 @@ CacheMemory::cacheAvail(Addr address) const } AbstractCacheEntry* -CacheMemory::allocate(Addr address, AbstractCacheEntry* entry, bool touch) +CacheMemory::allocate(Addr address, AbstractCacheEntry *entry, bool touch) { assert(address == makeLineAddress(address)); assert(!isTagPresent(address)); @@ -270,6 +270,8 @@ CacheMemory::allocate(Addr address, AbstractCacheEntry* entry, bool touch) address); set[i]->m_locked = -1; m_tag_index[address] = i; + entry->setSetIndex(cacheSet); + entry->setWayIndex(i); if (touch) { m_replacementPolicy_ptr->touch(cacheSet, i, curTick()); -- cgit v1.2.3