summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-dfa-benchmark.py13
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)