summaryrefslogtreecommitdiff
path: root/configs/example/fs.py
diff options
context:
space:
mode:
authorRadhika Jagtap <radhika.jagtap@ARM.com>2015-12-07 16:42:16 -0600
committerRadhika Jagtap <radhika.jagtap@ARM.com>2015-12-07 16:42:16 -0600
commit9bd5051b6022249f95364ef30b100b69ac7e7c37 (patch)
tree81ee5797338a1ed3660093dc600156e286c82a01 /configs/example/fs.py
parent8f1ca0a212ede0ecac1199027681f3c2ca9308db (diff)
downloadgem5-9bd5051b6022249f95364ef30b100b69ac7e7c37.tar.xz
config: Enable elastic trace capture and replay in se/fs
This patch adds changes to the configuration scripts to support elastic tracing and replay. The patch adds a command line option to enable elastic tracing in SE mode and FS mode. When enabled the Elastic Trace cpu probe is attached to O3CPU and a few O3 CPU parameters are tuned. The Elastic Trace probe writes out both instruction fetch and data dependency traces. The patch also enables configuring the TraceCPU to replay traces using the SE and FS script. The replay run is designed to resume from checkpoint using atomic cpu to restore state keeping it consistent with FS run flow. It then switches to TraceCPU to replay the input traces.
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r--configs/example/fs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 69b2e970a..dddb2ea3c 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -214,6 +214,17 @@ def build_test_system(np):
test_sys.cpu[i].addCheckerCpu()
test_sys.cpu[i].createThreads()
+ # If elastic tracing is enabled when not restoring from checkpoint and
+ # when not fast forwarding using the atomic cpu, then check that the
+ # TestCPUClass is DerivO3CPU or inherits from DerivO3CPU. If the check
+ # passes then attach the elastic trace probe.
+ # If restoring from checkpoint or fast forwarding, the code that does this for
+ # FutureCPUClass is in the Simulation module. If the check passes then the
+ # elastic trace probe is attached to the switch CPUs.
+ if options.elastic_trace_en and options.checkpoint_restore == None and \
+ not options.fast_forward:
+ CpuConfig.config_etrace(TestCPUClass, test_sys.cpu, options)
+
CacheConfig.config_cache(options, test_sys)
MemConfig.config_mem(options, test_sys)