From d152506ecbf05f97e6978a1f3c4549a0d4086d13 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Thu, 19 Jul 2018 15:47:20 +0800 Subject: [PATCH] sayma: update fmcdio_vhdci_eem demo --- .../examples/sayma_master/repository/demo.py | 22 ++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/artiq/examples/sayma_master/repository/demo.py b/artiq/examples/sayma_master/repository/demo.py index 23add53c2..9b40f4b42 100644 --- a/artiq/examples/sayma_master/repository/demo.py +++ b/artiq/examples/sayma_master/repository/demo.py @@ -8,10 +8,15 @@ class Demo(EnvExperiment): self.setattr_device("fmcdio_dirctl") self.ttls = [self.get_device("ttl" + str(i)) for i in range(8)] + self.setattr_device("urukul0_cpld") + self.urukul_chs = [self.get_device("urukul0_ch" + str(i)) for i in range(4)] + self.setattr_device("zotino0") self.dirctl_word = ( - shiftreg_bits(2, dio_bank0_out_pins) | - shiftreg_bits(2, dio_bank1_out_pins)) + shiftreg_bits(1, urukul_out_pins) | + shiftreg_bits(0, urukul_aux_out_pins) | + shiftreg_bits(2, dio_bank0_out_pins | dio_bank1_out_pins) | + shiftreg_bits(3, zotino_out_pins)) @kernel def run(self): @@ -20,6 +25,17 @@ class Demo(EnvExperiment): self.fmcdio_dirctl.set(self.dirctl_word) delay(10*ms) + self.urukul0_cpld.init() + delay(10*ms) + + self.zotino0.init() + delay(1*ms) + for i in range(32): + self.zotino0.write_dac(i, i/4) + delay(1*ms) + while True: for ttl in self.ttls: - ttl.pulse(1*ms) + ttl.pulse(100*ms) + for urukul_ch in self.urukul_chs: + urukul_ch.sw.pulse(100*ms)