Skip to content

Commit

Permalink
test_rtio: comments and correction
Browse files Browse the repository at this point in the history
* add comments what is actually being measured in the two rate tests
* remove spurious factor of two
jordens committed Apr 5, 2016
1 parent 1f152bc commit 76dcccb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions artiq/test/coredevice/test_rtio.py
Original file line number Diff line number Diff line change
@@ -83,6 +83,8 @@ def run(self):


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 @@ def run(self):
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,18 +255,21 @@ def test_clock_generator_loopback(self):
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)
self.assertGreater(rate, 100*ns)
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

0 comments on commit 76dcccb

Please sign in to comment.