diff options
author | Timothy M. Jones <tjones1@inf.ed.ac.uk> | 2010-07-22 18:54:37 +0100 |
---|---|---|
committer | Timothy M. Jones <tjones1@inf.ed.ac.uk> | 2010-07-22 18:54:37 +0100 |
commit | 28a5ea3f999d012be616395f9b396ce341882bb7 (patch) | |
tree | 805097c5c1e0170de0bc7364b3bf85cd488600c5 /src/mem | |
parent | e50a880297f13817200f4e74272ad1cf3194d401 (diff) | |
download | gem5-28a5ea3f999d012be616395f9b396ce341882bb7.tar.xz |
Port: Only indicate that a SimpleTimingPort is drained if its send event is
not scheduled, as well as the transmit list being empty.
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/cache/cache_impl.hh | 2 | ||||
-rw-r--r-- | src/mem/tport.cc | 4 |
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; |