O3: Fix issue w/wbOutstading being decremented multiple times on blocked cache.
authorGeoffrey Blake <geoffrey.blake@arm.com>
Mon, 23 May 2011 15:40:19 +0000 (10:40 -0500)
committerGeoffrey Blake <geoffrey.blake@arm.com>
Mon, 23 May 2011 15:40:19 +0000 (10:40 -0500)
If a split load fails on a blocked cache wbOutstanding can be decremented
twice if the first part of the split load succeeds and the second part fails.
Condition the decrementing on not having completed the first part of the load.

src/cpu/o3/iew.hh
src/cpu/o3/iew_impl.hh
src/cpu/o3/lsq_unit.hh

index 8ebbfb2e6afd20633919a4f9e87a8898209af677..113d0756e0fc23e4ba0b889e82733bc7e552a00b 100644 (file)
@@ -228,7 +228,7 @@ class DefaultIEW
     {
         if (++wbOutstanding == wbMax)
             ableToIssue = false;
-        DPRINTF(IEW, "wbOutstanding: %i\n", wbOutstanding);
+        DPRINTF(IEW, "wbOutstanding: %i [sn:%lli]\n", wbOutstanding, sn);
         assert(wbOutstanding <= wbMax);
 #ifdef DEBUG
         wbList.insert(sn);
index 3bdf1f28d834c7a0a2756b86343763b16a7c294e..00a7ef0d98016e838c05da2eeee3e3f9ebc95b05 100644 (file)
@@ -1221,7 +1221,9 @@ DefaultIEW<Impl>::executeInsts()
 
         // Check if the instruction is squashed; if so then skip it
         if (inst->isSquashed()) {
-            DPRINTF(IEW, "Execute: Instruction was squashed.\n");
+            DPRINTF(IEW, "Execute: Instruction was squashed. PC: %s, [tid:%i]"
+                         " [sn:%i]\n", inst->pcState(), inst->threadNumber,
+                         inst->seqNum);
 
             // Consider this instruction executed so that commit can go
             // ahead and retire the instruction.
index be9c91a23afe3df1ca2c684de32b8297e8d5e9fd..8e311d2759ffa6afbb7a438dcff583f9ff5acfe2 100644 (file)
@@ -804,7 +804,12 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
 
         ++lsqCacheBlocked;
 
-        iewStage->decrWb(load_inst->seqNum);
+        // If the first part of a split access succeeds, then let the LSQ
+        // handle the decrWb when completeDataAccess is called upon return
+        // of the requested first part of data
+        if (!completedFirst)
+            iewStage->decrWb(load_inst->seqNum);
+
         // There's an older load that's already going to squash.
         if (isLoadBlocked && blockedLoadSeqNum < load_inst->seqNum)
             return NoFault;