Some changes to support blocking in the caches
authorRon Dreslinski <rdreslin@umich.edu>
Tue, 15 Aug 2006 18:24:49 +0000 (14:24 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Tue, 15 Aug 2006 18:24:49 +0000 (14:24 -0400)
src/mem/cache/base_cache.cc:
src/mem/cache/base_cache.hh:
src/mem/cache/cache_impl.hh:
    Outstanding blocking updates for cache

--HG--
extra : convert_revision : 3a7b4aa4921de8239f604f1852f262a2305862c0

src/mem/cache/base_cache.cc
src/mem/cache/base_cache.hh
src/mem/cache/cache_impl.hh

index 451da28e8be44cf0b01eae3a39d8a287225fb42a..9b103457744f21a2ba9d55c1aa3f3280b5422bbb 100644 (file)
@@ -71,6 +71,11 @@ BaseCache::CachePort::deviceBlockSize()
 bool
 BaseCache::CachePort::recvTiming(Packet *pkt)
 {
+    if (blocked)
+    {
+        mustSendRetry = true;
+        return false;
+    }
     return cache->doTimingAccess(pkt, this, isCpuSide);
 }
 
@@ -95,6 +100,11 @@ BaseCache::CachePort::setBlocked()
 void
 BaseCache::CachePort::clearBlocked()
 {
+    if (mustSendRetry)
+    {
+        mustSendRetry = false;
+        sendRetry();
+    }
     blocked = false;
 }
 
index 0d1bfdfdbd5a8a1061525a4fe066cf5c69479d97..8234657696d62a51d42bcc431a5fb3dc032d23d8 100644 (file)
@@ -105,6 +105,8 @@ class BaseCache : public MemObject
 
         bool blocked;
 
+        bool mustSendRetry;
+
         bool isCpuSide;
     };
 
index a447ae3d589d53275462eb008b65f184e0fecc57..db012920f3f870d08b02f13bcbeb9df61016ec1e 100644 (file)
@@ -71,7 +71,7 @@ doTimingAccess(Packet *pkt, CachePort *cachePort, bool isCpuSide)
         else
             snoop(pkt);
     }
-    return true; //Deal with blocking....
+    return true;
 }
 
 template<class TagStore, class Buffering, class Coherence>