Fixed a bug where a packet was attempted to be sent even though another packet was...
authorGabe Black <gblack@eecs.umich.edu>
Tue, 10 Oct 2006 04:49:27 +0000 (00:49 -0400)
committerGabe Black <gblack@eecs.umich.edu>
Tue, 10 Oct 2006 04:49:27 +0000 (00:49 -0400)
--HG--
extra : convert_revision : 29f7a4f676884330d7b7e93517dea85fc7bbf678

src/mem/tport.cc

index cef7a2a5be01185ae6b901d516be7c4e2ddbc7cf..66811b820fae84df0311fc3512b34ddc6cbd06df 100644 (file)
@@ -59,6 +59,8 @@ void
 SimpleTimingPort::recvRetry()
 {
     bool result = true;
+
+    assert(transmitList.size());
     while (result && transmitList.size()) {
         result = sendTiming(transmitList.front());
         if (result)
@@ -75,8 +77,11 @@ SimpleTimingPort::SendEvent::process()
 {
     port->outTiming--;
     assert(port->outTiming >= 0);
-    if (port->sendTiming(packet)) {
-        // send successfule
+    if (port->transmitList.size()) {
+        port->transmitList.push_back(packet);
+    }
+    else if (port->sendTiming(packet)) {
+        // send successful
         if (port->transmitList.size() == 0 && port->drainEvent) {
             port->drainEvent->process();
             port->drainEvent = NULL;