summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-07-08 13:45:39 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2020-07-08 13:45:39 +0200
commit906c1e0c71c8ad58934990ebe686adf7496e0dce (patch)
tree01750d6b4a727125dc8565381a6f769e86e34b60
parent7b107ef820684cb6aa7f4fe87d2e462e4fffb5c9 (diff)
Add harness.energytrace_sync="led" for LA / Timing based sync
-rwxr-xr-xbin/generate-dfa-benchmark.py3
-rw-r--r--lib/harness.py4
-rw-r--r--lib/runner.py5
3 files changed, 11 insertions, 1 deletions
diff --git a/bin/generate-dfa-benchmark.py b/bin/generate-dfa-benchmark.py
index 1410c28..fdfac35 100755
--- a/bin/generate-dfa-benchmark.py
+++ b/bin/generate-dfa-benchmark.py
@@ -636,8 +636,10 @@ if __name__ == "__main__":
elif "energytrace" in opt:
# Use barcode sync by default
gpio_mode = "bar"
+ energytrace_sync = None
if "sync" in opt["energytrace"] and opt["energytrace"]["sync"] != "bar":
gpio_mode = "around"
+ energytrace_sync = "led"
harness = OnboardTimerHarness(
gpio_pin=timer_pin,
gpio_mode=gpio_mode,
@@ -645,6 +647,7 @@ if __name__ == "__main__":
counter_limits=runner.get_counter_limits_us(opt["arch"]),
log_return_values=need_return_values,
repeat=1,
+ energytrace_sync=energytrace_sync,
)
elif "timing" in opt:
harness = OnboardTimerHarness(
diff --git a/lib/harness.py b/lib/harness.py
index ae9c28c..fe6cb9a 100644
--- a/lib/harness.py
+++ b/lib/harness.py
@@ -33,6 +33,7 @@ class TransitionHarness:
log_return_values=False,
repeat=0,
post_transition_delay_us=0,
+ energytrace_sync=None,
):
"""
Create a new TransitionHarness
@@ -53,6 +54,7 @@ class TransitionHarness:
self.log_return_values = log_return_values
self.repeat = repeat
self.post_transition_delay_us = post_transition_delay_us
+ self.energytrace_sync = energytrace_sync
self.reset()
def copy(self):
@@ -63,6 +65,7 @@ class TransitionHarness:
log_return_values=self.log_return_values,
repeat=self.repeat,
post_transition_delay_us=self.post_transition_delay_us,
+ energytrace_sync=self.energytrace_sync,
)
new_object.traces = self.traces.copy()
new_object.trace_id = self.trace_id
@@ -373,6 +376,7 @@ class OnboardTimerHarness(TransitionHarness):
pta=self.pta,
log_return_values=self.log_return_values,
repeat=self.repeat,
+ energytrace_sync=self.energytrace_sync,
)
new_harness.traces = self.traces.copy()
new_harness.trace_id = self.trace_id
diff --git a/lib/runner.py b/lib/runner.py
index 0d4d449..def9c8f 100644
--- a/lib/runner.py
+++ b/lib/runner.py
@@ -172,12 +172,15 @@ class EnergyTraceMonitor(SerialMonitor):
def get_files(self) -> list:
return [self._output]
- #
+ # Benchmark-Konfiguration. Hier: Die (konstante) Spannung.
+ # MSP430FR5969: 3,6V (wird aktuell nicht unterstützt)
+ # MSP430FR5994: 3,3V (default)
def get_config(self) -> dict:
return {
"voltage": self._voltage,
}
+
class EnergyTraceLogicAnalyzerMonitor(EnergyTraceMonitor):
"""EnergyTraceLogicAnalyzerMonitor captures EnergyTrace energy data and LogicAnalyzer timing output."""