mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-21 17:34:03 +08:00
test: convert test_pulse_rate_dds to use mu.
Before this commit, this test was actually measuring soft-FP performance.
This commit is contained in:
parent
57f54dbd12
commit
0b67396630
@ -119,13 +119,14 @@ class PulseRateDDS(EnvExperiment):
|
|||||||
def run(self):
|
def run(self):
|
||||||
self.core.reset()
|
self.core.reset()
|
||||||
dt = self.core.seconds_to_mu(5*us)
|
dt = self.core.seconds_to_mu(5*us)
|
||||||
|
freq = self.core_dds.frequency_to_ftw(100*MHz)
|
||||||
while True:
|
while True:
|
||||||
delay(10*ms)
|
delay(10*ms)
|
||||||
for i in range(1250):
|
for i in range(1250):
|
||||||
try:
|
try:
|
||||||
with self.core_dds.batch:
|
with self.core_dds.batch:
|
||||||
self.dds0.set(100*MHz)
|
self.dds0.set_mu(freq)
|
||||||
self.dds1.set(100*MHz)
|
self.dds1.set_mu(freq)
|
||||||
delay_mu(dt)
|
delay_mu(dt)
|
||||||
except RTIOUnderflow:
|
except RTIOUnderflow:
|
||||||
dt += 100
|
dt += 100
|
||||||
@ -360,7 +361,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, 1*us)
|
self.assertGreater(rate, 1*us)
|
||||||
self.assertLess(rate, 6.2*us)
|
self.assertLess(rate, 6.5*us)
|
||||||
|
|
||||||
def test_loopback_count(self):
|
def test_loopback_count(self):
|
||||||
npulses = 2
|
npulses = 2
|
||||||
|
Loading…
Reference in New Issue
Block a user