summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mem/cache/cache_impl.hh2
-rw-r--r--src/mem/tport.cc4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 76a99109d..bf2901d36 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -1569,7 +1569,7 @@ Cache<TagStore>::MemSidePort::sendPacket()
schedule(sendEvent, std::max(nextReady, curTick + 1));
} else {
// no more to send right now: if we're draining, we may be done
- if (drainEvent) {
+ if (drainEvent && !sendEvent->scheduled()) {
drainEvent->process();
drainEvent = NULL;
}
diff --git a/src/mem/tport.cc b/src/mem/tport.cc
index e981a7445..4e89544e3 100644
--- a/src/mem/tport.cc
+++ b/src/mem/tport.cc
@@ -155,7 +155,7 @@ SimpleTimingPort::sendDeferredPacket()
schedule(sendEvent, time <= curTick ? curTick+1 : time);
}
- if (transmitList.empty() && drainEvent) {
+ if (transmitList.empty() && drainEvent && !sendEvent->scheduled()) {
drainEvent->process();
drainEvent = NULL;
}
@@ -195,7 +195,7 @@ SimpleTimingPort::processSendEvent()
unsigned int
SimpleTimingPort::drain(Event *de)
{
- if (transmitList.size() == 0)
+ if (transmitList.size() == 0 && !sendEvent->scheduled())
return 0;
drainEvent = de;
return 1;