From b2f7022e0a22b6c902b086b10595f89e2cb28c86 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 28 Nov 2021 12:48:18 +0800 Subject: [PATCH] examples/nac3devices: demonstrate new capabilities --- artiq/examples/nac3devices/nac3devices.json | 5 +++++ artiq/examples/nac3devices/nac3devices.py | 24 +++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/artiq/examples/nac3devices/nac3devices.json b/artiq/examples/nac3devices/nac3devices.json index bd8d9043a..d7285f690 100644 --- a/artiq/examples/nac3devices/nac3devices.json +++ b/artiq/examples/nac3devices/nac3devices.json @@ -10,6 +10,11 @@ "type": "zotino", "ports": [0] }, + { + "type": "mirny", + "ports": [1], + "clk_sel": "mmcx" + }, { "type": "urukul", "dds": "ad9912", diff --git a/artiq/examples/nac3devices/nac3devices.py b/artiq/examples/nac3devices/nac3devices.py index 70d8eec6a..d6d50fa81 100644 --- a/artiq/examples/nac3devices/nac3devices.py +++ b/artiq/examples/nac3devices/nac3devices.py @@ -1,19 +1,26 @@ from artiq.experiment import * from artiq.coredevice.core import Core from artiq.coredevice.zotino import Zotino -from artiq.coredevice.urukul import CPLD +from artiq.coredevice.mirny import Mirny as MirnyCPLD +from artiq.coredevice.adf5356 import ADF5356 +from artiq.coredevice.urukul import CPLD as UrukulCPLD from artiq.coredevice.ad9912 import AD9912 + @nac3 class NAC3Devices(EnvExperiment): core: KernelInvariant[Core] zotino0: KernelInvariant[Zotino] - urukul0_cpld: KernelInvariant[CPLD] + mirny0_cpld: KernelInvariant[MirnyCPLD] + mirny0_ch0: KernelInvariant[ADF5356] + urukul0_cpld: KernelInvariant[UrukulCPLD] urukul0_ch0: KernelInvariant[AD9912] def build(self): self.setattr_device("core") self.setattr_device("zotino0") + self.setattr_device("mirny0_cpld") + self.setattr_device("mirny0_ch0") self.setattr_device("urukul0_cpld") self.setattr_device("urukul0_ch0") @@ -21,14 +28,23 @@ class NAC3Devices(EnvExperiment): def run(self): self.core.reset() self.core.delay(1.*ms) - self.zotino0.init(False) + self.zotino0.init() self.zotino0.set_leds(0x15) self.core.delay(1.*ms) self.zotino0.set_dac([1.2, -5.3, 3.4, 4.5], [0, 1, 2, 3]) self.core.break_realtime() self.core.delay(1.*ms) - self.urukul0_cpld.init(False) + self.mirny0_cpld.init() + self.mirny0_ch0.init() + self.mirny0_ch0.set_att_mu(160) + self.mirny0_ch0.sw.on() + self.core.break_realtime() + self.mirny0_ch0.set_frequency(2500.*MHz) + + self.core.break_realtime() + self.core.delay(1.*ms) + self.urukul0_cpld.init() self.urukul0_ch0.init() self.urukul0_ch0.sw.on() for i in range(10):