I am using phaser baseband and passing mixer_ena=1
, nco_ena=1
and mixer_gain=0
in device_db. I am not changing the default configuration syncsel_mixerab = 0b1001
. As per the docstrings in the phaser driver, the dac nco registers for frequency and phase should be updated after calling method set_nco_phase
.
Therefore, I would have expected the following experiment to produce an output signal:
class PhaserSetDacNcoPhase(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("phaser0")
self.setattr_device("aux_trigger")
@kernel
def run(self):
ch = self.phaser0.channel[0]
self.core.reset()
delay(1*ms)
self.phaser0.init()
delay(10*ms)
ch.set_att(0.0)
delay(10*ms)
# Keep phase accumulator of DUC NCO cleared
ch.set_duc_frequency_mu(0)
ch.set_duc_phase_mu(0)
ch.set_duc_cfg(clr=1, clr_once=0, select=0)
self.phaser0.duc_stb()
delay(1*ms)
# Keep phase accumulators of oscillator NCOs cleared
for i in range(5):
ch.oscillator[i].set_frequency_mu(0)
ch.oscillator[i].set_amplitude_phase_mu(0, 0, clr=1)
delay_mu(8)
delay(100*us)
# Set constant amplitude
ch.oscillator[0].set_amplitude_phase(0.1, 0.0, clr=1)
delay(100*us)
at_mu(self.phaser0.get_next_frame_mu())
self.aux_trigger.on()
ch.set_nco_frequency(1*MHz)
ch.set_nco_phase(0.0)
# self.phaser0.dac_sync()
delay(1*ms)
ch.oscillator[0].set_amplitude_phase_mu(0, 0, clr=1)
self.aux_trigger.off()
However, no output is generated unless the line with dac_sync is commented in. This is not expected.
If the experiment is modified such that dac_sync is called and then the dac nco frequency is later changed, followed by a call to set_nco_phase, the output frequency does not change. Has updating parameters via set_nco_phase of the phaser driver been tested?