From 303663d5c92163e59cb192971e597faa9f131a2b Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Wed, 29 Jan 2020 09:41:20 +0000 Subject: [PATCH] configs: Enabling SimObj CLI for baremetal platform Change-Id: I0d4059976c8fb6a1d796998af302eaa764609f86 Signed-off-by: Giacomo Travaglini Reviewed-by: Ciro Santilli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27347 Tested-by: Gem5 Cloud Project GCB service account <345032938727@cloudbuild.gserviceaccount.com> Tested-by: kokoro --- configs/example/arm/baremetal.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 1eb2a82f9..87e895284 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -225,12 +225,22 @@ def main(): "(default: gem5's stderr)") parser.add_argument("args", default=[], nargs="*", help="Semihosting arguments to pass to benchmark") + parser.add_argument("-P", "--param", action="append", default=[], + help="Set a SimObject parameter relative to the root node. " + "An extended Python multi range slicing syntax can be used " + "for arrays. For example: " + "'system.cpu[0,1,3:8:2].max_insts_all_threads = 42' " + "sets max_insts_all_threads for cpus 0, 1, 3, 5 and 7 " + "Direct parameters of the root object are not accessible, " + "only parameters of its children.") args = parser.parse_args() root = Root(full_system=True) root.system = create(args) + root.apply_config(args.param) + if args.restore is not None: m5.instantiate(args.restore) else: -- 2.30.2