From 91645ffc2438e1c01be2a982cbece8fd18b48e00 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 15 Apr 2016 01:18:36 +0800 Subject: [PATCH] test/analyzer: clear analyzer buffer after IO init --- artiq/test/coredevice/test_analyzer.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/artiq/test/coredevice/test_analyzer.py b/artiq/test/coredevice/test_analyzer.py index a322f4c2b..33675f99d 100644 --- a/artiq/test/coredevice/test_analyzer.py +++ b/artiq/test/coredevice/test_analyzer.py @@ -11,10 +11,13 @@ class CreateTTLPulse(EnvExperiment): self.setattr_device("loop_out") @kernel - def run(self): + def initialize_io(self): self.loop_in.input() self.loop_out.off() - delay_mu(8) + + @kernel + def run(self): + self.core.break_realtime() with parallel: self.loop_in.gate_both_mu(1200) with sequential: @@ -27,10 +30,9 @@ class AnalyzerTest(ExperimentCase): def test_ttl_pulse(self): comm = self.device_mgr.get("comm") - # clear analyzer buffer - comm.get_analyzer_dump() - exp = self.create(CreateTTLPulse) + exp.initialize_io() + comm.get_analyzer_dump() # clear analyzer buffer exp.run() dump = decode_dump(comm.get_analyzer_dump())