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