Standard Switch: Drain the system before switching CPUs

When switching from an atomic CPU to any of the timing CPUs, a drain is
unnecessary since no events are scheduled in atomic mode. However, when
trying to switch CPUs starting with a timing CPU, there may be events
scheduled. This change ensures that all events are drained from the system
by calling m5.drain before switching CPUs.
This commit is contained in:
Joel Hestness
2012-09-12 21:41:37 -05:00
parent 16dcb723c1
commit 234fa4cf7e
2 changed files with 2 additions and 2 deletions

View File

@@ -203,7 +203,6 @@ def changeToTiming(system):
(type(system), objects.Root, objects.System)
if system.getMemoryMode() != objects.params.timing:
doDrain(system)
print "Changing memory mode to timing"
for obj in system.descendants():
obj.changeTiming(objects.params.timing)