From 740f3d220bfe2bd196d071373a787a0f4131a614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 23 Sep 2022 13:39:49 +0000 Subject: [PATCH] refine/fixes --- artiq/coredevice/phaser.py | 12 ++++++------ artiq/frontend/artiq_sinara_tester.py | 10 ++++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/artiq/coredevice/phaser.py b/artiq/coredevice/phaser.py index 6d0cefba3..8a7131c2d 100644 --- a/artiq/coredevice/phaser.py +++ b/artiq/coredevice/phaser.py @@ -383,7 +383,7 @@ class Phaser: if channel.get_att_mu() != 0x5a: raise ValueError("attenuator test failed") delay(.1*ms) - channel.set_att_mu(0x00) # minimum attenuation + channel.set_att_mu(0x00) # maximum attenuation channel.set_servo(profile=0, enable=0, hold=1) @@ -1487,8 +1487,8 @@ class Miqro: :param rate: Interpolation rate change (1 to 1 << 12) :param shift: Interpolator amplitude gain compensation in powers of 2 (0 to 63) :param order: Interpolation order from 0 (corresponding to - constant/zero-order-hold/1st order CIC interpolation) to 3 (corresponding - to cubic/Parzen/4th order CIC interpolation) + constant/rectangular window/zero-order-hold/1st order CIC interpolation) + to 3 (corresponding to cubic/Parzen window/4th order CIC interpolation) :param head: Update the interpolator settings and clear its state at the start of the window. This also implies starting the envelope from zero. :param tail: Feed zeros into the interpolator after the window samples. @@ -1581,12 +1581,12 @@ class Miqro: for profile in profiles: if profile > 0x1f: raise ValueError("profile out of bounds") - data[word] |= profile << idx - idx += 5 if idx > 32 - 5: word += 1 idx = 0 - return word + data[word] |= profile << idx + idx += 5 + return word + 1 @kernel def pulse_mu(self, data): diff --git a/artiq/frontend/artiq_sinara_tester.py b/artiq/frontend/artiq_sinara_tester.py index fea05bbcd..84a68c405 100755 --- a/artiq/frontend/artiq_sinara_tester.py +++ b/artiq/frontend/artiq_sinara_tester.py @@ -587,16 +587,18 @@ class SinaraTester(EnvExperiment): delay(1*ms) elif phaser.gw_rev == 2: # miqro for ch in range(2): - delay(1*ms) phaser.channel[ch].set_att(6*dB) - phaser.channel[ch].miqro.set_window( - start=0x00, iq=[[1., 0.]], order=0, tail=0) + phaser.channel[ch].set_duc_cfg(select=0) sign = 1. - 2.*ch for i in range(len(osc)): - phaser.channel[ch].miqro.set_profile(osc, profile=1, + phaser.channel[ch].miqro.set_profile(i, profile=1, frequency=sign*(duc + osc[i]), amplitude=1./len(osc)) + delay(100*us) + phaser.channel[ch].miqro.set_window( + start=0x000, iq=[[1., 0.]], order=0, tail=0) phaser.channel[ch].miqro.pulse( window=0x000, profiles=[1 for _ in range(len(osc))]) + delay(1*ms) @kernel def phaser_led_wave(self, phasers):