From 31663556b8777d8d669148eaae79b9f26208fe41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20J=C3=B6rdens?= Date: Fri, 2 Sep 2022 09:32:02 +0000 Subject: [PATCH] phaser: add miqro mode --- artiq/gateware/eem.py | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/artiq/gateware/eem.py b/artiq/gateware/eem.py index 467f3cae2..eaa2f4fb2 100644 --- a/artiq/gateware/eem.py +++ b/artiq/gateware/eem.py @@ -709,20 +709,33 @@ class Phaser(_EEM): ) for pol in "pn"] @classmethod - def add_std(cls, target, eem, iostandard=default_iostandard): + def add_std(cls, target, eem, mode, iostandard=default_iostandard): cls.add_extension(target, eem, iostandard=iostandard) - phy = phaser.Phaser( - target.platform.request("phaser{}_ser_p".format(eem)), - target.platform.request("phaser{}_ser_n".format(eem))) - target.submodules += phy - target.rtio_channels.extend([ - rtio.Channel.from_phy(phy, ififo_depth=4), - rtio.Channel.from_phy(phy.ch0.frequency), - rtio.Channel.from_phy(phy.ch0.phase_amplitude), - rtio.Channel.from_phy(phy.ch1.frequency), - rtio.Channel.from_phy(phy.ch1.phase_amplitude), - ]) + if mode == "phaser": + phy = phaser.Phaser( + target.platform.request("phaser{}_ser_p".format(eem)), + target.platform.request("phaser{}_ser_n".format(eem))) + target.submodules += phy + target.rtio_channels.extend([ + rtio.Channel.from_phy(phy, ififo_depth=4), + rtio.Channel.from_phy(phy.ch0.frequency), + rtio.Channel.from_phy(phy.ch0.phase_amplitude), + rtio.Channel.from_phy(phy.ch1.frequency), + rtio.Channel.from_phy(phy.ch1.phase_amplitude), + ]) + elif mode == "miqro": + phy = phaser.Miqro( + target.platform.request("phaser{}_ser_p".format(eem)), + target.platform.request("phaser{}_ser_n".format(eem))) + target.submodules += phy + target.rtio_channels.extend([ + rtio.Channel.from_phy(phy, ififo_depth=4), + rtio.Channel.from_phy(phy.ch0), + rtio.Channel.from_phy(phy.ch1), + ]) + else: + raise ValueError("invalid mode", mode) class HVAmp(_EEM):