From c64c6c9ddc7463edaf4517909d8647b6410c2930 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 14 Dec 2017 17:29:17 -0800 Subject: [PATCH] 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 Maintainer: Jason Lowe-Power --- configs/example/read_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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' % ( -- 2.30.2