forked from M-Labs/artiq
refine/fixes
This commit is contained in:
parent
513f9f00f3
commit
740f3d220b
|
@ -383,7 +383,7 @@ class Phaser:
|
||||||
if channel.get_att_mu() != 0x5a:
|
if channel.get_att_mu() != 0x5a:
|
||||||
raise ValueError("attenuator test failed")
|
raise ValueError("attenuator test failed")
|
||||||
delay(.1*ms)
|
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)
|
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 rate: Interpolation rate change (1 to 1 << 12)
|
||||||
:param shift: Interpolator amplitude gain compensation in powers of 2 (0 to 63)
|
:param shift: Interpolator amplitude gain compensation in powers of 2 (0 to 63)
|
||||||
:param order: Interpolation order from 0 (corresponding to
|
:param order: Interpolation order from 0 (corresponding to
|
||||||
constant/zero-order-hold/1st order CIC interpolation) to 3 (corresponding
|
constant/rectangular window/zero-order-hold/1st order CIC interpolation)
|
||||||
to cubic/Parzen/4th 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
|
:param head: Update the interpolator settings and clear its state at the start
|
||||||
of the window. This also implies starting the envelope from zero.
|
of the window. This also implies starting the envelope from zero.
|
||||||
:param tail: Feed zeros into the interpolator after the window samples.
|
:param tail: Feed zeros into the interpolator after the window samples.
|
||||||
|
@ -1581,12 +1581,12 @@ class Miqro:
|
||||||
for profile in profiles:
|
for profile in profiles:
|
||||||
if profile > 0x1f:
|
if profile > 0x1f:
|
||||||
raise ValueError("profile out of bounds")
|
raise ValueError("profile out of bounds")
|
||||||
data[word] |= profile << idx
|
|
||||||
idx += 5
|
|
||||||
if idx > 32 - 5:
|
if idx > 32 - 5:
|
||||||
word += 1
|
word += 1
|
||||||
idx = 0
|
idx = 0
|
||||||
return word
|
data[word] |= profile << idx
|
||||||
|
idx += 5
|
||||||
|
return word + 1
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def pulse_mu(self, data):
|
def pulse_mu(self, data):
|
||||||
|
|
|
@ -587,16 +587,18 @@ class SinaraTester(EnvExperiment):
|
||||||
delay(1*ms)
|
delay(1*ms)
|
||||||
elif phaser.gw_rev == 2: # miqro
|
elif phaser.gw_rev == 2: # miqro
|
||||||
for ch in range(2):
|
for ch in range(2):
|
||||||
delay(1*ms)
|
|
||||||
phaser.channel[ch].set_att(6*dB)
|
phaser.channel[ch].set_att(6*dB)
|
||||||
phaser.channel[ch].miqro.set_window(
|
phaser.channel[ch].set_duc_cfg(select=0)
|
||||||
start=0x00, iq=[[1., 0.]], order=0, tail=0)
|
|
||||||
sign = 1. - 2.*ch
|
sign = 1. - 2.*ch
|
||||||
for i in range(len(osc)):
|
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))
|
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(
|
phaser.channel[ch].miqro.pulse(
|
||||||
window=0x000, profiles=[1 for _ in range(len(osc))])
|
window=0x000, profiles=[1 for _ in range(len(osc))])
|
||||||
|
delay(1*ms)
|
||||||
|
|
||||||
@kernel
|
@kernel
|
||||||
def phaser_led_wave(self, phasers):
|
def phaser_led_wave(self, phasers):
|
||||||
|
|
Loading…
Reference in New Issue