summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-03-13 10:58:56 +0100
committerDaniel Friesel <derf@finalrewind.org>2019-03-13 10:58:56 +0100
commit0c132a304eb001dcd7ff9ee578854c92686fe15b (patch)
tree156615f7ffb4b9dc36fe5a648d5b919a836bc801 /bin
parent28d33c2006b88c40d9ff068f2ea3baa8ed6db44f (diff)
WiP
Diffstat (limited to 'bin')
-rwxr-xr-xbin/generate-dfa-benchmark.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py
index d4e7996..3019a2e 100755
--- a/bin/generate-dfa-benchmark.py
+++ b/bin/generate-dfa-benchmark.py
@@ -94,9 +94,9 @@ if __name__ == '__main__':
class_prefix = '{}.'.format(pta.codegen['instance'])
num_transitions = 0
- for run in pta.dfs(opt['depth'], with_arguments = True):
+ for run in pta.dfs(opt['depth'], with_arguments = True, with_parameters = True):
outbuf.write(harness.start_run())
- for transition, arguments in run:
+ for transition, arguments, parameter in run:
num_transitions += 1
outbuf.write('// {} -> {}\n'.format(transition.origin.name, transition.destination.name))
if transition.is_interrupt:
@@ -104,7 +104,7 @@ if __name__ == '__main__':
transition_code = '// TODO add startTransition / stopTransition calls to interrupt routine'
else:
transition_code = '{}{}({});'.format(class_prefix, transition.name, ', '.join(map(str, arguments)))
- outbuf.write(harness.pass_transition(pta.get_transition_id(transition), transition_code))
+ outbuf.write(harness.pass_transition(pta.get_transition_id(transition), transition_code, parameter))
if 'sleep' in opt:
outbuf.write('arch.delay_ms({:d});\n'.format(opt['sleep']))