Deleted Added
sdiff udiff text old ( 9342:6fec8f26e56d ) new ( 9343:e63c6f279906 )
full compact
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 178 unchanged lines hidden (view full) ---

187 root = objects.Root.getInstance()
188 if not isinstance(root, objects.Root):
189 raise TypeError, "Checkpoint must be called on a root object."
190 doDrain(root)
191 print "Writing checkpoint"
192 internal.core.serializeAll(dir)
193 resume(root)
194
195def changeToAtomic(system):
196 if not isinstance(system, (objects.Root, objects.System)):
197 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
198 (type(system), objects.Root, objects.System)
199 if system.getMemoryMode() != objects.params.atomic:
200 doDrain(system)
201 print "Changing memory mode to atomic"
202 system.setMemoryMode(objects.params.atomic)
203
204def changeToTiming(system):
205 if not isinstance(system, (objects.Root, objects.System)):
206 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
207 (type(system), objects.Root, objects.System)
208
209 if system.getMemoryMode() != objects.params.timing:
210 doDrain(system)
211 print "Changing memory mode to timing"
212 system.setMemoryMode(objects.params.timing)
213
214def switchCpus(cpuList):
215 print "switching cpus"
216 if not isinstance(cpuList, list):
217 raise RuntimeError, "Must pass a list to this function"
218 for item in cpuList:
219 if not isinstance(item, tuple) or len(item) != 2:
220 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"

--- 15 unchanged lines hidden ---