I want to acquire data from the Sampler and at the same time control the Urukul. This very simple script throws an RTIOUnderflow error. Is accessing those 2 cards in parallel not supported?
from artiq.experiment import *
import numpy as np
class parallelitytest(EnvExperiment):
kernel_invariants = {"wait", "freq"}
def build(self):
self.setattr_device("core")
self.setattr_device("sampler0")
self.setattr_device("urukul0_ch1")
self.setattr_device("urukul0_cpld")
def prepare(self):
self.wait = 20 * ms
self.freq = 10 * MHz
self.data = np.full((8),0,dtype=np.int32)
@kernel
def run(self):
self.core.reset()
self.core.break_realtime()
delay(100*ms)
self.sampler0.init()
delay(100*ms)
self.urukul0_cpld.init()
delay(100*ms)
self.urukul0_ch1.init()
delay(100*ms)
self.urukul0_ch1.sw.on()
delay(100*ms)
with parallel:
self.sampler0.sample_mu(self.data)
self.urukul0_ch1.set(self.freq, 0.0)
delay(self.wait)