diff --git a/artiq/coredevice/ad9910.py b/artiq/coredevice/ad9910.py index 0b653c111..041a13e31 100644 --- a/artiq/coredevice/ad9910.py +++ b/artiq/coredevice/ad9910.py @@ -437,18 +437,20 @@ class AD9910: This method does not pulse ``IO_UPDATE``. :param asf_profile_enable: Enable amplitude scale from single tone profiles. - :param drg_destination: Digital ramp destination. + :param drg_destination: Digital ramp destination. Determines the parameter to modulate: + * 0: Frequency + * 1: Phase + * 2: Amplitude :param drg_enable: Digital ramp enable. :param drg_nodwell_high: Digital ramp no-dwell high. :param drg_nodwell_low: Digital ramp no-dwell low. :param effective_ftw: Read effective FTW. :param sync_validation_disable: Disable the SYNC_SMP_ERR pin indicating (active high) detection of a synchronization pulse sampling error. - :param matched_latency_enable: Simultaneous application of amplitude, - phase, and frequency changes to the DDS arrive at the output - - * matched_latency_enable = 0: in the order listed - * matched_latency_enable = 1: simultaneously. + :param matched_latency_enable: Control the application timing of amplitude, + phase, and frequency changes at the DDS output: + * 0: Changes are applied in the order listed. + * 1: Changes are applied simultaneously. """ self.write32(_AD9910_REG_CFR2, (asf_profile_enable << 24) | diff --git a/artiq/test/coredevice/test_ad9910_waveform.py b/artiq/test/coredevice/test_ad9910_waveform.py index a4d82dbe4..2813beadb 100644 --- a/artiq/test/coredevice/test_ad9910_waveform.py +++ b/artiq/test/coredevice/test_ad9910_waveform.py @@ -11,39 +11,56 @@ from artiq.coredevice.urukul import STA_PROTO_REV_8, STA_PROTO_REV_9 from artiq.experiment import * from artiq.test.hardware_testbench import ExperimentCase -############################################################################### +################################################################################### ## NOTE: These test are intended to create waveforms from AD9910 Urukul boards -## (all protocol revisions, see tests below) used with an oscilloscope. +## (all protocol revisions, see tests below) used with a dual-channel oscilloscope. +## ## Set your oscilloscope to: ## ## Time division: 2 ns ## Voltage division: 500 mV ## -## These settings work with a nominal 100 MHz waveform. +## The settings below work with a nominal 100 MHz waveform. Set trigger to DDS1. ## You will need to play with your trigger level setting for some of the tests. ## ## If you change FREQ (see below) to something else, adjust your oscilloscope ## settings to accomodate. -############################################################################### +################################################################################### FREQ = 100 * MHz AMP = 1.0 ATT = 1.0 # Set to desired devices -CPLD = "urukul0_cpld" -DDS1 = "urukul0_ch0" -DDS2 = "urukul0_ch3" +CPLD = "urukul1_cpld" +DDS1 = "urukul1_ch0" +DDS2 = "urukul1_ch3" class AD9910WaveformExp(EnvExperiment): - def build(self, runner, io_update_device=True): + def build( + self, + runner, + io_update_device=True, + multiple_profiles=True, + osk_manual=True, + drg_destination=0x0, + use_dds2=False, + with_hold=False, + nodwell=0, + ): self.setattr_device("core") self.cpld = self.get_device(CPLD) self.dds1 = self.get_device(DDS1) self.dds2 = self.get_device(DDS2) self.runner = runner self.io_update_device = io_update_device + self.multiple_profiles = multiple_profiles + self.osk_manual = osk_manual + self.drg_destination = drg_destination + self.use_dds2 = use_dds2 + self.with_hold = with_hold + self.nodwell = nodwell def run(self): getattr(self, self.runner)() @@ -106,81 +123,6 @@ class AD9910WaveformExp(EnvExperiment): self.core.wait_until_mu(now_mu()) - @kernel - def toggle_profile(self): - self.core.reset() - self.cpld.init() - - if not self.io_update_device: - # Set MASK_NU to trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(True) - self.dds2.cfg_mask_nu(True) - - self.dds1.init() - self.dds2.init() - - delay(10 * ms) - - ## SET SINGLE-TONE PROFILES - # Set Profile 7 (default) - self.dds1.set(FREQ, amplitude=AMP) - self.dds2.set(FREQ, amplitude=AMP) - # Set Profile 6 (default) - self.dds1.set(FREQ + 25 * MHz, amplitude=AMP, profile=6) - self.dds2.set(FREQ + 25 * MHz, amplitude=AMP, profile=6) - # Set Profile 5 (default) - self.dds1.set(FREQ + 50 * MHz, amplitude=AMP, profile=5) - self.dds2.set(FREQ + 50 * MHz, amplitude=AMP, profile=5) - # Set Profile 4 (default) - self.dds1.set(FREQ + 75 * MHz, amplitude=AMP, profile=4) - self.dds2.set(FREQ + 75 * MHz, amplitude=AMP, profile=4) - - delay(1 * s) # slack - - # Set Profile 3 (default) - self.dds1.set(FREQ + FREQ, amplitude=AMP, profile=3) - self.dds2.set(FREQ + FREQ, amplitude=AMP, profile=3) - # Set Profile 2 (default) - self.dds1.set(FREQ + 125 * MHz, amplitude=AMP, profile=2) - self.dds2.set(FREQ + 125 * MHz, amplitude=AMP, profile=2) - # Set Profile 1 (default) - self.dds1.set(FREQ + 150 * MHz, amplitude=AMP, profile=1) - self.dds2.set(FREQ + 150 * MHz, amplitude=AMP, profile=1) - # Set Profile 0 (default) - self.dds1.set(FREQ + 175 * MHz, amplitude=AMP, profile=0) - self.dds2.set(FREQ + 175 * MHz, amplitude=AMP, profile=0) - - # Switch on waveforms -- Profile 7 (default) - self.dds1.cfg_sw(True) - self.dds2.cfg_sw(True) - self.dds1.set_att(ATT) - self.dds2.set_att(ATT) - delay(2 * s) - # Switch off waveforms - self.dds1.cfg_sw(False) - self.dds2.cfg_sw(False) - - # Iterate over Profiles 6 to 0 - for i in range(6, -1, -1): - # Switch channels 0 and 3 to Profile i - self.cpld.set_profile(0, i) - # This is the main different between proto_rev's, - # one sets them all - # self.cpld.set_profile(3, i) - self.dds1.cfg_sw(True) - self.dds2.cfg_sw(True) - delay(2 * s) - # Switch off waveforms - self.dds1.cfg_sw(False) - self.dds2.cfg_sw(False) - - if not self.io_update_device: - # Unset MASK_NU to un-trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(False) - self.dds2.cfg_mask_nu(False) - - self.core.wait_until_mu(now_mu()) - @kernel def toggle_profiles(self): self.core.reset() @@ -199,33 +141,23 @@ class AD9910WaveformExp(EnvExperiment): delay(10 * ms) ## SET SINGLE-TONE PROFILES - # Set Profile 7 (default) - self.dds1.set(FREQ, amplitude=AMP) - self.dds2.set(FREQ, amplitude=AMP) - # Set Profile 6 (default) - self.dds1.set(FREQ + 25 * MHz, amplitude=AMP, profile=6) - self.dds2.set(FREQ + 25 * MHz, amplitude=AMP, profile=6) - # Set Profile 5 (default) - self.dds1.set(FREQ + 50 * MHz, amplitude=AMP, profile=5) - self.dds2.set(FREQ + 50 * MHz, amplitude=AMP, profile=5) - # Set Profile 4 (default) - self.dds1.set(FREQ + 75 * MHz, amplitude=AMP, profile=4) - self.dds2.set(FREQ + 75 * MHz, amplitude=AMP, profile=4) - - delay(1 * s) # slack - - # Set Profile 3 (default) - self.dds1.set(FREQ + FREQ, amplitude=AMP, profile=3) - self.dds2.set(FREQ + FREQ, amplitude=AMP, profile=3) - # Set Profile 2 (default) - self.dds1.set(FREQ + 125 * MHz, amplitude=AMP, profile=2) - self.dds2.set(FREQ + 125 * MHz, amplitude=AMP, profile=2) - # Set Profile 1 (default) - self.dds1.set(FREQ + 150 * MHz, amplitude=AMP, profile=1) - self.dds2.set(FREQ + 150 * MHz, amplitude=AMP, profile=1) - # Set Profile 0 (default) - self.dds1.set(FREQ + 175 * MHz, amplitude=AMP, profile=0) - self.dds2.set(FREQ + 175 * MHz, amplitude=AMP, profile=0) + # Set profiles from 7 to 0 + frequencies = [ + 0.0, + 25 * MHz, + 50 * MHz, + 75 * MHz, + 100 * MHz, + 125 * MHz, + 150 * MHz, + 175 * MHz, + ] + for i in range(6, -1, -1): + freq_offset = frequencies[i] + profile = 7 - i + self.dds1.set(FREQ + freq_offset, amplitude=AMP, profile=profile) + self.dds2.set(FREQ + freq_offset, amplitude=AMP, profile=profile) + delay(0.5 * s) # slack # Switch on waveforms -- Profile 7 (default) self.dds1.cfg_sw(True) @@ -239,9 +171,11 @@ class AD9910WaveformExp(EnvExperiment): # Iterate over Profiles 6 to 0 for i in range(6, -1, -1): - # Switch channels 0 and 3 to Profile i + # Switch channels to Profile i self.cpld.set_profile(0, i) - self.cpld.set_profile(3, i) + if self.multiple_profiles: + self.cpld.set_profile(3, i) + self.dds1.cfg_sw(True) self.dds2.cfg_sw(True) delay(2 * s) @@ -275,9 +209,13 @@ class AD9910WaveformExp(EnvExperiment): delay(10 * ms) self.dds1.set(FREQ, amplitude=AMP) - self.dds1.set_cfr1(manual_osk_external=1, osk_enable=1) - self.dds1.cpld.io_update.pulse(1 * ms) - self.dds1.set_asf(0x3FFF) + + if self.osk_manual: + self.dds1.set_cfr1(manual_osk_external=1, osk_enable=1) + else: + self.dds1.write32(_AD9910_REG_ASF, 0xFFFF << 16 | 0x3FFF << 2 | 0b11) + self.dds1.set_cfr1(osk_enable=1, select_auto_osk=1) + self.dds1.cpld.io_update.pulse(1 * ms) # Switch on waveform, then set attenuation @@ -302,197 +240,109 @@ class AD9910WaveformExp(EnvExperiment): self.core.wait_until_mu(now_mu()) @kernel - def osk_auto(self): + def drg(self): self.core.reset() self.cpld.init() + # Set ATT_EN self.dds1.cfg_att_en(True) + if self.use_dds2: + self.dds2.cfg_att_en(True) + if not self.io_update_device: # Set MASK_NU to trigger CFG.IO_UPDATE self.dds1.cfg_mask_nu(True) + if self.use_dds2: + self.dds2.cfg_mask_nu(True) self.dds1.init() + if self.use_dds2: + self.dds2.init() delay(10 * ms) + # Set initial frequency and amplitude self.dds1.set(FREQ, amplitude=AMP) - self.dds1.set_cfr1(osk_enable=1, select_auto_osk=1) - self.dds1.cpld.io_update.pulse(1 * ms) - self.dds1.write32(_AD9910_REG_ASF, 0xFFFF << 16 | 0x3FFF << 2 | 0b11) - self.dds1.cpld.io_update.pulse(1 * ms) + if self.use_dds2: + self.dds2.set(FREQ, amplitude=AMP) - # Switch on waveform, then set attenuation - self.dds1.cfg_sw(True) - self.dds1.set_att(ATT) - for _ in range(5): - self.dds1.cfg_osk(True) - delay(1 * s) - self.dds1.cfg_osk(False) - delay(1 * s) - # Switch off waveform - self.dds1.cfg_sw(False) + # Configure DRG + if self.drg_destination == 0x0: # Frequency + ramp_limit_high = self.dds1.frequency_to_ftw(FREQ + 30 * MHz) + ramp_limit_low = self.dds1.frequency_to_ftw(FREQ - 30 * MHz) + ramp_rate = 0x004F004F + ramp_step = 0xF0 + pulse_duration = 1 * s if not self.with_hold else 0.25 * s + elif self.drg_destination == 0x1: # Phase + ramp_limit_high = 0xFFFFFFFF + ramp_limit_low = 0 + ramp_rate = 0xC350C350 + ramp_step = 0xD1B71 + pulse_duration = 2 * s if not self.with_hold else 0.25 * s + else: # Amplitude + ramp_limit_high = 0xFFFFFFFF + ramp_limit_low = 0 + ramp_rate = 0xC350C350 + ramp_step = 0xD1B71 + pulse_duration = 2 * s if not self.with_hold else 0.4 * s - if not self.io_update_device: - # Unset MASK_NU to un-trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(False) + self.dds1.write64(_AD9910_REG_RAMP_LIMIT, ramp_limit_high, ramp_limit_low) + self.dds1.write32(_AD9910_REG_RAMP_RATE, ramp_rate) + self.dds1.write64(_AD9910_REG_RAMP_STEP, ramp_step, ramp_step) - # UnSet ATT_EN - self.dds1.cfg_att_en(False) - - self.core.wait_until_mu(now_mu()) - - @kernel - def drg_normal(self): - self.core.reset() - self.cpld.init() - # Set ATT_EN - self.dds1.cfg_att_en(True) - if not self.io_update_device: - # Set MASK_NU to trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(True) - - self.dds1.init() - - delay(10 * ms) - - self.dds1.frequency_to_ftw(FREQ) - # cfr2 21:20 destination, 19 drg enable, no-dwell high, no-dwell low, - self.dds1.set(FREQ, amplitude=AMP) - self.dds1.set_cfr2(drg_enable=1) - self.dds1.cpld.io_update.pulse(1 * ms) - self.dds1.write64( - _AD9910_REG_RAMP_LIMIT, - self.dds1.frequency_to_ftw(FREQ + 30 * MHz), - self.dds1.frequency_to_ftw(FREQ - 30 * MHz), + self.dds1.set_cfr2( + drg_enable=1, + drg_destination=self.drg_destination, + drg_nodwell_high=self.nodwell, + drg_nodwell_low=self.nodwell, ) - # The larger the values, the slower the update happens - self.dds1.write32(_AD9910_REG_RAMP_RATE, 0x004F004F) - # The smaller the value it is, the smaller the frequency step - self.dds1.write64(_AD9910_REG_RAMP_STEP, 0xF0, 0xF0) self.dds1.cpld.io_update.pulse(1 * ms) - # Switch on waveform, then set attenuation + # Enable waveform and set attenuation self.dds1.cfg_sw(True) self.dds1.set_att(ATT) - for _ in range(10): - self.dds1.cfg_drctl(True) - delay(0.5 * s) - self.dds1.cfg_drctl(False) - delay(0.5 * s) - # Switch off waveform + if self.use_dds2: + self.dds2.cfg_sw(True) + self.dds2.set_att(ATT) + + if not self.nodwell: + for _ in range(5): + if self.with_hold: + self.dds1.cfg_drctl(True) + delay(pulse_duration) + self.dds1.cfg_drhold(True) + delay(pulse_duration) + self.dds1.cfg_drhold(False) + delay(pulse_duration) + self.dds1.cfg_drctl(False) + delay(pulse_duration) + self.dds1.cfg_drhold(True) + delay(pulse_duration) + self.dds1.cfg_drhold(False) + delay(pulse_duration) + else: + self.dds1.cfg_drctl(True) + delay(pulse_duration) + self.dds1.cfg_drctl(False) + delay(pulse_duration) + else: + delay(10 * s) + + # Disable waveform self.dds1.cfg_sw(False) + if self.use_dds2: + self.dds2.cfg_sw(False) if not self.io_update_device: # Unset MASK_NU to un-trigger CFG.IO_UPDATE self.dds1.cfg_mask_nu(False) + if self.use_dds2: + self.dds2.cfg_mask_nu(False) - # UnSet ATT_EN - self.dds1.cfg_att_en(False) - - self.core.wait_until_mu(now_mu()) - - @kernel - def drg_normal_with_hold(self): - self.core.reset() - self.cpld.init() - # Set ATT_EN - self.dds1.cfg_att_en(True) - if not self.io_update_device: - # Set MASK_NU to trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(True) - - self.dds1.init() - - delay(10 * ms) - - self.dds1.frequency_to_ftw(FREQ) - # cfr2 21:20 destination, 19 drg enable, no-dwell high, no-dwell low, - self.dds1.set(FREQ, amplitude=AMP) - self.dds1.set_cfr2(drg_enable=1) - self.dds1.cpld.io_update.pulse(1 * ms) - self.dds1.write64( - _AD9910_REG_RAMP_LIMIT, - self.dds1.frequency_to_ftw(FREQ + 30 * MHz), - self.dds1.frequency_to_ftw(FREQ - 30 * MHz), - ) - # The larger the values, the slower the update happens - self.dds1.write32(_AD9910_REG_RAMP_RATE, 0x004F004F) - # The smaller the value it is, the smaller the frequency step - self.dds1.write64(_AD9910_REG_RAMP_STEP, 0xF0, 0xF0) - self.dds1.cpld.io_update.pulse(1 * ms) - - # Switch on waveform, then set attenuation - self.dds1.cfg_sw(True) - self.dds1.set_att(ATT) - for _ in range(10): - self.dds1.cfg_drctl(True) - delay(0.25 * s) - self.dds1.cfg_drhold(True) - delay(0.25) - self.dds1.cfg_drhold(False) - delay(0.25) - self.dds1.cfg_drctl(False) - delay(0.25) - self.dds1.cfg_drhold(True) - delay(0.25) - self.dds1.cfg_drhold(False) - delay(0.25) - # Switch off waveform - self.dds1.cfg_sw(False) - - if not self.io_update_device: - # Unset MASK_NU to un-trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(False) - - # UnSet ATT_EN - self.dds1.cfg_att_en(False) - - self.core.wait_until_mu(now_mu()) - - @kernel - def drg_nodwell(self): - self.core.reset() - self.cpld.init() - # Set ATT_EN - self.dds1.cfg_att_en(True) - if not self.io_update_device: - # Set MASK_NU to trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(True) - - self.dds1.init() - - delay(10 * ms) - - self.dds1.frequency_to_ftw(FREQ) - # cfr2 21:20 destination, 19 drg enable, no-dwell high, no-dwell low, - self.dds1.set(FREQ, amplitude=AMP) - self.dds1.set_cfr2(drg_enable=1, drg_nodwell_high=1, drg_nodwell_low=1) - self.dds1.cpld.io_update.pulse(1 * ms) - self.dds1.write64( - _AD9910_REG_RAMP_LIMIT, - self.dds1.frequency_to_ftw(FREQ + 30 * MHz), - self.dds1.frequency_to_ftw(FREQ - 30 * MHz), - ) - # The larger the values, the slower the update happens - self.dds1.write32(_AD9910_REG_RAMP_RATE, 0x004F004F) - # The smaller the value it is, the smaller the frequency step - self.dds1.write64(_AD9910_REG_RAMP_STEP, 0xF0, 0xF0) - self.dds1.cpld.io_update.pulse(1 * ms) - - # Switch on waveform, then set attenuation - self.dds1.cfg_sw(True) - self.dds1.set_att(ATT) - - delay(10 * s) - # Switch off waveform - self.dds1.cfg_sw(False) - - if not self.io_update_device: - # Unset MASK_NU to un-trigger CFG.IO_UPDATE - self.dds1.cfg_mask_nu(False) - - # UnSet ATT_EN + # Unset ATT_EN self.dds1.cfg_att_en(False) + if self.use_dds2: + self.dds2.cfg_att_en(False) self.core.wait_until_mu(now_mu()) @@ -614,12 +464,17 @@ class AD9910Test(ExperimentCase): self.execute(AD9910WaveformExp, "single_tone", io_update_device=False) @io_update_device(True, proto_rev=STA_PROTO_REV_8) - def test_toggle_profile(self): - self.execute(AD9910WaveformExp, "toggle_profile") + def test_toggle_profiles(self): + self.execute(AD9910WaveformExp, "toggle_profiles", multiple_profiles=False) @io_update_device(False, proto_rev=STA_PROTO_REV_8) - def test_toggle_profile_no_io_update_device(self): - self.execute(AD9910WaveformExp, "toggle_profile", io_update_device=False) + def test_toggle_profiles_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "toggle_profiles", + io_update_device=False, + multiple_profiles=False, + ) @io_update_device(True, proto_rev=STA_PROTO_REV_9) def test_toggle_profiles(self): @@ -630,44 +485,134 @@ class AD9910Test(ExperimentCase): self.execute(AD9910WaveformExp, "toggle_profiles", io_update_device=False) @io_update_device(True, proto_rev=STA_PROTO_REV_9) - def test_osk(self): + def test_osk_manual(self): self.execute(AD9910WaveformExp, "osk") @io_update_device(False, proto_rev=STA_PROTO_REV_9) - def test_osk_no_io_update_device(self): + def test_osk_manual_no_io_update_device(self): self.execute(AD9910WaveformExp, "osk", io_update_device=False) @io_update_device(True, proto_rev=STA_PROTO_REV_9) def test_osk_auto(self): - self.execute(AD9910WaveformExp, "osk_auto") + self.execute(AD9910WaveformExp, "osk", osk_manual=False) @io_update_device(False, proto_rev=STA_PROTO_REV_9) def test_osk_auto_no_io_update_device(self): - self.execute(AD9910WaveformExp, "osk_auto", io_update_device=False) + self.execute(AD9910WaveformExp, "osk", io_update_device=False, osk_manual=False) @io_update_device(True, proto_rev=STA_PROTO_REV_9) - def test_drg_normal(self): - self.execute(AD9910WaveformExp, "drg_normal") - - @io_update_device(False, proto_rev=STA_PROTO_REV_9) - def test_drg_normal_no_io_update_device(self): - self.execute(AD9910WaveformExp, "drg_normal", io_update_device=False) + def test_drg_normal_frequency(self): + self.execute(AD9910WaveformExp, "drg") @io_update_device(True, proto_rev=STA_PROTO_REV_9) - def test_drg_normal_with_hold(self): - self.execute(AD9910WaveformExp, "drg_normal_with_hold") - - @io_update_device(False, proto_rev=STA_PROTO_REV_9) - def test_drg_normal_with_hold_no_io_update_device(self): - self.execute(AD9910WaveformExp, "drg_normal_with_hold", io_update_device=False) + def test_drg_normal_phase(self): + self.execute(AD9910WaveformExp, "drg", drg_destination=0x1, use_dds2=True) @io_update_device(True, proto_rev=STA_PROTO_REV_9) - def test_drg_nodwell(self): - self.execute(AD9910WaveformExp, "drg_nodwell") + def test_drg_normal_amplitude(self): + self.execute(AD9910WaveformExp, "drg", drg_destination=0x2) @io_update_device(False, proto_rev=STA_PROTO_REV_9) - def test_drg_nodwell_no_io_update_device(self): - self.execute(AD9910WaveformExp, "drg_nodwell", io_update_device=False) + def test_drg_normal_frequency_no_io_update_device(self): + self.execute(AD9910WaveformExp, "drg", io_update_device=False) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_phase_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "drg", + io_update_device=False, + drg_destination=0x1, + use_dds2=True, + ) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_amplitude_no_io_update_device(self): + self.execute( + AD9910WaveformExp, "drg", io_update_device=False, drg_destination=0x2 + ) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_frequency(self): + self.execute(AD9910WaveformExp, "drg", with_hold=True) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_phase(self): + self.execute( + AD9910WaveformExp, + "drg", + drg_destination=0x1, + use_dds2=True, + with_hold=True, + ) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_amplitude(self): + self.execute(AD9910WaveformExp, "drg", drg_destination=0x2, with_hold=True) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_frequency_no_io_update_device(self): + self.execute(AD9910WaveformExp, "drg", io_update_device=False, with_hold=True) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_phase_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "drg", + io_update_device=False, + drg_destination=0x1, + use_dds2=True, + with_hold=True, + ) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_normal_with_hold_amplitude_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "drg", + io_update_device=False, + drg_destination=0x2, + with_hold=True, + ) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_frequency(self): + self.execute(AD9910WaveformExp, "drg", nodwell=1) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_phase(self): + self.execute( + AD9910WaveformExp, "drg", drg_destination=0x1, use_dds2=True, nodwell=1 + ) + + @io_update_device(True, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_amplitude(self): + self.execute(AD9910WaveformExp, "drg", drg_destination=0x2, nodwell=1) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_frequency_no_io_update_device(self): + self.execute(AD9910WaveformExp, "drg", io_update_device=False, nodwell=1) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_phase_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "drg", + io_update_device=False, + drg_destination=0x1, + use_dds2=True, + nodwell=1, + ) + + @io_update_device(False, proto_rev=STA_PROTO_REV_9) + def test_drg_nodwell_amplitude_no_io_update_device(self): + self.execute( + AD9910WaveformExp, + "drg", + io_update_device=False, + drg_destination=0x2, + nodwell=1, + ) @io_update_device(True, proto_rev=STA_PROTO_REV_9) def test_att_single_tone(self):