diff -r e76d5ffa6b36 -r 79783b86b586 src/mem/protocol/RubySlicc_Types.sm --- a/src/mem/protocol/RubySlicc_Types.sm Thu Mar 31 12:19:14 2011 -0700 +++ b/src/mem/protocol/RubySlicc_Types.sm Thu Mar 31 12:19:35 2011 -0700 @@ -134,6 +134,7 @@ bool cacheAvail(Address); Address cacheProbe(Address); AbstractCacheEntry allocate(Address, AbstractCacheEntry); + void allocateVoid(Address, AbstractCacheEntry); void deallocate(Address); AbstractCacheEntry lookup(Address); bool isTagPresent(Address); diff -r e76d5ffa6b36 -r 79783b86b586 src/mem/ruby/system/CacheMemory.hh --- a/src/mem/ruby/system/CacheMemory.hh Thu Mar 31 12:19:14 2011 -0700 +++ b/src/mem/ruby/system/CacheMemory.hh Thu Mar 31 12:19:35 2011 -0700 @@ -83,6 +83,7 @@ // find an unused entry and sets the tag appropriate for the address AbstractCacheEntry* allocate(const Address& address, AbstractCacheEntry* new_entry); + void allocateVoid(const Address& address, AbstractCacheEntry* new_entry); // Explicitly free up this address void deallocate(const Address& address); diff -r e76d5ffa6b36 -r 79783b86b586 src/mem/ruby/system/CacheMemory.cc --- a/src/mem/ruby/system/CacheMemory.cc Thu Mar 31 12:19:14 2011 -0700 +++ b/src/mem/ruby/system/CacheMemory.cc Thu Mar 31 12:19:35 2011 -0700 @@ -283,6 +283,35 @@ } void +CacheMemory::allocateVoid(const Address& address, AbstractCacheEntry* entry) +{ + assert(address == line_address(address)); + assert(!isTagPresent(address)); + assert(cacheAvail(address)); + DPRINTF(RubyCache, "address: %s\n", address); + + // Find the first open slot + Index cacheSet = addressToCacheSet(address); + std::vector &set = m_cache[cacheSet]; + for (int i = 0; i < m_cache_assoc; i++) { + if (!set[i] || set[i]->m_Permission == AccessPermission_NotPresent) { + set[i] = entry; // Init entry + set[i]->m_Address = address; + set[i]->m_Permission = AccessPermission_Invalid; + DPRINTF(RubyCache, "Allocate clearing lock for addr: %x\n", + address); + set[i]->m_locked = -1; + m_tag_index[address] = i; + + m_replacementPolicy_ptr-> + touch(cacheSet, i, g_eventQueue_ptr->getTime()); + return; + } + } + panic("Allocate didn't find an available entry"); +} + +void CacheMemory::deallocate(const Address& address) { assert(address == line_address(address));