From 797976431ab5e953f17ae33ee11d98373103c41d Mon Sep 17 00:00:00 2001 From: Chun-Chen TK Hsu Date: Fri, 25 Oct 2019 16:59:27 +0800 Subject: [PATCH] fastmodel: Helper function to setup FastModels for simulation This function sets up ARM license, simulation name, and minimum synchronize latency in FastModels. This function should be called once per simulation. Change-Id: Ic3408955aaff9f8b4e2b72d2f2b0da97b41bfc3f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22183 Reviewed-by: Gabe Black Maintainer: Giacomo Travaglini Tested-by: kokoro --- src/arch/arm/fastmodel/arm_fast_model.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/arch/arm/fastmodel/arm_fast_model.py b/src/arch/arm/fastmodel/arm_fast_model.py index d666b7feb..2c19fe5bc 100644 --- a/src/arch/arm/fastmodel/arm_fast_model.py +++ b/src/arch/arm/fastmodel/arm_fast_model.py @@ -128,3 +128,9 @@ def scx_get_min_sync_latency(arg=None): return _m5.arm_fast_model.scx_get_min_sync_latency(arg) else: return _m5.arm_fast_model.scx_get_min_sync_latency() + +# This should be called once per simulation +def setup_simulation(sim_name, min_sync_latency=100.0 / 100000000): + set_armlmd_license_file() + scx_initialize(sim_name) + scx_set_min_sync_latency(min_sync_latency) -- 2.30.2