summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/harness.py2
-rw-r--r--lib/runner.py16
2 files changed, 16 insertions, 2 deletions
diff --git a/lib/harness.py b/lib/harness.py
index 1c3dbe0..ae9c28c 100644
--- a/lib/harness.py
+++ b/lib/harness.py
@@ -229,6 +229,7 @@ class TransitionHarness:
log_data_target["parameter"][parameter_name] = list()
log_data_target["parameter"][parameter_name].append(parameter_value)
+ # Here Be Dragons
def parser_cb(self, line):
# print('[HARNESS] got line {}'.format(line))
if re.match(r"\[PTA\] benchmark stop", line):
@@ -440,6 +441,7 @@ class OnboardTimerHarness(TransitionHarness):
log_data_target["parameter"][parameter_name] = list()
log_data_target["parameter"][parameter_name].append(parameter_value)
+ # Here Be Dragons
def parser_cb(self, line):
# print('[HARNESS] got line {}'.format(line))
res = re.match(r"\[PTA\] nop=(\S+)/(\S+)", line)
diff --git a/lib/runner.py b/lib/runner.py
index 0a32091..0d4d449 100644
--- a/lib/runner.py
+++ b/lib/runner.py
@@ -178,6 +178,12 @@ class EnergyTraceMonitor(SerialMonitor):
"voltage": self._voltage,
}
+class EnergyTraceLogicAnalyzerMonitor(EnergyTraceMonitor):
+ """EnergyTraceLogicAnalyzerMonitor captures EnergyTrace energy data and LogicAnalyzer timing output."""
+
+ def __init__(self, port: str, baud: int, callback=None, voltage=3.3):
+ super().__init__(port=port, baud=baud, callback=callback, voltage=voltage)
+
class MIMOSAMonitor(SerialMonitor):
"""MIMOSAMonitor captures serial output and MIMOSA energy data for a specific amount of time."""
@@ -372,8 +378,14 @@ def get_monitor(arch: str, **kwargs) -> object:
mimosa_kwargs = kwargs.pop("mimosa")
return MIMOSAMonitor(port, arg, **mimosa_kwargs, **kwargs)
elif "energytrace" in kwargs and kwargs["energytrace"] is not None:
- energytrace_kwargs = kwargs.pop("energytrace")
- return EnergyTraceMonitor(port, arg, **energytrace_kwargs, **kwargs)
+ energytrace_kwargs = kwargs.pop("energytrace").copy()
+ sync_mode = energytrace_kwargs.pop("sync")
+ if sync_mode == "la":
+ return EnergyTraceLogicAnalyzerMonitor(
+ port, arg, **energytrace_kwargs, **kwargs
+ )
+ else:
+ return EnergyTraceMonitor(port, arg, **energytrace_kwargs, **kwargs)
else:
kwargs.pop("energytrace", None)
kwargs.pop("mimosa", None)