gem5-dev@gem5.org

The gem5 Developer List

View all threads

[S] Change in gem5/gem5[develop]: configs: Add --exit-on-uart-eot flag to Arm baremetal.py config

RC
Richard Cooper (Gerrit)
Thu, Apr 13, 2023 9:09 PM

Richard Cooper has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/69688?usp=email )

Change subject: configs: Add --exit-on-uart-eot flag to Arm baremetal.py
config
......................................................................

configs: Add --exit-on-uart-eot flag to Arm baremetal.py config

Many benchmarks signal their termination by writing an EOT character
to the UART. This change adds an option to the Arm baremetal.py
example script to exit the simulation when an EOT character is
detected on any of the UARTs.

Change-Id: Ibfce9800c47090714258dbdbc5d6cee5ee6fb952
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69688
Reviewed-by: Giacomo Travaglini giacomo.travaglini@arm.com
Maintainer: Giacomo Travaglini giacomo.travaglini@arm.com
Tested-by: kokoro noreply+kokoro@google.com

M configs/example/arm/baremetal.py
1 file changed, 11 insertions(+), 1 deletion(-)

Approvals:
Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass

diff --git a/configs/example/arm/baremetal.py
b/configs/example/arm/baremetal.py
index ab24fd3..8ffd2b4 100644
--- a/configs/example/arm/baremetal.py
+++ b/configs/example/arm/baremetal.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2016-2017,2019-2022 Arm Limited
+# Copyright (c) 2016-2017,2019-2023 Arm Limited

All rights reserved.

The license below extends only to copyright in the software and shall

@@ -157,6 +157,10 @@
workload_class = workloads.workload_list.get(args.workload)
system.workload = workload_class(object_file, system)

  • if args.exit_on_uart_eot:
  •    for uart in system.realview.uart:
    
  •        uart.end_on_eot = True
    
  • return system
    

@@ -254,6 +258,12 @@
help="Destination for the Tarmac trace output. [Default:
stdoutput]",
)
parser.add_argument(

  •    "--exit-on-uart-eot",
    
  •    action="store_true",
    
  •    help="Exit simulation if any of the UARTs receive an EOT. Many "
    
  •    "workloads signal termination by sending an EOT character.",
    
  • )
  • parser.add_argument(
    "--dtb-gen",
    action="store_true",
    help="Doesn't run simulation, it generates a DTB only",

--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/69688?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ibfce9800c47090714258dbdbc5d6cee5ee6fb952
Gerrit-Change-Number: 69688
Gerrit-PatchSet: 4
Gerrit-Owner: Richard Cooper richard.cooper@arm.com
Gerrit-Reviewer: Giacomo Travaglini giacomo.travaglini@arm.com
Gerrit-Reviewer: Jason Lowe-Power jason@lowepower.com
Gerrit-Reviewer: Jason Lowe-Power power.jg@gmail.com
Gerrit-Reviewer: Richard Cooper richard.cooper@arm.com
Gerrit-Reviewer: kokoro noreply+kokoro@google.com
Gerrit-MessageType: merged

Richard Cooper has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/69688?usp=email ) Change subject: configs: Add --exit-on-uart-eot flag to Arm baremetal.py config ...................................................................... configs: Add --exit-on-uart-eot flag to Arm baremetal.py config Many benchmarks signal their termination by writing an EOT character to the UART. This change adds an option to the Arm `baremetal.py` example script to exit the simulation when an EOT character is detected on any of the UARTs. Change-Id: Ibfce9800c47090714258dbdbc5d6cee5ee6fb952 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69688 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com> --- M configs/example/arm/baremetal.py 1 file changed, 11 insertions(+), 1 deletion(-) Approvals: Giacomo Travaglini: Looks good to me, approved; Looks good to me, approved kokoro: Regressions pass diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index ab24fd3..8ffd2b4 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016-2017,2019-2022 Arm Limited +# Copyright (c) 2016-2017,2019-2023 Arm Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -157,6 +157,10 @@ workload_class = workloads.workload_list.get(args.workload) system.workload = workload_class(object_file, system) + if args.exit_on_uart_eot: + for uart in system.realview.uart: + uart.end_on_eot = True + return system @@ -254,6 +258,12 @@ help="Destination for the Tarmac trace output. [Default: stdoutput]", ) parser.add_argument( + "--exit-on-uart-eot", + action="store_true", + help="Exit simulation if any of the UARTs receive an EOT. Many " + "workloads signal termination by sending an EOT character.", + ) + parser.add_argument( "--dtb-gen", action="store_true", help="Doesn't run simulation, it generates a DTB only", -- To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/69688?usp=email To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings Gerrit-Project: public/gem5 Gerrit-Branch: develop Gerrit-Change-Id: Ibfce9800c47090714258dbdbc5d6cee5ee6fb952 Gerrit-Change-Number: 69688 Gerrit-PatchSet: 4 Gerrit-Owner: Richard Cooper <richard.cooper@arm.com> Gerrit-Reviewer: Giacomo Travaglini <giacomo.travaglini@arm.com> Gerrit-Reviewer: Jason Lowe-Power <jason@lowepower.com> Gerrit-Reviewer: Jason Lowe-Power <power.jg@gmail.com> Gerrit-Reviewer: Richard Cooper <richard.cooper@arm.com> Gerrit-Reviewer: kokoro <noreply+kokoro@google.com> Gerrit-MessageType: merged