forked from M-Labs/artiq
1
0
Fork 0

test_pulse_rate_dds: tighten upper bound to 400us.

This commit is contained in:
whitequark 2016-03-27 14:26:44 +00:00 committed by Sebastien Bourdeauducq
parent 718d411dd5
commit 348e058c6f
1 changed files with 9 additions and 8 deletions

View File

@ -115,19 +115,20 @@ class PulseRateDDS(EnvExperiment):
def run(self): def run(self):
dt = seconds_to_mu(150*us) dt = seconds_to_mu(150*us)
while True: while True:
try: delay(10*ms)
delay(10*ms) for i in range(100):
for i in range(100): try:
with self.core_dds.batch: with self.core_dds.batch:
self.dds0.set(100*MHz) self.dds0.set(100*MHz)
self.dds1.set(100*MHz) self.dds1.set(100*MHz)
delay_mu(dt) delay_mu(dt)
except RTIOUnderflow: except RTIOUnderflow:
dt += 100 dt += 100
self.core.break_realtime() self.core.break_realtime()
break
else: else:
self.set_dataset("pulse_rate", mu_to_seconds(2*dt)) self.set_dataset("pulse_rate", mu_to_seconds(2*dt))
break return
class Watchdog(EnvExperiment): class Watchdog(EnvExperiment):
@ -262,7 +263,7 @@ class CoredeviceTest(ExperimentCase):
rate = self.dataset_mgr.get("pulse_rate") rate = self.dataset_mgr.get("pulse_rate")
print(rate) print(rate)
self.assertGreater(rate, 100*us) self.assertGreater(rate, 100*us)
self.assertLess(rate, 2500*us) self.assertLess(rate, 400*us)
def test_loopback_count(self): def test_loopback_count(self):
npulses = 2 npulses = 2