From: Nathan Binkert Date: Sat, 4 Aug 2007 23:06:19 +0000 (-0700) Subject: python: use the enum values in the memory mode changing code X-Git-Tag: m5_2.0_beta4~195^2~2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a27431b969ed0557d2a079066d082153f97af9d;p=gem5.git python: use the enum values in the memory mode changing code --HG-- extra : convert_revision : 2e399b2b407922ad076f93d33af73e3ba4c05218 --- diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py index c703664d4..6db25f0ed 100644 --- a/src/python/m5/simulate.py +++ b/src/python/m5/simulate.py @@ -148,20 +148,20 @@ def changeToAtomic(system): if not isinstance(system, (objects.Root, objects.System)): raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \ (type(system), objects.Root, objects.System) - if system.getMemoryMode() != objects.params.SimObject.Atomic: + if system.getMemoryMode() != objects.params.atomic: doDrain(system) print "Changing memory mode to atomic" - system.changeTiming(objects.params.SimObject.Atomic) + system.changeTiming(objects.params.atomic) def changeToTiming(system): if not isinstance(system, (objects.Root, objects.System)): raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \ (type(system), objects.Root, objects.System) - if system.getMemoryMode() != objects.params.SimObject.Timing: + if system.getMemoryMode() != objects.params.timing: doDrain(system) print "Changing memory mode to timing" - system.changeTiming(objects.params.SimObject.Timing) + system.changeTiming(objects.params.timing) def switchCpus(cpuList): print "switching cpus"