Port: Only indicate that a SimpleTimingPort is drained if its send event is
not scheduled, as well as the transmit list being empty.
This commit is contained in:
2
src/mem/cache/cache_impl.hh
vendored
2
src/mem/cache/cache_impl.hh
vendored
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user