Deleted Added
sdiff udiff text old ( 4174:fd48d7929d5c ) new ( 4553:fac59b75a87d )
full compact
1# Copyright (c) 2005 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

185 print "Restoring from checkpoint"
186 internal.sim_object.unserializeAll(dir)
187 need_resume.append(root)
188
189def changeToAtomic(system):
190 if not isinstance(system, (objects.Root, objects.System)):
191 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
192 (type(system), objects.Root, objects.System)
193 doDrain(system)
194 print "Changing memory mode to atomic"
195 system.changeTiming(internal.sim_object.SimObject.Atomic)
196
197def changeToTiming(system):
198 if not isinstance(system, (objects.Root, objects.System)):
199 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
200 (type(system), objects.Root, objects.System)
201 doDrain(system)
202 print "Changing memory mode to timing"
203 system.changeTiming(internal.sim_object.SimObject.Timing)
204
205def switchCpus(cpuList):
206 print "switching cpus"
207 if not isinstance(cpuList, list):
208 raise RuntimeError, "Must pass a list to this function"
209 for i in cpuList:
210 if not isinstance(i, tuple):
211 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"
212

--- 41 unchanged lines hidden ---