Cleanup
--HG-- extra : convert_revision : 31f1b0f760a6eb861652440f9d42aaf123ef4833
This commit is contained in:
parent
44f91bb444
commit
21391d494c
1 changed files with 6 additions and 14 deletions
|
@ -187,17 +187,17 @@ def restoreCheckpoint(root, dir):
|
||||||
need_resume.append(root)
|
need_resume.append(root)
|
||||||
|
|
||||||
def changeToAtomic(system):
|
def changeToAtomic(system):
|
||||||
if not isinstance(system, objects.Root) and not isinstance(system, objects.System):
|
if not isinstance(system, (objects.Root, objects.System)):
|
||||||
raise TypeError, "Object is not a root or system object. Checkpoint must be "
|
raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
|
||||||
"called on a root object."
|
(type(system), objects.Root, objects.System)
|
||||||
doDrain(system)
|
doDrain(system)
|
||||||
print "Changing memory mode to atomic"
|
print "Changing memory mode to atomic"
|
||||||
system.changeTiming(internal.sim_object.SimObject.Atomic)
|
system.changeTiming(internal.sim_object.SimObject.Atomic)
|
||||||
|
|
||||||
def changeToTiming(system):
|
def changeToTiming(system):
|
||||||
if not isinstance(system, objects.Root) and not isinstance(system, objects.System):
|
if not isinstance(system, (objects.Root, objects.System)):
|
||||||
raise TypeError, "Object is not a root or system object. Checkpoint must be "
|
raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
|
||||||
"called on a root object."
|
(type(system), objects.Root, objects.System)
|
||||||
doDrain(system)
|
doDrain(system)
|
||||||
print "Changing memory mode to timing"
|
print "Changing memory mode to timing"
|
||||||
system.changeTiming(internal.sim_object.SimObject.Timing)
|
system.changeTiming(internal.sim_object.SimObject.Timing)
|
||||||
|
@ -238,14 +238,6 @@ def switchCpus(cpuList):
|
||||||
new_cpu._ccObject.resume()
|
new_cpu._ccObject.resume()
|
||||||
index += 1
|
index += 1
|
||||||
|
|
||||||
def dumpStats():
|
|
||||||
print 'Dumping stats'
|
|
||||||
internal.stats.dump()
|
|
||||||
|
|
||||||
def resetStats():
|
|
||||||
print 'Resetting stats'
|
|
||||||
internal.stats.reset()
|
|
||||||
|
|
||||||
# Since we have so many mutual imports in this package, we should:
|
# Since we have so many mutual imports in this package, we should:
|
||||||
# 1. Put all intra-package imports at the *bottom* of the file, unless
|
# 1. Put all intra-package imports at the *bottom* of the file, unless
|
||||||
# they're absolutely needed before that (for top-level statements
|
# they're absolutely needed before that (for top-level statements
|
||||||
|
|
Loading…
Reference in a new issue