summaryrefslogtreecommitdiff
path: root/tests/configs/tgen-simple-mem.py
diff options
context:
space:
mode:
authorSascha Bischoff <sascha.bischoff@ARM.com>2014-05-09 18:58:46 -0400
committerSascha Bischoff <sascha.bischoff@ARM.com>2014-05-09 18:58:46 -0400
commite940bac278a877699238f9c70748762ea9379db4 (patch)
tree64dd0d1ee7c5d669abdab966c9d993d0dafb43cf /tests/configs/tgen-simple-mem.py
parent29601eada77e66d346def0b219f6ccff48586ace (diff)
downloadgem5-e940bac278a877699238f9c70748762ea9379db4.tar.xz
mem: Auto-generate CommMonitor trace file names
Splits the CommMonitor trace_file parameter into three parameters. Previously, the trace was only enabled if the trace_file parameter was set, and would be written to this file. This patch adds in a trace_enable and trace_compress parameter to the CommMonitor. No trace is generated if trace_enable is set to False. If it is set to True, the trace is written to a file based on the name of the SimObject in the simulation hierarchy. For example, system.cluster.il1_commmonitor.trc. This filename can be overridden by additionally specifying a file name to the trace_file parameter (more on this later). The trace_compress parameter will append .gz to any filename if set to True. This enables compression of the generated traces. If the file name already ends in .gz, then no changes are made. The trace_file parameter will override the name set by the trace_enable parameter. In the case that the specified name does not end in .gz but trace_compress is set to true, .gz is appended to the supplied file name.
Diffstat (limited to 'tests/configs/tgen-simple-mem.py')
-rw-r--r--tests/configs/tgen-simple-mem.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/configs/tgen-simple-mem.py b/tests/configs/tgen-simple-mem.py
index 5e241a25a..7fdeb9c12 100644
--- a/tests/configs/tgen-simple-mem.py
+++ b/tests/configs/tgen-simple-mem.py
@@ -55,7 +55,8 @@ system = System(cpu = cpu, physmem = SimpleMemory(),
VoltageDomain()))
# add a communication monitor, and also trace all the packets
-system.monitor = CommMonitor(trace_file = "monitor.ptrc.gz")
+system.monitor = CommMonitor(trace_file = "monitor.ptrc.gz",
+ trace_enable = True)
# connect the traffic generator to the bus via a communication monitor
system.cpu.port = system.monitor.slave