Partly revert [4f54b0f229b5] and move draining to m5.changeToTiming
authorAndreas Sandberg <Andreas.Sandberg@arm.com>
Fri, 2 Nov 2012 16:32:00 +0000 (11:32 -0500)
committerAndreas Sandberg <Andreas.Sandberg@arm.com>
Fri, 2 Nov 2012 16:32:00 +0000 (11:32 -0500)
Changeset 4f54b0f229b5 removed the call to doDrain in changeToTiming
based on the assumption that the system does not need draining when
running in atomic mode. This is a false assumption since at least the
System class requires the system to be drained before it allows
switching of memory modes. This patch reverts that part of the
changeset.

configs/common/Simulation.py
src/python/m5/simulate.py

index 967f39b75b2af775f37a0e92ea99ae74d9644000..f6273a6f06ce8c8dae1b1a89bb5b11ba319631a2 100644 (file)
@@ -453,7 +453,6 @@ def run(options, root, testsys, cpu_class):
         # manually.  You DON'T need to resume after just switching
         # CPUs if you haven't changed anything on the system level.
 
-        m5.doDrain(testsys)
         m5.changeToTiming(testsys)
         m5.switchCpus(switch_cpu_list)
         m5.resume(testsys)
index 5fc00ad059a244419280fe59b3d14bb49e24beef..89b6b1e9dea5b06c341f053e401ff5917dbc789a 100644 (file)
@@ -207,6 +207,7 @@ def changeToTiming(system):
               (type(system), objects.Root, objects.System)
 
     if system.getMemoryMode() != objects.params.timing:
+        doDrain(system)
         print "Changing memory mode to timing"
         system.setMemoryMode(objects.params.timing)