simulate.py (9344:7f966113afd1) simulate.py (9346:7a9b5e0335a6)
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

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

176 all_drained = True
177 internal.drain.cleanupDrainManager(dm)
178 return all_drained
179
180 all_drained = _drain()
181 while (not all_drained):
182 all_drained = _drain()
183
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

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

176 all_drained = True
177 internal.drain.cleanupDrainManager(dm)
178 return all_drained
179
180 all_drained = _drain()
181 while (not all_drained):
182 all_drained = _drain()
183
184def memWriteback(root):
185 for obj in root.descendants():
186 obj.memWriteback()
187
188def memInvalidate(root):
189 for obj in root.descendants():
190 obj.memInvalidate()
191
184def resume(root):
185 for obj in root.descendants(): obj.drainResume()
186
187def checkpoint(dir):
188 root = objects.Root.getInstance()
189 if not isinstance(root, objects.Root):
190 raise TypeError, "Checkpoint must be called on a root object."
191 drain(root)
192def resume(root):
193 for obj in root.descendants(): obj.drainResume()
194
195def checkpoint(dir):
196 root = objects.Root.getInstance()
197 if not isinstance(root, objects.Root):
198 raise TypeError, "Checkpoint must be called on a root object."
199 drain(root)
200 memWriteback(root)
192 print "Writing checkpoint"
193 internal.core.serializeAll(dir)
194 resume(root)
195
196def changeMemoryMode(system, mode):
197 if not isinstance(system, (objects.Root, objects.System)):
198 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
199 (type(system), objects.Root, objects.System)

--- 36 unchanged lines hidden ---
201 print "Writing checkpoint"
202 internal.core.serializeAll(dir)
203 resume(root)
204
205def changeMemoryMode(system, mode):
206 if not isinstance(system, (objects.Root, objects.System)):
207 raise TypeError, "Parameter of type '%s'. Must be type %s or %s." % \
208 (type(system), objects.Root, objects.System)

--- 36 unchanged lines hidden ---