summaryrefslogtreecommitdiff
path: root/src/python/m5/simulate.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5/simulate.py')
-rw-r--r--src/python/m5/simulate.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index 0cf0a254e..cd2f8bb64 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -88,8 +88,12 @@ def instantiate(ckpt_dir=None):
# Restore checkpoint (if any)
if ckpt_dir:
- internal.core.unserializeAll(ckpt_dir)
+ ckpt = internal.core.getCheckpoint(ckpt_dir)
+ internal.core.unserializeGlobals(ckpt);
+ for obj in root.descendants(): obj.loadState(ckpt)
need_resume.append(root)
+ else:
+ for obj in root.descendants(): obj.initState()
# Reset to put the stats in a consistent state.
stats.reset()