Draining fixes.
src/cpu/o3/cpu.cc: Handle draining properly when CPU isn't actually being used. src/cpu/simple/atomic.cc: Be sure to set status properly when draining. src/mem/bus.cc: Fix for draining. --HG-- extra : convert_revision : d9796e6693e974f022159029fc9743c49a970c8f
This commit is contained in:
parent
344f72dd62
commit
0b0d5a282a
|
@ -819,6 +819,12 @@ unsigned int
|
|||
FullO3CPU<Impl>::drain(Event *drain_event)
|
||||
{
|
||||
DPRINTF(O3CPU, "Switching out\n");
|
||||
|
||||
// If the CPU isn't doing anything, then return immediately.
|
||||
if (_status == Idle || _status == SwitchedOut) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
drainCount = 0;
|
||||
fetch.drain();
|
||||
decode.drain();
|
||||
|
|
|
@ -213,6 +213,9 @@ AtomicSimpleCPU::takeOverFrom(BaseCPU *oldCPU)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (_status != Running) {
|
||||
_status = Idle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -242,8 +242,11 @@ Bus::recvRetry(int id)
|
|||
}
|
||||
}
|
||||
//If we weren't able to drain before, we might be able to now.
|
||||
if (drainEvent && retryList.size() == 0 && curTick >= tickNextIdle)
|
||||
if (drainEvent && retryList.size() == 0 && curTick >= tickNextIdle) {
|
||||
drainEvent->process();
|
||||
// Clear the drain event once we're done with it.
|
||||
drainEvent = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Port *
|
||||
|
|
Loading…
Reference in a new issue