Hello Clayton,
I am having a very similar problem as you where I am trying to get the same phase delay between the two phaser channels and make it deterministic. I've tried different things, specifically what you listed including:
- introducing dac_sync() but it didn't help
- changing the phase accumulator value to 0 or 1 in set_amplitude_phase()
- no phaser init is done
but nothing seems to work. I was wondering what your solution was?
Here is an oscillioscope trace of the two signals which are offset from each other. 
When I disable the phaser channels and renable them, the two signals on the scope are shifted differently. Do you have any suggestions for what to try?
For reference, here the is the python script I am running:
`
from artiq.experiment import *
import numpy as np
from set_center_remote import *
class PhaserTest(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("phaser0")
self.setattr_argument("phaser_attenuation", NumberValue(0, ndecimals=1, step=1))
self.setattr_argument("center_freq", NumberValue(300, ndecimals=0, step=100))
self.setattr_argument("DUC_freq", NumberValue(100, ndecimals=1, min=-200, max=200, step=10))
self.setattr_argument("enable_dac", BooleanValue(False))
self.setattr_argument("enable_phaser0_rf", BooleanValue(False))
self.setattr_argument("enable_phaser1_rf", BooleanValue(False))
self.setattr_argument("rf0_amplitude", NumberValue(0.1, ndecimals=3, min=0, max=1, step=0.1))
self.setattr_argument("rf1_amplitude", NumberValue(0.1, ndecimals=3, min=0, max=1, step=0.1))
self.setattr_argument("rf0_phase", NumberValue(0, ndecimals=2, min=-1, max=1, step=.25))
self.setattr_argument("rf1_phase", NumberValue(0, ndecimals=2, min=-1, max=1, step=.25))
def prepare(self):
print('Preparing PhaserTest experiment...')
@kernel
def run(self):
self.core.reset()
# self.phaser0.init()
# self.initializer.set_center_frequency()
if self.enable_dac:
self.phaser0.set_cfg(dac_txena=1)
else:
self.phaser0.set_cfg(dac_txena=0)
if self.enable_phaser0_rf:
self.enable_phaser_rf(channel=0, amplitude=self.rf0_amplitude, phase=self.rf0_phase)
else:
self.phaser0.channel[0].en_trf_out(rf=0, lo=0)
if self.enable_phaser1_rf:
self.enable_phaser_rf(channel=1, amplitude=self.rf1_amplitude, phase=self.rf1_phase)
else:
self.phaser0.channel[1].en_trf_out(rf=0, lo=0)
at_mu(self.phaser0.get_next_frame_mu())
with parallel:
self.phaser0.channel[0].oscillator[0].set_amplitude_phase(amplitude=self.rf0_amplitude,
phase=self.rf0_phase)
self.phaser0.channel[1].oscillator[0].set_amplitude_phase(amplitude=self.rf1_amplitude,
phase=self.rf1_phase)
self.phaser0.dac_sync()
@kernel
def enable_phaser_rf(self, channel, amplitude, phase):
self.phaser0.channel[channel].set_att(self.phaser_attenuation * dB)
self.phaser0.channel[channel].set_duc_cfg() # set the digital upconverter
self.phaser0.channel[channel].set_duc_frequency(self.DUC_freq * MHz)
self.phaser0.duc_stb()
self.phaser0.channel[channel].en_trf_out(rf=1, lo=0)
self.core.break_realtime()
# self.phaser0.channel[channel].oscillator[1].set_amplitude_phase(amplitude=0.0, phase=0.0, clr=1)`