Hi everyone,
I am trying to get the NCO of the phaser up and running but I am not having much luck. The output does not shift in frequency as expected, no matter what I set in set_nco_freqeuncy() and/or set_nco_phse(). An example is attached.
Am I missing something obvious here?
Is this feature already tested or should I take a look at the register level?
Best regards,
Fabian
PS: Why is it not allowed to attach python files? So here is the code:
`from artiq.experiment import *
from artiq.coredevice.phaser import *
import numpy as np
import random
class Phaser(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("phaser0")
def run(self):
self.do()
@kernel
def do(self):
self.core.break_realtime()
f = self.phaser0
f.init(debug=True)
delay(1*ms)
# Initialize first PLL with default values (3000 MHz)
f.channel[0].trf_write(0x60100149)
f.channel[0].trf_write(0x88A00F0A)
f.channel[0].trf_write(0x0000000B)
f.channel[0].trf_write(0x4A00800C)
f.channel[0].trf_write(0x0D03A28D)
f.channel[0].trf_write(0x9090100E)
f.channel[0].trf_write(0xD041100F)
delay(1*ms)
# Initialize Oscillator
f.channel[0].set_att(0*dB)
f.channel[0].set_duc_frequency(200.0*MHz)
f.channel[0].set_duc_phase(0.0)
f.channel[0].set_duc_cfg(select=0, clr=0)
f.channel[0].oscillator[0].set_frequency(0.0*MHz)
f.channel[0].oscillator[0].set_amplitude_phase(0.99, phase=.25, clr=0)
f.duc_stb()
delay(1*ms)
# Initialize the NCO
f.channel[0].set_nco_frequency(100*MHz)
f.channel[0].set_nco_phase(0.0)
delay(1*ms)
# Wait for everything to finish
self.core.wait_until_mu(now_mu())
`