diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2019-09-25 11:49:43 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2019-09-25 11:49:43 +0200 |
commit | 94f2ed4b0a7a6fe4365a00c3b015e769f91006b8 (patch) | |
tree | 20c91e9347c24b7f1ef58702434e55c53ed60a98 /lib | |
parent | 4c061ecab611f2ab9ab09ed6815c82f675604747 (diff) |
generate dfa benchmark: Add 20us sleep for MIMOSA sync
Diffstat (limited to 'lib')
-rw-r--r-- | lib/harness.py | 5 |
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 |