From 80eb8be3cfd93255120c6338296366999317973f Mon Sep 17 00:00:00 2001 From: Richard Cooper Date: Fri, 9 Sep 2022 12:36:43 +0100 Subject: [PATCH] configs: Update Arm simple configs to enable --interactive option Removed the calls to `sys.exit()` from the Arm simple configs. These calls terminate gem5's embedded Python interpreter and gem5 at the end of the config script, preventing gem5 from dropping into the interactive IPython shell when the `--interactive` option has been specified. Change-Id: I0c350b0d107f297691255361d25c566c889f9469 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/69687 Reviewed-by: Giacomo Travaglini Maintainer: Giacomo Travaglini Tested-by: kokoro --- configs/example/arm/baremetal.py | 4 +--- configs/example/arm/starter_fs.py | 4 +--- configs/example/arm/starter_se.py | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 9caab9db84..ab24fd3d62 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -174,11 +174,9 @@ def run(args): m5.checkpoint(os.path.join(cpt_dir)) print("Checkpoint done.") else: - print(exit_msg, " @ ", m5.curTick()) + print(f"{exit_msg} ({event.getCode()}) @ {m5.curTick()}") break - sys.exit(event.getCode()) - def main(): parser = argparse.ArgumentParser(epilog=__doc__) diff --git a/configs/example/arm/starter_fs.py b/configs/example/arm/starter_fs.py index cc5f63f554..ebed18864d 100644 --- a/configs/example/arm/starter_fs.py +++ b/configs/example/arm/starter_fs.py @@ -194,11 +194,9 @@ def run(args): m5.checkpoint(os.path.join(cpt_dir)) print("Checkpoint done.") else: - print(exit_msg, " @ ", m5.curTick()) + print(f"{exit_msg} ({event.getCode()}) @ {m5.curTick()}") break - sys.exit(event.getCode()) - def main(): parser = argparse.ArgumentParser(epilog=__doc__) diff --git a/configs/example/arm/starter_se.py b/configs/example/arm/starter_se.py index 33514c7b78..f21f399675 100644 --- a/configs/example/arm/starter_se.py +++ b/configs/example/arm/starter_se.py @@ -257,8 +257,7 @@ def main(): # Print the reason for the simulation exit. Some exit codes are # requests for service (e.g., checkpoints) from the simulation # script. We'll just ignore them here and exit. - print(event.getCause(), " @ ", m5.curTick()) - sys.exit(event.getCode()) + print(f"{event.getCause()} ({event.getCode()}) @ {m5.curTick()}") if __name__ == "__m5_main__":