From 76dcccb33b605da08506808a62866c6d29fe0a2b Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Tue, 5 Apr 2016 20:51:03 +0800 Subject: [PATCH] test_rtio: comments and correction * add comments what is actually being measured in the two rate tests * remove spurious factor of two --- artiq/test/coredevice/test_rtio.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index d0a908dbf..1b168915a 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -83,6 +83,8 @@ class ClockGeneratorLoopback(EnvExperiment): class PulseRate(EnvExperiment): + kernel_constant_attributes = {"core", "ttl_out"} + def build(self): self.setattr_device("core") self.setattr_device("ttl_out") @@ -129,7 +131,7 @@ class PulseRateDDS(EnvExperiment): self.core.break_realtime() break else: - self.set_dataset("pulse_rate", mu_to_seconds(2*dt)) + self.set_dataset("pulse_rate", mu_to_seconds(dt)) return @@ -253,6 +255,7 @@ class CoredeviceTest(ExperimentCase): self.assertEqual(count, 10) def test_pulse_rate(self): + """Mimumum delay and duration of sustainably emitted TTL pulses""" self.execute(PulseRate) rate = self.dataset_mgr.get("pulse_rate") print(rate) @@ -260,11 +263,13 @@ class CoredeviceTest(ExperimentCase): self.assertLess(rate, 1500*ns) def test_pulse_rate_dds(self): + """Minimum delay between DDS batches each setting the frequencies of + two DDS""" self.execute(PulseRateDDS) rate = self.dataset_mgr.get("pulse_rate") print(rate) - self.assertGreater(rate, 5*us) - self.assertLess(rate, 25*us) + self.assertGreater(rate, 3*us) + self.assertLess(rate, 12*us) def test_loopback_count(self): npulses = 2