From bbc98410e40a32563a5e63a7e1b474c71dfab8e2 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 9 Aug 2018 16:55:07 +0800 Subject: [PATCH] =?UTF-8?q?test:=20dds=20=E2=86=92=20ad9914dds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevent confusion with Urukul. --- artiq/examples/kc705_nist_clock/device_db.py | 10 ++++----- artiq/examples/master/device_db.py | 10 ++++----- artiq/test/coredevice/test_rtio.py | 22 ++++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/artiq/examples/kc705_nist_clock/device_db.py b/artiq/examples/kc705_nist_clock/device_db.py index d741ceded..140fbd716 100644 --- a/artiq/examples/kc705_nist_clock/device_db.py +++ b/artiq/examples/kc705_nist_clock/device_db.py @@ -134,20 +134,20 @@ device_db = { }, # AD9914 DDS - "dds0": { + "ad9914dds0": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", "arguments": {"sysclk": 3e9, "bus_channel": 27, "channel": 0}, "comment": "Comments work in DDS panel as well" }, - "dds1": { + "ad9914dds1": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", "arguments": {"sysclk": 3e9, "bus_channel": 27, "channel": 1} }, - "dds2": { + "ad9914dds2": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", @@ -164,8 +164,8 @@ device_db = { "loop_clock_in": "ttl7", "pmt": "ttl3", - "bd_dds": "dds0", + "bd_dds": "ad9914dds0", "bd_sw": "ttl0", - "bdd_dds": "dds1", + "bdd_dds": "ad9914dds1", "bdd_sw": "ttl1" } diff --git a/artiq/examples/master/device_db.py b/artiq/examples/master/device_db.py index 69ed74c8f..ad4bc65b6 100644 --- a/artiq/examples/master/device_db.py +++ b/artiq/examples/master/device_db.py @@ -321,20 +321,20 @@ device_db = { }, # AD9914 DDS - "dds0": { + "ad9914dds0": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", "arguments": {"sysclk": 3e9, "bus_channel": 39, "channel": 0}, "comment": "Comments work in DDS panel as well" }, - "dds1": { + "ad9914dds1": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", "arguments": {"sysclk": 3e9, "bus_channel": 39, "channel": 1} }, - "dds2": { + "ad9914dds2": { "type": "local", "module": "artiq.coredevice.ad9914", "class": "AD9914", @@ -351,8 +351,8 @@ device_db = { "loop_clock_in": "ttl7", "pmt": "ttl3", - "bd_dds": "dds0", + "bd_dds": "ad9914dds0", "bd_sw": "ttl0", - "bdd_dds": "dds1", + "bdd_dds": "ad9914dds1", "bdd_sw": "ttl1" } diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index 401f4109b..7513d63d1 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -124,25 +124,25 @@ class PulseRate(EnvExperiment): return -class PulseRateDDS(EnvExperiment): +class PulseRateAD9914DDS(EnvExperiment): def build(self): self.setattr_device("core") - self.setattr_device("dds0") - self.setattr_device("dds1") + self.setattr_device("ad9914dds0") + self.setattr_device("ad9914dds1") @kernel def run(self): self.core.reset() dt = self.core.seconds_to_mu(5*us) - freq = self.dds0.frequency_to_ftw(100*MHz) + freq = self.ad9914dds0.frequency_to_ftw(100*MHz) while True: delay(10*ms) for i in range(1250): try: - delay_mu(-self.dds0.set_duration_mu) - self.dds0.set_mu(freq) - delay_mu(self.dds0.set_duration_mu) - self.dds1.set_mu(freq) + delay_mu(-self.ad9914dds0.set_duration_mu) + self.ad9914dds0.set_mu(freq) + delay_mu(self.ad9914dds0.set_duration_mu) + self.ad9914dds1.set_mu(freq) delay_mu(dt) except RTIOUnderflow: dt += 100 @@ -395,9 +395,9 @@ class CoredeviceTest(ExperimentCase): self.assertGreater(rate, 100*ns) self.assertLess(rate, 700*ns) - def test_pulse_rate_dds(self): - """Minimum interval for sustained DDS frequency switching""" - self.execute(PulseRateDDS) + def test_pulse_rate_ad9914_dds(self): + """Minimum interval for sustained AD9914 DDS frequency switching""" + self.execute(PulseRateAD9914DDS) rate = self.dataset_mgr.get("pulse_rate") print(rate) self.assertGreater(rate, 1*us)