diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-10 12:01:24 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-12-10 12:01:24 +0100 |
commit | f09f89618b24916cb2e0b2c20bb9464df8e5de2c (patch) | |
tree | 3ce797f0f9724074c6609f0d52f7d6591f3a6a44 /bin | |
parent | bcbc610d64501eb983b6844ee4cf3a31ce4cc6a6 (diff) |
generate-dfa-benchmark: add delay_after_ms support
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/generate-dfa-benchmark.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py index 94505ac..1fa1a54 100755 --- a/bin/generate-dfa-benchmark.py +++ b/bin/generate-dfa-benchmark.py @@ -157,7 +157,12 @@ 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']: + if 'delay_after_ms' in transition.codegen: + if 'energytrace' in opt: + outbuf.write('arch.sleep_ms({:d}); // {} -- delay mandated by codegen.delay_after_ms\n'.format(transition.codegen['delay_after_ms'], transition.destination.name)) + else: + outbuf.write('arch.delay_ms({:d}); // {} -- delay mandated by codegen.delay_after_ms\n'.format(transition.codegen['delay_after_ms'], transition.destination.name)) + elif opt['sleep']: if 'energytrace' in opt: outbuf.write('arch.sleep_ms({:d}); // {}\n'.format(opt['sleep'], transition.destination.name)) else: @@ -314,6 +319,9 @@ if __name__ == '__main__': optname = re.sub(r'^--', '', option) opt[optname] = parameter + if 'app' not in opt: + opt['app'] = 'test_benchmark' + if 'depth' in opt: opt['depth'] = int(opt['depth']) else: |