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 | |
parent | 4c061ecab611f2ab9ab09ed6815c82f675604747 (diff) |
generate dfa benchmark: Add 20us sleep for MIMOSA sync
-rwxr-xr-x | bin/generate-dfa-benchmark.py | 2 | ||||
-rw-r--r-- | lib/harness.py | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py index c030d49..809f8b5 100755 --- a/bin/generate-dfa-benchmark.py +++ b/bin/generate-dfa-benchmark.py @@ -292,7 +292,7 @@ if __name__ == '__main__': need_return_values = True harness = OnboardTimerHarness(gpio_pin = timer_pin, pta = pta, counter_limits = runner.get_counter_limits_us(opt['arch']), log_return_values = need_return_values, repeat = opt['repeat']) - harness = TransitionHarness(gpio_pin = timer_pin, pta = pta, log_return_values = need_return_values, repeat = opt['repeat']) + harness = TransitionHarness(gpio_pin = timer_pin, pta = pta, log_return_values = need_return_values, repeat = opt['repeat'], post_transition_delay_us = 20) if len(args) > 1: results = run_benchmark(args[1], pta, runs, opt['arch'], opt['app'], opt['run'].split(), harness, opt['sleep'], opt['repeat'], runs_total = len(runs), dummy = 'dummy' in opt) 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 |