configs: Add --machine-type option to baremetal.py
authorGiacomo Travaglini <giacomo.travaglini@arm.com>
Wed, 15 Apr 2020 17:20:07 +0000 (18:20 +0100)
committerGiacomo Travaglini <giacomo.travaglini@arm.com>
Tue, 21 Apr 2020 15:34:01 +0000 (15:34 +0000)
Change-Id: Ie5d81b455b86f456a49ba91aa231169be319fa73
Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Reviewed-by: Adrian Herrera <adrian.herrera@arm.com>
Reviewed-by: Ciro Santilli <ciro.santilli@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27952
Tested-by: kokoro <noreply+kokoro@google.com>
configs/example/arm/baremetal.py

index 36928ec9081e9f3e536599d48af55169c8de5b68..00a350a4542365e497a658f1804654cd737d3e33 100644 (file)
@@ -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")