refine/fixes

This commit is contained in:
Robert Jördens 2022-09-23 13:39:49 +00:00
parent 513f9f00f3
commit 740f3d220b
2 changed files with 12 additions and 10 deletions

View File

@ -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):

View File

@ -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):