From 5af22af5f65fb7f9c17159e2f3ffb5a35db2b3df Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Tue, 1 Mar 2022 11:49:03 +0800 Subject: [PATCH] examples/nac3devices: fix and reenable Phaser --- artiq/coredevice/phaser.py | 2 ++ artiq/examples/nac3devices/nac3devices.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/artiq/coredevice/phaser.py b/artiq/coredevice/phaser.py index 5f3c4c334..a68b5eda8 100644 --- a/artiq/coredevice/phaser.py +++ b/artiq/coredevice/phaser.py @@ -192,6 +192,7 @@ class Phaser: self.sync_dly = sync_dly self.dac_mmap = DAC34H84(dac).get_mmap() + self.dac_mmap = [int32(x) for x in self.dac_mmap] # NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/14 self.channel = [PhaserChannel(self, ch, trf) for ch, trf in enumerate([trf0, trf1])] @@ -810,6 +811,7 @@ class PhaserChannel: self.phaser = phaser self.index = index self.trf_mmap = TRF372017(trf).get_mmap() + self.trf_mmap = [int32(x) for x in self.trf_mmap] # NAC3TODO https://git.m-labs.hk/M-Labs/nac3/issues/14 self.oscillator = [PhaserOscillator(self, osc) for osc in range(5)] diff --git a/artiq/examples/nac3devices/nac3devices.py b/artiq/examples/nac3devices/nac3devices.py index 396da3fd5..79b4815fb 100644 --- a/artiq/examples/nac3devices/nac3devices.py +++ b/artiq/examples/nac3devices/nac3devices.py @@ -26,7 +26,7 @@ class NAC3Devices(EnvExperiment): ttl0_counter: KernelInvariant[EdgeCounter] grabber0: KernelInvariant[Grabber] fastino0: KernelInvariant[Fastino] - # NAC3TODO segfault phaser0: KernelInvariant[Fastino] + phaser0: KernelInvariant[Phaser] def build(self): self.setattr_device("core") @@ -40,7 +40,7 @@ class NAC3Devices(EnvExperiment): self.setattr_device("ttl0_counter") self.setattr_device("grabber0") self.setattr_device("fastino0") - # NAC3TODO segfault self.setattr_device("phaser0") + self.setattr_device("phaser0") @kernel def run(self):