mirror of https://github.com/m-labs/artiq.git
test_pulse_rate: tighten upper bound to 1500ns.
This commit is contained in:
parent
92f3dc705f
commit
fcf2a73f82
|
@ -89,18 +89,19 @@ class PulseRate(EnvExperiment):
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def run(self):
|
def run(self):
|
||||||
dt = seconds_to_mu(1000*ns)
|
dt = seconds_to_mu(300*ns)
|
||||||
while True:
|
while True:
|
||||||
try:
|
for i in range(10000):
|
||||||
for i in range(1000):
|
try:
|
||||||
self.ttl_out.pulse_mu(dt)
|
self.ttl_out.pulse_mu(dt)
|
||||||
delay_mu(dt)
|
delay_mu(dt)
|
||||||
except RTIOUnderflow:
|
except RTIOUnderflow:
|
||||||
dt += 1
|
dt += 1
|
||||||
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 PulseRateDDS(EnvExperiment):
|
class PulseRateDDS(EnvExperiment):
|
||||||
|
@ -254,7 +255,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*ns)
|
self.assertGreater(rate, 100*ns)
|
||||||
self.assertLess(rate, 2500*ns)
|
self.assertLess(rate, 1500*ns)
|
||||||
|
|
||||||
def test_pulse_rate_dds(self):
|
def test_pulse_rate_dds(self):
|
||||||
self.execute(PulseRateDDS)
|
self.execute(PulseRateDDS)
|
||||||
|
|
Loading…
Reference in New Issue