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 system.setMemoryMode(objects.params.atomic) |
198 199def changeToTiming(system): 200 if not isinstance(system, (objects.Root, objects.System)): 201 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \ 202 (type(system), objects.Root, objects.System) 203 204 if system.getMemoryMode() != objects.params.timing: 205 print "Changing memory mode to timing" |
206 system.setMemoryMode(objects.params.timing) |
207 208def switchCpus(cpuList): 209 print "switching cpus" 210 if not isinstance(cpuList, list): 211 raise RuntimeError, "Must pass a list to this function" 212 for item in cpuList: 213 if not isinstance(item, tuple) or len(item) != 2: 214 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)" --- 15 unchanged lines hidden --- |