Make the bus work if the other sides recvRetry doesn't call sendTiming for some reason.
authorGabe Black <gblack@eecs.umich.edu>
Wed, 11 Oct 2006 04:26:21 +0000 (00:26 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Wed, 11 Oct 2006 04:26:21 +0000 (00:26 -0400)
--HG--
extra : convert_revision : e722ddb0354a5c021dc7c44a3e2f0a64e962442b

src/mem/bus.cc

index 03c1a42094bbe08692979e4558d224f2ac1a0010..6065ee1f1517ca19ee9114ebd41df6398367f380 100644 (file)
@@ -214,9 +214,24 @@ Bus::recvRetry(int id)
         retryList.front()->sendRetry();
         // If inRetry is still true, sendTiming wasn't called
         if (inRetry)
-            panic("Port %s didn't call sendTiming in it's recvRetry\n",\
-                    retryList.front()->getPeer()->name());
-        //assert(!inRetry);
+        {
+            retryList.front()->onRetryList(false);
+            retryList.pop_front();
+            inRetry = false;
+
+            //Bring tickNextIdle up to the present
+            while (tickNextIdle < curTick)
+                tickNextIdle += clock;
+
+            //Burn a cycle for the missed grant.
+            tickNextIdle += clock;
+
+            if (!busIdle.scheduled()) {
+                busIdle.schedule(tickNextIdle);
+            } else {
+                busIdle.reschedule(tickNextIdle);
+            }
+        }
     }
 }