Deleted Added
sdiff udiff text old ( 9221:4f54b0f229b5 ) new ( 9253:e0d2a8e9f445 )
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

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

189
190def changeToAtomic(system):
191 if not isinstance(system, (objects.Root, objects.System)):
192 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
193 (type(system), objects.Root, objects.System)
194 if system.getMemoryMode() != objects.params.atomic:
195 doDrain(system)
196 print "Changing memory mode to atomic"
197 for obj in system.descendants():
198 obj.changeTiming(objects.params.atomic)
199
200def changeToTiming(system):
201 if not isinstance(system, (objects.Root, objects.System)):
202 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
203 (type(system), objects.Root, objects.System)
204
205 if system.getMemoryMode() != objects.params.timing:
206 print "Changing memory mode to timing"
207 for obj in system.descendants():
208 obj.changeTiming(objects.params.timing)
209
210def switchCpus(cpuList):
211 print "switching cpus"
212 if not isinstance(cpuList, list):
213 raise RuntimeError, "Must pass a list to this function"
214 for item in cpuList:
215 if not isinstance(item, tuple) or len(item) != 2:
216 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"

--- 15 unchanged lines hidden ---