Some more code cleanup
authorRon Dreslinski <rdreslin@umich.edu>
Tue, 10 Oct 2006 21:25:50 +0000 (17:25 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Tue, 10 Oct 2006 21:25:50 +0000 (17:25 -0400)
src/mem/cache/base_cache.cc:
    Add sanity checks
src/mem/cache/base_cache.hh:
    Fix for retry mechanism

--HG--
extra : convert_revision : 9298e32e64194b1ef3fe51242595eaa56dcbbcfd

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

index 0141fa2a06905e64ec12c0c191d7038a0aeebddb..4df13fb2b2facb06d7ea2709d4a44aabbb3a57ee 100644 (file)
@@ -221,6 +221,7 @@ BaseCache::CacheEvent::process()
         }
         else if (!cachePort->isCpuSide)
         {
+            assert(cachePort->cache->doMasterRequest());
             //MSHR
             pkt = cachePort->cache->getPacket();
             MSHR* mshr = (MSHR*) pkt->senderState;
@@ -238,6 +239,7 @@ BaseCache::CacheEvent::process()
         }
         else
         {
+            assert(cachePort->cache->doSlaveRequest());
             //CSHR
             pkt = cachePort->cache->getCoherencePacket();
             bool success = cachePort->sendTiming(pkt);
index 41c28f3a1f367c631df58f5448ac2e6c55e9883a..563b1ca8ba44e1caa4e47058589f6dcfa35502f1 100644 (file)
@@ -467,7 +467,7 @@ class BaseCache : public MemObject
      */
     void setMasterRequest(RequestCause cause, Tick time)
     {
-        if (!doMasterRequest() && memSidePort->drainList.empty())
+        if (!doMasterRequest() && !memSidePort->waitingOnRetry)
         {
             BaseCache::CacheEvent * reqCpu = new BaseCache::CacheEvent(memSidePort);
             reqCpu->schedule(time);