summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-dfa-benchmark.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py
index 809f8b5..65da4be 100755
--- a/bin/generate-dfa-benchmark.py
+++ b/bin/generate-dfa-benchmark.py
@@ -69,11 +69,9 @@ def benchmark_from_runs(pta: PTA, runs: list, harness: OnboardTimerHarness, benc
outbuf.write('int main(void)\n')
outbuf.write('{\n')
+
for driver in ('arch', 'gpio', 'kout'):
outbuf.write('{}.setup();\n'.format(driver))
- if 'setup' in pta.codegen:
- for call in pta.codegen['setup']:
- outbuf.write(call)
# There is a race condition between flashing the code and starting the UART log.
# When starting the log before flashing, output from a previous benchmark may cause bogus data to be added.
@@ -82,6 +80,11 @@ def benchmark_from_runs(pta: PTA, runs: list, harness: OnboardTimerHarness, benc
# This is also useful to faciliate MIMOSA calibration after flashing
outbuf.write('arch.delay_ms(12000);\n')
+ if 'setup' in pta.codegen:
+ for call in pta.codegen['setup']:
+ outbuf.write(call)
+
+
if repeat:
outbuf.write('unsigned char i = 0;\n')
outbuf.write('while (i++ < {}) {{\n'.format(repeat))