From: Giacomo Travaglini Date: Wed, 15 Apr 2020 17:20:07 +0000 (+0100) Subject: configs: Add --machine-type option to baremetal.py X-Git-Tag: v20.0.0.0~178 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b1d434363b108681b3d8e3fbf57a0a6dd7fba6b3;p=gem5.git configs: Add --machine-type option to baremetal.py Change-Id: Ie5d81b455b86f456a49ba91aa231169be319fa73 Signed-off-by: Giacomo Travaglini Reviewed-by: Adrian Herrera Reviewed-by: Ciro Santilli Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27952 Tested-by: kokoro --- diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 36928ec90..00a350a45 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -93,10 +93,12 @@ def create(args): # Only simulate caches when using a timing CPU (e.g., the HPI model) want_caches = True if mem_mode == "timing" else False + platform = ObjectList.platform_list.get(args.machine_type) + system = devices.simpleSystem(ArmSystem, want_caches, args.mem_size, - platform=VExpress_GEM5_V2(), + platform=platform(), mem_mode=mem_mode, workload=ArmFsWorkload( atags_addr=0, @@ -199,6 +201,10 @@ def main(): parser.add_argument("--cpu-freq", type=str, default="4GHz") parser.add_argument("--num-cores", type=int, default=1, help="Number of CPU cores") + parser.add_argument("--machine-type", type=str, + choices=ObjectList.platform_list.get_names(), + default="VExpress_GEM5_V2", + help="Hardware platform class") parser.add_argument("--mem-type", default="DDR3_1600_8x8", choices=ObjectList.mem_list.get_names(), help = "type of memory to use")