From 57b27d7d96f832fbedf65a5111ad9dd4f0aaa53c Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Tue, 5 Mar 2019 08:44:46 +0100 Subject: DFA benchmarks: Add missing boilerplate code --- bin/generate-dfa-benchmark.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin/generate-dfa-benchmark.py') diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py index 4789ad7..ce67313 100755 --- a/bin/generate-dfa-benchmark.py +++ b/bin/generate-dfa-benchmark.py @@ -47,8 +47,13 @@ if __name__ == '__main__': harness = TransitionHarness('GPIO::p1_0') print('#include "arch.h"') + if pta.header: + print('#include "{}"'.format(pta.header)) print(harness.global_code()) + print('void loop(void)') + print('{') + print(harness.start_benchmark()) class_prefix = '' @@ -75,4 +80,12 @@ if __name__ == '__main__': print() print(harness.stop_benchmark()) + print('}\n') + print('int main(void)') + print('{') + for driver in ('arch', 'gpio', 'kout'): + print('{}.setup();'.format(driver)) + print('arch.idle_loop();') + print('return 0;') + print('}') sys.exit(0) -- cgit v1.2.3