summaryrefslogtreecommitdiff
path: root/src/mem/tport.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-10-10 00:49:27 -0400
committerGabe Black <gblack@eecs.umich.edu>2006-10-10 00:49:27 -0400
commit5582e60966822fd33cf1c48abef95e4dab14235c (patch)
treed8c5d72332d0307257c34f91e8d21e1f204bbb55 /src/mem/tport.cc
parentab444172828e26dfdd35f4a9fcc9c73b9693f7fe (diff)
downloadgem5-5582e60966822fd33cf1c48abef95e4dab14235c.tar.xz
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
Diffstat (limited to 'src/mem/tport.cc')
-rw-r--r--src/mem/tport.cc9
1 files changed, 7 insertions, 2 deletions
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;