summaryrefslogtreecommitdiff
path: root/configs/example
diff options
context:
space:
mode:
Diffstat (limited to 'configs/example')
-rw-r--r--configs/example/arm/dist_bigLITTLE.py9
-rw-r--r--configs/example/arm/fs_bigLITTLE.py17
2 files changed, 13 insertions, 13 deletions
diff --git a/configs/example/arm/dist_bigLITTLE.py b/configs/example/arm/dist_bigLITTLE.py
index 13b8abf5f..5194fc7e6 100644
--- a/configs/example/arm/dist_bigLITTLE.py
+++ b/configs/example/arm/dist_bigLITTLE.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 ARM Limited
+# Copyright (c) 2016-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -132,12 +132,7 @@ def main():
root = bL.build(options)
addEthernet(root.system, options)
- if options.restore_from:
- checkpoint_path = os.path.join(options.checkpoint_dir,
- options.restore_from)
- else:
- checkpoint_path = None
- bL.instantiate(checkpoint_path)
+ bL.instantiate(options, checkpoint_dir=options.checkpoint_dir)
bL.run(options.checkpoint_dir)
diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py
index c542b8510..c2ecf8831 100644
--- a/configs/example/arm/fs_bigLITTLE.py
+++ b/configs/example/arm/fs_bigLITTLE.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016 ARM Limited
+# Copyright (c) 2016-2017 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
@@ -209,11 +209,16 @@ def build(options):
return root
-def instantiate(checkpoint_path=None):
+def instantiate(options, checkpoint_dir=None):
# Get and load from the chkpt or simpoint checkpoint
- if checkpoint_path is not None:
- m5.util.inform("Restoring from checkpoint %s", checkpoint_path)
- m5.instantiate(checkpoint_path)
+ if options.restore_from:
+ if checkpoint_dir and not os.path.isabs(options.restore_from):
+ cpt = os.path.join(checkpoint_dir, options.restore_from)
+ else:
+ cpt = options.restore_from
+
+ m5.util.inform("Restoring from checkpoint %s", cpt)
+ m5.instantiate(cpt)
else:
m5.instantiate()
@@ -241,7 +246,7 @@ def main():
addOptions(parser)
options = parser.parse_args()
root = build(options)
- instantiate(options.restore_from)
+ instantiate(options)
run()