diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 08:44:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 08:44:46 +0100 |
commit | 57b27d7d96f832fbedf65a5111ad9dd4f0aaa53c (patch) | |
tree | 166f29711547e9865776b03c196c3a266c51d605 /bin | |
parent | 965b35d6ae356a0aed8b7a044af62e868f1fab4e (diff) |
DFA benchmarks: Add missing boilerplate code
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/generate-dfa-benchmark.py | 13 |
1 files changed, 13 insertions, 0 deletions
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) |