From: Gabe Black Date: Tue, 10 Oct 2006 04:49:27 +0000 (-0400) Subject: Fixed a bug where a packet was attempted to be sent even though another packet was... X-Git-Tag: m5_2.0_beta2~104^2~20^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5582e60966822fd33cf1c48abef95e4dab14235c;p=gem5.git Fixed a bug where a packet was attempted to be sent even though another packet was waiting for the bus. --HG-- extra : convert_revision : 29f7a4f676884330d7b7e93517dea85fc7bbf678 --- diff --git a/src/mem/tport.cc b/src/mem/tport.cc index cef7a2a5b..66811b820 100644 --- a/src/mem/tport.cc +++ b/src/mem/tport.cc @@ -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;