ruby: cache memory: drop {try,test}CacheAccess functions
authorNilay Vaish <nilay@cs.wisc.edu>
Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)
committerNilay Vaish <nilay@cs.wisc.edu>
Sat, 15 Aug 2015 00:28:43 +0000 (19:28 -0500)
src/mem/ruby/structures/CacheMemory.cc
src/mem/ruby/structures/CacheMemory.hh

index 931f58a8ef686b111f1d829c5b43920c169026b4..ac6f823ce6b4c3553c2e93ef83f0423fe120ea83 100644 (file)
@@ -158,56 +158,6 @@ CacheMemory::getAddressAtIdx(int idx) const
     return entry->m_Address;
 }
 
-bool
-CacheMemory::tryCacheAccess(Addr address, RubyRequestType type,
-                            DataBlock*& data_ptr)
-{
-    assert(address == makeLineAddress(address));
-    DPRINTF(RubyCache, "address: %s\n", address);
-    int64_t cacheSet = addressToCacheSet(address);
-    int loc = findTagInSet(cacheSet, address);
-    if (loc != -1) {
-        // Do we even have a tag match?
-        AbstractCacheEntry* entry = m_cache[cacheSet][loc];
-        m_replacementPolicy_ptr->touch(cacheSet, loc, curTick());
-        data_ptr = &(entry->getDataBlk());
-
-        if (entry->m_Permission == AccessPermission_Read_Write) {
-            return true;
-        }
-        if ((entry->m_Permission == AccessPermission_Read_Only) &&
-            (type == RubyRequestType_LD || type == RubyRequestType_IFETCH)) {
-            return true;
-        }
-        // The line must not be accessible
-    }
-    data_ptr = NULL;
-    return false;
-}
-
-bool
-CacheMemory::testCacheAccess(Addr address, RubyRequestType type,
-                             DataBlock*& data_ptr)
-{
-    assert(address == makeLineAddress(address));
-    DPRINTF(RubyCache, "address: %s\n", address);
-    int64_t cacheSet = addressToCacheSet(address);
-    int loc = findTagInSet(cacheSet, address);
-
-    if (loc != -1) {
-        // Do we even have a tag match?
-        AbstractCacheEntry* entry = m_cache[cacheSet][loc];
-        m_replacementPolicy_ptr->touch(cacheSet, loc, curTick());
-        data_ptr = &(entry->getDataBlk());
-
-        return m_cache[cacheSet][loc]->m_Permission !=
-            AccessPermission_NotPresent;
-    }
-
-    data_ptr = NULL;
-    return false;
-}
-
 // tests to see if an address is present in the cache
 bool
 CacheMemory::isTagPresent(Addr address) const
index 7ce674e61a6473e2f780ac97a7a18b3bad0abd6d..94174b28676440950b67bfa1a0c5bb86cc3534f8 100644 (file)
@@ -56,15 +56,6 @@ class CacheMemory : public SimObject
 
     void init();
 
-    // Public Methods
-    // perform a cache access and see if we hit or not.  Return true on a hit.
-    bool tryCacheAccess(Addr address, RubyRequestType type,
-                        DataBlock*& data_ptr);
-
-    // similar to above, but doesn't require full access check
-    bool testCacheAccess(Addr address, RubyRequestType type,
-                         DataBlock*& data_ptr);
-
     // tests to see if an address is present in the cache
     bool isTagPresent(Addr address) const;