summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-11-05 14:17:51 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-11-05 14:17:51 +0100
commita0f1debb7c578df2f0525616ee354e465bff4281 (patch)
tree21d5caa9dde7a1fcf6ba0c9c0c080d4266e376b2 /bin
parent6a3a5ccd3d3da7f9171b96bcf9be7aaef10a4a7a (diff)
generate-dfa-benchmark: use sleep, not busy waiting, in EnergyTrace mode
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-dfa-benchmark.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py
index 5d89a2d..59da8e7 100755
--- a/bin/generate-dfa-benchmark.py
+++ b/bin/generate-dfa-benchmark.py
@@ -143,7 +143,10 @@ def benchmark_from_runs(pta: PTA, runs: list, harness: OnboardTimerHarness, benc
outbuf.write('// current parameters: {}\n'.format(', '.join(map(lambda kv: '{}={}'.format(*kv), param.items()))))
if opt['sleep']:
- outbuf.write('arch.delay_ms({:d}); // {}\n'.format(opt['sleep'], transition.destination.name))
+ if 'energytrace' in opt:
+ outbuf.write('arch.sleep_ms({:d}); // {}\n'.format(opt['sleep'], transition.destination.name))
+ else:
+ outbuf.write('arch.delay_ms({:d}); // {}\n'.format(opt['sleep'], transition.destination.name))
outbuf.write(harness.stop_run(num_traces))
if dummy: