mirror of https://github.com/m-labs/artiq.git
test/analyzer: clear analyzer buffer after IO init
This commit is contained in:
parent
848c86e8a4
commit
e1a229028d
|
@ -11,10 +11,13 @@ class CreateTTLPulse(EnvExperiment):
|
||||||
self.setattr_device("loop_out")
|
self.setattr_device("loop_out")
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def initialize_io(self):
|
||||||
self.loop_in.input()
|
self.loop_in.input()
|
||||||
self.loop_out.off()
|
self.loop_out.off()
|
||||||
delay_mu(8)
|
|
||||||
|
@kernel
|
||||||
|
def run(self):
|
||||||
|
self.core.break_realtime()
|
||||||
with parallel:
|
with parallel:
|
||||||
self.loop_in.gate_both_mu(1200)
|
self.loop_in.gate_both_mu(1200)
|
||||||
with sequential:
|
with sequential:
|
||||||
|
@ -27,10 +30,9 @@ class AnalyzerTest(ExperimentCase):
|
||||||
def test_ttl_pulse(self):
|
def test_ttl_pulse(self):
|
||||||
comm = self.device_mgr.get("comm")
|
comm = self.device_mgr.get("comm")
|
||||||
|
|
||||||
# clear analyzer buffer
|
|
||||||
comm.get_analyzer_dump()
|
|
||||||
|
|
||||||
exp = self.create(CreateTTLPulse)
|
exp = self.create(CreateTTLPulse)
|
||||||
|
exp.initialize_io()
|
||||||
|
comm.get_analyzer_dump() # clear analyzer buffer
|
||||||
exp.run()
|
exp.run()
|
||||||
|
|
||||||
dump = decode_dump(comm.get_analyzer_dump())
|
dump = decode_dump(comm.get_analyzer_dump())
|
||||||
|
|
Loading…
Reference in New Issue