summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-09-25 11:49:43 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-09-25 11:49:43 +0200
commit94f2ed4b0a7a6fe4365a00c3b015e769f91006b8 (patch)
tree20c91e9347c24b7f1ef58702434e55c53ed60a98 /lib
parent4c061ecab611f2ab9ab09ed6815c82f675604747 (diff)
generate dfa benchmark: Add 20us sleep for MIMOSA sync
Diffstat (limited to 'lib')
-rw-r--r--lib/harness.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/harness.py b/lib/harness.py
index 7796634..d3ea481 100644
--- a/lib/harness.py
+++ b/lib/harness.py
@@ -12,7 +12,7 @@ import re
# not have states)
class TransitionHarness:
"""Foo."""
- def __init__(self, gpio_pin = None, pta = None, log_return_values = False, repeat = 0):
+ def __init__(self, gpio_pin = None, pta = None, log_return_values = False, repeat = 0, post_transition_delay_us = 0):
"""
Create a new TransitionHarness
@@ -25,6 +25,7 @@ class TransitionHarness:
self.pta = pta
self.log_return_values = log_return_values
self.repeat = repeat
+ self.post_transition_delay_us = post_transition_delay_us
self.reset()
def copy(self):
@@ -90,6 +91,8 @@ class TransitionHarness:
ret += 'ptalog.logReturn(transition_return_value);\n'
else:
ret += '{}\n'.format(transition_code)
+ if self.post_transition_delay_us:
+ ret += 'arch.delay_us({});\n'.format(self.post_transition_delay_us)
ret += 'ptalog.stopTransition();\n'
return ret