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 if system.getMemoryMode() != internal.sim_object.SimObject.Atomic:
194 doDrain(system)
195 print "Changing memory mode to atomic"
196 system.changeTiming(internal.sim_object.SimObject.Atomic)
197
198def changeToTiming(system):
199 if not isinstance(system, (objects.Root, objects.System)):
200 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
201 (type(system), objects.Root, objects.System)
202
203 if system.getMemoryMode() != internal.sim_object.SimObject.Timing:
204 doDrain(system)
205 print "Changing memory mode to timing"
206 system.changeTiming(internal.sim_object.SimObject.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 i in cpuList:
213 if not isinstance(i, tuple):
214 raise RuntimeError, "List must have tuples of (oldCPU,newCPU)"
215

--- 41 unchanged lines hidden ---