Fixes for draining.

src/cpu/simple/timing.cc:
    Update for changed return values.
src/python/m5/__init__.py:
    Loop in order to make sure all objects are really drained.  Objects may become undrained as other objects become drained (e.g. a bus-bridge has a packet, while a bus is empty, and the first drain() will cause the bus-bridge to give the packet to the bus).

    The only case we know every object is actually drained is if they all return immediately that they are drained.

--HG--
extra : convert_revision : 80057a1d6d30381bd0b67b23549bd202f447c5cb
This commit is contained in:
Kevin Lim
2006-07-06 16:06:00 -04:00
parent c8a37ce715
commit 8ae4f45bc4
2 changed files with 16 additions and 2 deletions

View File

@@ -118,11 +118,11 @@ TimingSimpleCPU::drain(Event *drain_event)
// an access to complete.
if (status() == Idle || status() == Running || status() == SwitchedOut) {
changeState(SimObject::DrainedTiming);
return false;
return true;
} else {
changeState(SimObject::Draining);
drainEvent = drain_event;
return true;
return false;
}
}