summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2017-12-14 17:29:17 -0800
committerGabe Black <gabeblack@google.com>2018-01-02 07:09:06 +0000
commitc64c6c9ddc7463edaf4517909d8647b6410c2930 (patch)
tree14b2ae835f83fb046a544cd10606c68fe42a0d91
parentda79d6c6cde0fbe5473ce868c9be4771160a003b (diff)
downloadgem5-c64c6c9ddc7463edaf4517909d8647b6410c2930.tar.xz
config: Add a --checkpoint-dir argument to read_config.py.
This argument lets the user restore a checkpoint after loading simulator state from config.ini. Change-Id: I6e0630d75b798a1d2536e2408660843f57f46c4b Reviewed-on: https://gem5-review.googlesource.com/6941 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
-rw-r--r--configs/example/read_config.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/configs/example/read_config.py b/configs/example/read_config.py
index dfd5b7f1a..830bdb8b1 100644
--- a/configs/example/read_config.py
+++ b/configs/example/read_config.py
@@ -510,6 +510,9 @@ parser = argparse.ArgumentParser()
parser.add_argument('config_file', metavar='config-file.ini',
help='.ini configuration file to load and run')
+parser.add_argument('--checkpoint-dir', type=str, default=None,
+ help='A checkpoint to directory to restore when starting '
+ 'the simulation')
args = parser.parse_args(sys.argv[1:])
@@ -526,7 +529,7 @@ mgr = ConfigManager(config)
mgr.find_all_objects()
-m5.instantiate()
+m5.instantiate(args.checkpoint_dir)
exit_event = m5.simulate()
print 'Exiting @ tick %i because %s' % (