From 94f2ed4b0a7a6fe4365a00c3b015e769f91006b8 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 25 Sep 2019 11:49:43 +0200 Subject: generate dfa benchmark: Add 20us sleep for MIMOSA sync --- lib/harness.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3