From a0f1debb7c578df2f0525616ee354e465bff4281 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Nov 2019 14:17:51 +0100 Subject: generate-dfa-benchmark: use sleep, not busy waiting, in EnergyTrace mode --- bin/generate-dfa-benchmark.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3