Fixes for Kevins O3 model to work with the blocking caches.
authorRon Dreslinski <rdreslin@umich.edu>
Wed, 16 Aug 2006 19:56:22 +0000 (15:56 -0400)
committerRon Dreslinski <rdreslin@umich.edu>
Wed, 16 Aug 2006 19:56:22 +0000 (15:56 -0400)
src/cpu/o3/fetch_impl.hh:
    Fix ordering so dereference works
src/cpu/o3/lsq_impl.hh:
    Check to make sure we didn't squash already
src/cpu/o3/lsq_unit.hh:
    Fix for counting squashed retrys in the WB count
src/cpu/o3/lsq_unit_impl.hh:
    Make sure to set retryID for stores, and clear it appropriately

--HG--
extra : convert_revision : 689765a1baea7b36f13eb177d65e97b52b6da09f

src/cpu/o3/fetch_impl.hh
src/cpu/o3/lsq_impl.hh
src/cpu/o3/lsq_unit.hh
src/cpu/o3/lsq_unit_impl.hh

index 990db88ac764be258ae6646aa9008594a5320287..25be9d4556263a744eacd7db06f04315f54b86b6 100644 (file)
@@ -672,9 +672,9 @@ DefaultFetch<Impl>::doSquash(const Addr &new_PC, unsigned tid)
         assert(cacheBlocked);
         cacheBlocked = false;
         retryTid = -1;
-        retryPkt = NULL;
         delete retryPkt->req;
         delete retryPkt;
+        retryPkt = NULL;
     }
 
     fetchStatus[tid] = Squashing;
index db2c253e1bffdd5c1a3ef702a460f051723bc295..2bbab71f050a685ffa65530cecc7810f8107fd94 100644 (file)
@@ -71,6 +71,11 @@ template <class Impl>
 void
 LSQ<Impl>::DcachePort::recvRetry()
 {
+    if (lsq->retryTid == -1)
+    {
+        //Squashed, so drop it
+        return;
+    }
     lsq->thread[lsq->retryTid].recvRetry();
     // Speculatively clear the retry Tid.  This will get set again if
     // the LSQUnit was unable to complete its access.
index 512b5a63c01c58123a65706c5d601f801f9adf42..1358a3699fe0b3a5bb0d5adc5db8678b8fb81c36 100644 (file)
@@ -646,6 +646,8 @@ LSQUnit<Impl>::read(Request *req, T &data, int load_idx)
     // handle it.
     if (lsq->cacheBlocked()) {
         ++lsqCacheBlocked;
+
+        iewStage->decrWb(load_inst->seqNum);
         // There's an older load that's already going to squash.
         if (isLoadBlocked && blockedLoadSeqNum < load_inst->seqNum)
             return NoFault;
index 4f5dbbf1c71a08a3e82bb2ca93aa069469f6e3d5..fa716c7129af7ff9597e5776701b19326ed99cd8 100644 (file)
@@ -626,6 +626,7 @@ LSQUnit<Impl>::writebackStores()
             ++lsqCacheBlocked;
             assert(retryPkt == NULL);
             retryPkt = data_pkt;
+            lsq->setRetryTid(lsqID);
         } else {
             storePostSend(data_pkt);
         }
@@ -869,6 +870,7 @@ LSQUnit<Impl>::recvRetry()
             storePostSend(retryPkt);
             retryPkt = NULL;
             isStoreBlocked = false;
+            lsq->setRetryTid(-1);
         } else {
             // Still blocked!
             ++lsqCacheBlocked;