summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorChun-Chen TK Hsu <chunchenhsu@google.com>2019-10-25 16:59:27 +0800
committerChun-Chen TK Hsu <chunchenhsu@google.com>2019-10-30 08:14:49 +0000
commit797976431ab5e953f17ae33ee11d98373103c41d (patch)
tree62e2d8c796740aff8a984bd7e5352e30d5298986 /src/arch
parentfa877e19d31203744aecbb252a4f0207dc7491dd (diff)
downloadgem5-797976431ab5e953f17ae33ee11d98373103c41d.tar.xz
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 <gabeblack@google.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/fastmodel/arm_fast_model.py6
1 files changed, 6 insertions, 0 deletions
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)