forked from M-Labs/artiq
1
0
Fork 0

tester: urukul single-eem mode

This commit is contained in:
Robert Jördens 2019-06-13 12:19:24 +00:00
parent 591de0e579
commit 636b4cae5a
1 changed files with 12 additions and 6 deletions

View File

@ -85,6 +85,7 @@ class KasliTester(EnvExperiment):
module, cls = desc["module"], desc["class"] module, cls = desc["module"], desc["class"]
if ((module, cls) == ("artiq.coredevice.ad9910", "AD9910") if ((module, cls) == ("artiq.coredevice.ad9910", "AD9910")
or (module, cls) == ("artiq.coredevice.ad9912", "AD9912")): or (module, cls) == ("artiq.coredevice.ad9912", "AD9912")):
if "sw_device" in desc["arguments"]:
sw_device = desc["arguments"]["sw_device"] sw_device = desc["arguments"]["sw_device"]
del self.ttl_outs[sw_device] del self.ttl_outs[sw_device]
elif (module, cls) == ("artiq.coredevice.urukul", "CPLD"): elif (module, cls) == ("artiq.coredevice.urukul", "CPLD"):
@ -103,7 +104,7 @@ class KasliTester(EnvExperiment):
self.leds = sorted(self.leds.items(), key=lambda x: x[1].channel) self.leds = sorted(self.leds.items(), key=lambda x: x[1].channel)
self.ttl_outs = sorted(self.ttl_outs.items(), key=lambda x: x[1].channel) self.ttl_outs = sorted(self.ttl_outs.items(), key=lambda x: x[1].channel)
self.ttl_ins = sorted(self.ttl_ins.items(), key=lambda x: x[1].channel) self.ttl_ins = sorted(self.ttl_ins.items(), key=lambda x: x[1].channel)
self.urukuls = sorted(self.urukuls.items(), key=lambda x: x[1].sw.channel) self.urukuls = sorted(self.urukuls.items(), key=lambda x: (x[1].cpld.bus.channel, x[1].chip_select))
self.samplers = sorted(self.samplers.items(), key=lambda x: x[1].cnv.channel) self.samplers = sorted(self.samplers.items(), key=lambda x: x[1].cnv.channel)
self.zotinos = sorted(self.zotinos.items(), key=lambda x: x[1].bus.channel) self.zotinos = sorted(self.zotinos.items(), key=lambda x: x[1].bus.channel)
self.grabbers = sorted(self.grabbers.items(), key=lambda x: x[1].channel_base) self.grabbers = sorted(self.grabbers.items(), key=lambda x: x[1].channel_base)
@ -204,11 +205,14 @@ class KasliTester(EnvExperiment):
self.core.break_realtime() self.core.break_realtime()
channel.init() channel.init()
channel.set(frequency*MHz) channel.set(frequency*MHz)
channel.sw.on() channel.cfg_sw(1)
channel.set_att(6.) channel.set_att(6.)
@kernel @kernel
def rf_switch_wave(self, channels): def rf_switch_wave(self, channels):
self.core.break_realtime()
for channel in channels:
channel.cfg_sw(0)
while not is_enter_pressed(): while not is_enter_pressed():
self.core.break_realtime() self.core.break_realtime()
# do not fill the FIFOs too much to avoid long response times # do not fill the FIFOs too much to avoid long response times
@ -256,8 +260,10 @@ class KasliTester(EnvExperiment):
print("Press ENTER when done.") print("Press ENTER when done.")
input() input()
sw = [channel_dev.sw for channel_name, channel_dev in self.urukuls if hasattr(channel_dev, "sw")]
if sw:
print("Testing RF switch control. Press ENTER when done.") print("Testing RF switch control. Press ENTER when done.")
self.rf_switch_wave([channel_dev.sw for channel_name, channel_dev in self.urukuls]) self.rf_switch_wave(sw)
@kernel @kernel
def get_sampler_voltages(self, sampler, cb): def get_sampler_voltages(self, sampler, cb):