diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c8eacabe9..87232bab3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -49,8 +49,9 @@ jobs: bash ./.github/scripts/install_pydeps.sh sudo apt install -y python3-tk - - name: Test + - name: Test without optional dependencies run: | + pip uninstall -y paramiko pytest -vs --cov=adi --scan-verbose --emu --junitxml="results.xml" -k 'not prod' - name: Report coverage @@ -65,12 +66,6 @@ jobs: with: files: results.xml - - name: Test without optional dependencies - run: | - pip uninstall -y paramiko - pytest -vs --scan-verbose --emu --junitxml="results.xml" -k 'not prod' - - Lint: runs-on: ubuntu-latest strategy: diff --git a/adi/ad937x.py b/adi/ad937x.py index f26d186da..d529b4a78 100644 --- a/adi/ad937x.py +++ b/adi/ad937x.py @@ -170,44 +170,68 @@ def tx_rf_bandwidth(self): @property def rx_enable_dec8(self): """rx_enable_dec8: Enable x8 decimation filter in RX path""" - avail = self._get_iio_attr_str( - "voltage0_i", "sampling_frequency_available", False, self._rxadc - ) - avail = avail.strip().split(" ") - val = self._get_iio_attr_str( - "voltage0_i", "sampling_frequency", False, self._rxadc - ) - return val == avail[1] + try: + avail = self._get_iio_attr_str( + "voltage0_i", "sampling_frequency_available", False, self._rxadc + ) + except KeyError: + return False + else: + avail = avail.strip().split(" ") + val = self._get_iio_attr_str( + "voltage0_i", "sampling_frequency", False, self._rxadc + ) + return val == avail[1] @rx_enable_dec8.setter def rx_enable_dec8(self, value): - avail = self._get_iio_attr_str( - "voltage0_i", "sampling_frequency_available", False, self._rxadc - ) - avail = sorted(avail.strip().split(" ")) - val = int(avail[1] if value else avail[0]) - self._set_iio_attr("voltage0_i", "sampling_frequency", False, val, self._rxadc) + try: + avail = self._get_iio_attr_str( + "voltage0_i", "sampling_frequency_available", False, self._rxadc + ) + except KeyError: + if value: + print( + "x8 decimation filter is not supported. Using default sampling frequency." + ) + else: + avail = sorted(avail.strip().split(" ")) + val = int(avail[1] if value else avail[0]) + self._set_iio_attr( + "voltage0_i", "sampling_frequency", False, val, self._rxadc + ) @property def tx_enable_int8(self): """tx_enable_int8: Enable x8 interpolation filter in TX path""" - avail = self._get_iio_attr_str( - "voltage0", "sampling_frequency_available", True, self._txdac - ) - avail = avail.strip().split(" ") - val = self._get_iio_attr_str( - "voltage0", "sampling_frequency", True, self._txdac - ) - return val == avail[1] + try: + avail = self._get_iio_attr_str( + "voltage0", "sampling_frequency_available", True, self._txdac + ) + except KeyError: + return False + else: + avail = avail.strip().split(" ") + val = self._get_iio_attr_str( + "voltage0", "sampling_frequency", True, self._txdac + ) + return val == avail[1] @tx_enable_int8.setter def tx_enable_int8(self, value): - avail = self._get_iio_attr_str( - "voltage0", "sampling_frequency_available", True, self._txdac - ) - avail = sorted(avail.strip().split(" ")) - val = int(avail[1] if value else avail[0]) - self._set_iio_attr("voltage0", "sampling_frequency", True, val, self._txdac) + try: + avail = self._get_iio_attr_str( + "voltage0", "sampling_frequency_available", True, self._txdac + ) + except KeyError: + if value: + print( + "x8 interpolation filter is not supported. Using default sampling frequency." + ) + else: + avail = sorted(avail.strip().split(" ")) + val = int(avail[1] if value else avail[0]) + self._set_iio_attr("voltage0", "sampling_frequency", True, val, self._txdac) @property def rx_sample_rate(self): diff --git a/adi/adrv9009.py b/adi/adrv9009.py index 13bb8c142..5282d07fb 100644 --- a/adi/adrv9009.py +++ b/adi/adrv9009.py @@ -38,7 +38,7 @@ def __init__(self, uri="", jesd_monitor=False, jesd=None): self._txdac = self._ctx.find_device("axi-adrv9009-tx-hpc") self._ctx.set_timeout(30000) # Needed for loading profiles if jesdadi and jesd_monitor: - self._jesd = jesd if jesd else jesdadi(uri=uri) + self._jesd = jesd if jesd else jesdadi(address=uri) rx_tx.__init__(self) self.obs = obs(self._ctx, self._rxobs, self._obs_channel_names) @@ -214,11 +214,11 @@ def obs_powerdown_en(self, value): @property def aux_obs_lo(self): """aux_obs_lo: Carrier frequency of ORx path""" - return self._get_iio_attr("altvoltage1", "AUX_OBS_RX_LO_frequency", True) + return self._get_iio_attr("altvoltage1", "frequency", True) @aux_obs_lo.setter def aux_obs_lo(self, value): - self._set_iio_attr("altvoltage1", "AUX_OBS_RX_LO_frequency", True, value) + self._set_iio_attr("altvoltage1", "frequency", True, value) @property def obs_quadrature_tracking_en(self): @@ -250,7 +250,6 @@ def obs_hardwaregain(self): @obs_hardwaregain.setter def obs_hardwaregain(self, value): - # if self.obs_gain_control_mode == "manual": self._set_iio_attr("voltage2", "hardwaregain", False, value) @property diff --git a/examples/ad9371.py b/examples/ad9371.py index 87c16454c..0071c0f4e 100644 --- a/examples/ad9371.py +++ b/examples/ad9371.py @@ -2,6 +2,7 @@ # # SPDX short identifier: ADIBSD +import sys import time import adi @@ -9,8 +10,13 @@ import numpy as np from scipy import signal +# Optionally pass URI as command line argument, +# else use default context manager search +my_uri = sys.argv[1] if len(sys.argv) >= 2 else None +print("uri: " + str(my_uri)) + # Create radio -sdr = adi.ad9371() +sdr = adi.ad9371(uri=my_uri) # Configure properties sdr.rx_enabled_channels = [0, 1] @@ -48,6 +54,7 @@ # Collect data fsr = int(sdr.rx_sample_rate) +print(fsr) for r in range(20): x = sdr.rx() f, Pxx_den = signal.periodogram(x[0], fsr) diff --git a/examples/ad9371_dec8.py b/examples/ad9371_dec8.py index 6e2e703b2..9acc6636a 100644 --- a/examples/ad9371_dec8.py +++ b/examples/ad9371_dec8.py @@ -2,6 +2,7 @@ # # SPDX short identifier: ADIBSD +import sys import time import adi @@ -9,8 +10,13 @@ import numpy as np from scipy import signal +# Optionally pass URI as command line argument, +# else use default context manager search +my_uri = sys.argv[1] if len(sys.argv) >= 2 else None +print("uri: " + str(my_uri)) + # Create radio -sdr = adi.ad9371(uri="ip:192.168.86.55") +sdr = adi.ad9371(uri=my_uri) # Configure properties sdr.rx_enabled_channels = [0, 1] @@ -65,4 +71,4 @@ plt.pause(0.05) time.sleep(0.1) -# plt.show() +plt.show() diff --git a/test/adrv9009_profiles/Tx_BW400_IR491p52_Rx_BW100_OR122p88_ORx_BW400_OR491p52_DC245p76.txt b/test/adrv9009_profiles/Tx_BW400_IR491p52_Rx_BW100_OR122p88_ORx_BW400_OR491p52_DC245p76.txt new file mode 100644 index 000000000..53f377b3b --- /dev/null +++ b/test/adrv9009_profiles/Tx_BW400_IR491p52_Rx_BW100_OR122p88_ORx_BW400_OR491p52_DC245p76.txt @@ -0,0 +1,422 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + -1 + 2 + 3 + -4 + -7 + 10 + 16 + -21 + -31 + 40 + 56 + -71 + -96 + 119 + 157 + -187 + -241 + 288 + 363 + -431 + -538 + 622 + 772 + -891 + -1105 + 1264 + 1582 + -1819 + -2335 + 2710 + 3697 + -4461 + -7201 + 9397 + 31111 + 31111 + 9397 + -7201 + -4461 + 3697 + 2710 + -2335 + -1819 + 1582 + 1264 + -1105 + -891 + 772 + 622 + -538 + -431 + 363 + 288 + -241 + -187 + 157 + 119 + -96 + -71 + 56 + 40 + -31 + -21 + 16 + 10 + -7 + -4 + 3 + 2 + -1 + 0 + + + + 265 + 146 + 181 + 90 + 1280 + 366 + 1257 + 27 + 1258 + 17 + 718 + 39 + 48 + 46 + 27 + 161 + 0 + 0 + 0 + 0 + 40 + 0 + 7 + 6 + 42 + 0 + 7 + 6 + 42 + 0 + 25 + 27 + 0 + 0 + 25 + 27 + 0 + 0 + 165 + 44 + 31 + 905 + + + + + + + + + + + + + + + + -25 + 14 + -13 + 1 + 19 + -52 + 60 + -65 + 4 + 233 + -1475 + 18937 + -1475 + 233 + 4 + -65 + 60 + -52 + 19 + 1 + -13 + 14 + -25 + 0 + + + + 152 + 162 + 181 + 90 + 1280 + 1307 + 1531 + 301 + 1435 + 148 + 972 + 6 + 48 + 47 + 36 + 205 + 0 + 0 + 0 + 0 + 51 + 0 + 0 + 6 + 24 + 0 + 0 + 6 + 24 + 0 + 25 + 27 + 0 + 0 + 25 + 27 + 0 + 0 + 165 + 44 + 15 + 905 + + + + 129 + 131 + 168 + 90 + 1280 + 2825 + 2289 + 0 + 1053 + 839 + 975 + 111 + 3 + 16 + 28 + 178 + 0 + 0 + 0 + 0 + 45 + 0 + 0 + 0 + 24 + 0 + 0 + 0 + 24 + 0 + 25 + 27 + 0 + 0 + 25 + 27 + 0 + 0 + 165 + 44 + 15 + 905 + + + + -107 + 419 + -302 + -398 + 990 + -471 + -1150 + 2212 + -598 + -4033 + 9267 + 21200 + 9267 + -4033 + -598 + 2212 + -1150 + -471 + 990 + -398 + -302 + 419 + -107 + + + + + + + + + + + + -25 + 14 + -13 + 1 + 19 + -52 + 60 + -65 + 4 + 233 + -1475 + 18937 + -1475 + 233 + 4 + -65 + 60 + -52 + 19 + 1 + -13 + 14 + -25 + 0 + + + + 243 + 143 + 181 + 90 + 1280 + 485 + 1275 + 37 + 1317 + 23 + 797 + 35 + 48 + 48 + 30 + 174 + 0 + 0 + 0 + 0 + 44 + 0 + 7 + 6 + 42 + 0 + 7 + 6 + 42 + 0 + 25 + 27 + 0 + 0 + 25 + 27 + 0 + 0 + 165 + 44 + 31 + 905 + + + + + + + + + + + + + + + + + + + 32 + -76 + 124 + -160 + 176 + -121 + -145 + 1031 + -3015 + 20138 + -3015 + 1031 + -145 + -121 + 176 + -160 + 124 + -76 + 32 + 0 + + + diff --git a/test/common.py b/test/common.py index 94d88b018..f10903c2d 100644 --- a/test/common.py +++ b/test/common.py @@ -25,6 +25,9 @@ def pytest_configure(config): config.addinivalue_line( "markers", "obs_required: mark tests that require observation data paths" ) + config.addinivalue_line( + "markers", "no_obs_required: mark tests that require observation data paths" + ) config.addinivalue_line("markers", "lvds_test: mark tests for LVDS") config.addinivalue_line("markers", "cmos_test: mark tests for CMOS") @@ -73,6 +76,8 @@ def pytest_runtest_setup(item): pytest.skip( "Testing requiring observation disabled. Use --obs-enable flag to enable" ) + if obs and "no_obs_required" in marks: + pytest.skip("Testing requiring observation enabled. Skipping this test") # Handle CMOS and LVDS tests cmos = item.config.getoption("--cmos") diff --git a/test/test_ad9371.py b/test/test_ad9371.py index e8d86a2d1..360f3b7fa 100644 --- a/test/test_ad9371.py +++ b/test/test_ad9371.py @@ -3,12 +3,15 @@ import pytest -hardware = "ad9371" +hardware = ["ad9371", "adrv9371"] classname = "adi.ad9371" profile_path = dirname(realpath(__file__)) + "/ad9371_5_profiles/" test_profiles = [join(profile_path, f) for f in listdir(profile_path)] +# use 6in sma cables +# for obs setup, add only splitter to TX1->RX1/ORX1 + params = dict( one_cw_tone_manual=dict( ensm_mode="radio_on", @@ -17,28 +20,20 @@ gain_control_mode="manual", rx_hardwaregain_chan0=10, rx_hardwaregain_chan1=10, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=0, tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), one_cw_tone_auto=dict( ensm_mode="radio_on", tx_lo=2500000000, rx_lo=2500000000, gain_control_mode="automatic", - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=-10, tx_hardwaregain_chan1=-10, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_attenuation_5dB_manual=dict( ensm_mode="radio_on", @@ -47,14 +42,10 @@ gain_control_mode="manual", rx_hardwaregain_chan0=10, rx_hardwaregain_chan1=10, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=-5, tx_hardwaregain_chan1=-5, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_attenuation_10dB_manual=dict( ensm_mode="radio_on", @@ -63,42 +54,30 @@ gain_control_mode="manual", rx_hardwaregain_chan0=10, rx_hardwaregain_chan1=10, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=-10, tx_hardwaregain_chan1=-10, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_attenuation_0dB_auto=dict( ensm_mode="radio_on", tx_lo=2500000000, rx_lo=2500000000, gain_control_mode="automatic", - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=0, tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_attenuation_20dB_auto=dict( ensm_mode="radio_on", tx_lo=2500000000, rx_lo=2500000000, gain_control_mode="automatic", - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=0, rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=-20, tx_hardwaregain_chan1=-20, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_rf_gain_0dB_manual=dict( ensm_mode="radio_on", @@ -107,14 +86,8 @@ gain_control_mode="manual", rx_hardwaregain_chan0=0, rx_hardwaregain_chan1=0, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, - rx_temp_comp_gain_chan0=0, - rx_temp_comp_gain_chan1=0, tx_hardwaregain_chan0=0, tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_rf_gain_20dB_manual=dict( ensm_mode="radio_on", @@ -123,14 +96,14 @@ gain_control_mode="manual", rx_hardwaregain_chan0=20, rx_hardwaregain_chan1=20, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, - rx_temp_comp_gain_chan0=0, - rx_temp_comp_gain_chan1=0, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, + ), + change_rf_gain_10dB_manual=dict( + ensm_mode="radio_on", + tx_lo=2500000000, + rx_lo=2500000000, + gain_control_mode="manual", + rx_hardwaregain_chan0=10, + rx_hardwaregain_chan1=10, ), change_temp_gain_up=dict( ensm_mode="radio_on", @@ -139,14 +112,10 @@ gain_control_mode="manual", rx_hardwaregain_chan0=10, rx_hardwaregain_chan1=10, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=3, rx_temp_comp_gain_chan1=3, tx_hardwaregain_chan0=0, tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), change_temp_gain_down=dict( ensm_mode="radio_on", @@ -155,14 +124,10 @@ gain_control_mode="manual", rx_hardwaregain_chan0=10, rx_hardwaregain_chan1=10, - rx_quadrature_tracking_en_chan0=1, - rx_quadrature_tracking_en_chan1=1, rx_temp_comp_gain_chan0=-3, rx_temp_comp_gain_chan1=-3, tx_hardwaregain_chan0=0, tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, ), ) @@ -178,7 +143,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_TX_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, + obs_hardwaregain=30, obs_temp_comp_gain=0, ), obs_orx1_change_attenuation_10dB=dict( @@ -192,24 +157,10 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_TX_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=0, - ), - obs_orx1_change_rf_gain_10dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX1_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=10, + obs_hardwaregain=30, obs_temp_comp_gain=0, ), - obs_orx1_change_rf_gain_5dB=dict( + obs_orx1_change_rf_gain_20dB=dict( ensm_mode="radio_on", tx_lo=2500000000, tx_hardwaregain_chan0=0, @@ -220,7 +171,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_TX_LO", obs_gain_control_mode="manual", - obs_hardwaregain=5, + obs_hardwaregain=20, obs_temp_comp_gain=0, ), obs_orx1_change_temp_gain_up=dict( @@ -234,7 +185,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_TX_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, + obs_hardwaregain=30, obs_temp_comp_gain=3, ), obs_orx1_change_temp_gain_down=dict( @@ -248,91 +199,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_TX_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=-3, - ), - obs_orx2_manual=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=0, - ), - obs_orx2_change_attenuation_10dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=-10, - tx_hardwaregain_chan1=-10, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=0, - ), - obs_orx2_change_rf_gain_10dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=10, - obs_temp_comp_gain=0, - ), - obs_orx2_change_rf_gain_5dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=5, - obs_temp_comp_gain=0, - ), - obs_orx2_change_temp_gain_up=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=3, - ), - obs_orx2_change_temp_gain_down=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_TX_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, + obs_hardwaregain=30, obs_temp_comp_gain=-3, ), snf_orx1_manual=dict( @@ -346,7 +213,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_SN_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, + obs_hardwaregain=30, obs_temp_comp_gain=0, ), snf_orx1_change_attenuation_10dB=dict( @@ -360,10 +227,10 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_SN_LO", obs_gain_control_mode="manual", - obs_hardwaregain=0, + obs_hardwaregain=30, obs_temp_comp_gain=0, ), - snf_orx1_change_rf_gain_10dB=dict( + snf_orx1_change_rf_gain_20dB=dict( ensm_mode="radio_on", tx_lo=2500000000, tx_hardwaregain_chan0=0, @@ -374,77 +241,7 @@ obs_quadrature_tracking_en=1, obs_rf_port_select="ORX1_SN_LO", obs_gain_control_mode="manual", - obs_hardwaregain=10, - obs_temp_comp_gain=0, - ), - snf_orx1_change_rf_gain_5dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX1_SN_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=5, - obs_temp_comp_gain=0, - ), - snf_orx2_manual=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_SN_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=0, - ), - snf_orx2_change_attenuation_10dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=-10, - tx_hardwaregain_chan1=-10, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_SN_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=0, - obs_temp_comp_gain=0, - ), - snf_orx2_change_rf_gain_10dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_SN_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=10, - obs_temp_comp_gain=0, - ), - snf_orx2_change_rf_gain_5dB=dict( - ensm_mode="radio_on", - tx_lo=2500000000, - tx_hardwaregain_chan0=0, - tx_hardwaregain_chan1=0, - tx_quadrature_tracking_en_chan0=1, - tx_quadrature_tracking_en_chan1=1, - sn_lo=2500000000, - obs_quadrature_tracking_en=1, - obs_rf_port_select="ORX2_SN_LO", - obs_gain_control_mode="manual", - obs_hardwaregain=5, + obs_hardwaregain=20, obs_temp_comp_gain=0, ), ) @@ -469,7 +266,7 @@ def test_ad9371_attr( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", range(2)) def test_ad9371_rx_data(test_dma_rx, iio_uri, classname, channel): @@ -477,7 +274,8 @@ def test_ad9371_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -516,7 +314,7 @@ def test_ad9371_dds_loopback( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -555,31 +353,21 @@ def test_ad9371_dds_loopback_with_10dB_splitter( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set", [ (0, params_obs["obs_orx1_manual"]), - (0, params_obs["obs_orx1_change_rf_gain_10dB"]), - (0, params_obs["obs_orx1_change_rf_gain_5dB"]), + (0, params_obs["obs_orx1_change_rf_gain_20dB"]), (0, params_obs["obs_orx1_change_temp_gain_up"]), (0, params_obs["obs_orx1_change_temp_gain_down"]), - (1, params_obs["obs_orx2_manual"]), - (1, params_obs["obs_orx2_change_rf_gain_10dB"]), - (1, params_obs["obs_orx2_change_rf_gain_5dB"]), - (1, params_obs["obs_orx2_change_temp_gain_up"]), - (1, params_obs["obs_orx2_change_temp_gain_down"]), (0, params_obs["snf_orx1_manual"]), - (0, params_obs["snf_orx1_change_rf_gain_10dB"]), - (0, params_obs["snf_orx1_change_rf_gain_5dB"]), - (1, params_obs["snf_orx2_manual"]), - (1, params_obs["snf_orx2_change_rf_gain_10dB"]), - (1, params_obs["snf_orx2_change_rf_gain_5dB"]), + (0, params_obs["snf_orx1_change_rf_gain_20dB"]), ], ) @pytest.mark.parametrize( - "frequency, scale, peak_min, use_obs", [(5000000, 0.25, -40.5, True)] + "frequency, scale, peak_min, use_obs", [(5000000, 0.25, -52.5, True)] ) def test_ad9371_dds_loopback_for_obs( test_dds_loopback, @@ -598,7 +386,8 @@ def test_ad9371_dds_loopback_for_obs( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -634,7 +423,7 @@ def test_ad9371_two_tone_loopback( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -669,24 +458,25 @@ def test_ad9371_two_tone_loopback_with_10dB_splitter( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_manual"], 0.5, 8.5, 9.5), - (params["one_cw_tone_manual"], 0.12, 20.5, 21.5), - (params["one_cw_tone_manual"], 0.25, 14.5, 15.5), - (params["one_cw_tone_auto"], 0.12, 10.5, 11.5), - (params["change_attenuation_5dB_manual"], 0.25, 19.5, 20.5), - (params["change_attenuation_10dB_manual"], 0.25, 24.25, 25.25), - (params["change_attenuation_0dB_auto"], 0.12, 3.5, 4.75), - (params["change_attenuation_20dB_auto"], 0.12, 20.75, 22), - (params["change_rf_gain_0dB_manual"], 0.25, 24.75, 26), - (params["change_rf_gain_20dB_manual"], 0.25, 5, 6), - (params["change_temp_gain_up"], 0.25, 14.5, 15.5), - (params["change_temp_gain_down"], 0.25, 14.5, 15.5), + (params["one_cw_tone_manual"], 0.5, 8.5, 10.5), + (params["one_cw_tone_manual"], 0.12, 20.5, 22.5), + (params["one_cw_tone_manual"], 0.25, 14.5, 16.5), + (params["one_cw_tone_auto"], 0.12, 10.5, 13.5), + (params["change_attenuation_5dB_manual"], 0.25, 19.5, 22.5), + (params["change_attenuation_10dB_manual"], 0.25, 24.25, 26.25), + (params["change_attenuation_0dB_auto"], 0.12, 2.5, 5.5), + (params["change_attenuation_20dB_auto"], 0.12, 20.75, 23.75), + (params["change_rf_gain_0dB_manual"], 0.25, 24.75, 26.75), + (params["change_rf_gain_20dB_manual"], 0.25, 5, 7), + (params["change_temp_gain_up"], 0.25, 14.5, 16.5), + (params["change_temp_gain_down"], 0.25, 14.5, 16.5), ], ) def test_ad9371_dds_gain_check_vary_power( @@ -706,27 +496,25 @@ def test_ad9371_dds_gain_check_vary_power( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) -@pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( - "param_set, dds_scale", + "channel, param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_manual"], 0.5), - (params["one_cw_tone_manual"], 0.12), - (params["one_cw_tone_manual"], 0.25), - (params["one_cw_tone_auto"], 0.12), - (params["change_attenuation_5dB_manual"], 0.25), - (params["change_attenuation_10dB_manual"], 0.25), - (params["change_attenuation_0dB_auto"], 0.12), - (params["change_attenuation_20dB_auto"], 0.12), - (params["change_rf_gain_0dB_manual"], 0.25), - (params["change_rf_gain_20dB_manual"], 0.25), - (params["change_temp_gain_up"], 0.25), - (params["change_temp_gain_down"], 0.25), + (0, params["one_cw_tone_manual"], 0.5, 18, 20.75), + (1, params["one_cw_tone_manual"], 0.5, 8, 10.75), + (0, params["one_cw_tone_auto"], 0.12, 21, 23.25), + (1, params["one_cw_tone_auto"], 0.12, 11, 13.25), + (0, params["change_attenuation_5dB_manual"], 0.25, 29, 31.25), + (1, params["change_attenuation_5dB_manual"], 0.25, 19, 21.5), + (0, params["change_attenuation_0dB_auto"], 0.12, 11, 13.5), + (1, params["change_attenuation_0dB_auto"], 0.12, 2, 5.5), + (0, params["change_rf_gain_0dB_manual"], 0.25, 34, 36.5), + (1, params["change_rf_gain_0dB_manual"], 0.25, 24, 26.5), + (0, params["change_temp_gain_up"], 0.25, 24, 26.5), + (1, params["change_temp_gain_up"], 0.25, 14, 16.5), ], ) -@pytest.mark.parametrize("min_rssi, max_rssi", [(10, 50)]) def test_ad9371_dds_gain_check_vary_power_with_10dB_splitter( test_gain_check, iio_uri, @@ -743,7 +531,8 @@ def test_ad9371_dds_gain_check_vary_power_with_10dB_splitter( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -756,7 +545,7 @@ def test_ad9371_dds_gain_check_vary_power_with_10dB_splitter( params["change_attenuation_0dB_auto"], params["change_attenuation_20dB_auto"], params["change_rf_gain_0dB_manual"], - params["change_rf_gain_20dB_manual"], + params["change_rf_gain_10dB_manual"], params["change_temp_gain_up"], params["change_temp_gain_down"], ], @@ -768,7 +557,7 @@ def test_ad9371_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -781,7 +570,7 @@ def test_ad9371_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min params["change_attenuation_0dB_auto"], params["change_attenuation_20dB_auto"], params["change_rf_gain_0dB_manual"], - params["change_rf_gain_20dB_manual"], + params["change_rf_gain_10dB_manual"], params["change_temp_gain_up"], params["change_temp_gain_down"], ], @@ -795,15 +584,13 @@ def test_ad9371_sfdr_with_10dB_splitter( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "channel, param_set, sfdr_min", [ - (0, params_obs["obs_orx1_change_attenuation_10dB"], 45), + (0, params_obs["obs_orx1_change_attenuation_10dB"], 30), (0, params_obs["snf_orx1_change_attenuation_10dB"], 30), - (1, params_obs["obs_orx2_change_attenuation_10dB"], 45), - (1, params_obs["snf_orx2_change_attenuation_10dB"], 30), ], ) @pytest.mark.parametrize("use_obs", [True]) @@ -814,7 +601,7 @@ def test_ad9371_sfdr_for_obs( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( diff --git a/test/test_ad9375.py b/test/test_ad9375.py index 7718fb752..65d9c2978 100644 --- a/test/test_ad9375.py +++ b/test/test_ad9375.py @@ -3,7 +3,7 @@ import pytest -hardware = "ad9375" +hardware = ["ad9375", "adrv9375"] classname = "adi.ad9375" profile_path = dirname(realpath(__file__)) + "/ad9371_5_profiles/" @@ -161,6 +161,14 @@ tx_quadrature_tracking_en_chan0=1, tx_quadrature_tracking_en_chan1=1, ), + change_rf_gain_10dB_manual=dict( + ensm_mode="radio_on", + tx_lo=2500000000, + rx_lo=2500000000, + gain_control_mode="manual", + rx_hardwaregain_chan0=10, + rx_hardwaregain_chan1=10, + ), change_temp_gain_up=dict( ensm_mode="radio_on", tx_lo=2500000000, @@ -215,7 +223,7 @@ def test_ad9375_attr( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", range(2)) def test_ad9375_rx_data(test_dma_rx, iio_uri, classname, channel): @@ -225,6 +233,14 @@ def test_ad9375_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################### @pytest.mark.iio_hardware(hardware) @pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize("channel", range(2)) +def test_ad9375_tx_data(test_dma_tx, iio_uri, classname, channel): + test_dma_tx(iio_uri, classname, channel) + + +######################################### +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, frequency, scale, peak_min", @@ -261,7 +277,7 @@ def test_ad9375_dds_loopback( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -296,7 +312,7 @@ def test_ad9375_two_tone_loopback( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -332,7 +348,7 @@ def test_ad9375_dds_gain_check_vary_power( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -345,7 +361,7 @@ def test_ad9375_dds_gain_check_vary_power( params["change_attenuation_0dB_auto"], params["change_attenuation_20dB_auto"], params["change_rf_gain_0dB_manual"], - params["change_rf_gain_20dB_manual"], + params["change_rf_gain_10dB_manual"], params["change_temp_gain_up"], params["change_temp_gain_down"], ], @@ -356,7 +372,7 @@ def test_ad9375_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( @@ -370,7 +386,7 @@ def test_ad9375_profile_write( # AD9375 ONLY ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends, values, tol, repeats", @@ -395,7 +411,7 @@ def test_ad9375_attr_with_depends( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends", @@ -442,7 +458,7 @@ def test_ad9375_attr_readonly_with_depends( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, depends, start, stop", @@ -496,7 +512,7 @@ def test_ad9375_attr_boolean( ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize( "attr, value", [("tx_dpd_reset_en_chan0", 1), ("tx_dpd_reset_en_chan1", 1),], diff --git a/test/test_adrv9009_p.py b/test/test_adrv9009_p.py index f50f68b96..6c1ded694 100644 --- a/test/test_adrv9009_p.py +++ b/test/test_adrv9009_p.py @@ -17,6 +17,9 @@ profile_path = dirname(realpath(__file__)) + "/adrv9009_profiles/" test_profiles = [join(profile_path, f) for f in listdir(profile_path)] +# use 6in sma cables +# for obs setup, add only splitter to TX1->RX1/ORX1 + params = dict( one_cw_tone_manual=dict( ensm_mode="radio_on", @@ -204,152 +207,152 @@ ), ) -# params_obs = dict( -# obs_tx=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_TX_LO", -# obs_hardwaregain=0, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_tx_change_attenuation_10dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=-10, -# tx_hardwaregain_chan1=-10, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_TX_LO", -# obs_hardwaregain=0, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_tx_change_rf_gain_10dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_TX_LO", -# obs_hardwaregain=10, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_tx_change_rf_gain_5dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_TX_LO", -# obs_hardwaregain=5, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_aux=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_AUX_LO", -# obs_hardwaregain=0, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_aux_change_attenuation_10dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=-10, -# tx_hardwaregain_chan1=-10, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_AUX_LO", -# obs_hardwaregain=0, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_aux_change_rf_gain_10dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_AUX_LO", -# obs_hardwaregain=10, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# obs_aux_change_rf_gain_5dB=dict( -# ensm_mode="radio_on", -# trx_lo=2500000000, -# rx_powerdown_en_chan0=1, -# rx_powerdown_en_chan1=1, -# obs_powerdown_en=0, -# tx_hardwaregain_chan0=0, -# tx_hardwaregain_chan1=0, -# tx_quadrature_tracking_en_chan0=1, -# tx_quadrature_tracking_en_chan1=1, -# aux_obs_lo=2500000000, -# obs_quadrature_tracking_en=1, -# obs_rf_port_select="OBS_AUX_LO", -# obs_hardwaregain=5, -# calibrate_rx_qec_en=1, -# calibrate_tx_qec_en=1, -# calibrate=1, -# ), -# ) +params_obs = dict( + obs_tx=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_TX_LO", + obs_hardwaregain=0, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_tx_change_attenuation_10dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=-10, + tx_hardwaregain_chan1=-10, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_TX_LO", + obs_hardwaregain=0, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_tx_change_rf_gain_10dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_TX_LO", + obs_hardwaregain=10, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_tx_change_rf_gain_5dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_TX_LO", + obs_hardwaregain=5, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_aux=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_AUX_LO", + obs_hardwaregain=0, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_aux_change_attenuation_10dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=-10, + tx_hardwaregain_chan1=-10, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_AUX_LO", + obs_hardwaregain=0, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_aux_change_rf_gain_10dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_AUX_LO", + obs_hardwaregain=10, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), + obs_aux_change_rf_gain_5dB=dict( + ensm_mode="radio_on", + trx_lo=2500000000, + rx_powerdown_en_chan0=1, + rx_powerdown_en_chan1=1, + obs_powerdown_en=0, + tx_hardwaregain_chan0=0, + tx_hardwaregain_chan1=0, + tx_quadrature_tracking_en_chan0=1, + tx_quadrature_tracking_en_chan1=1, + aux_obs_lo=2500000000, + obs_quadrature_tracking_en=1, + obs_rf_port_select="OBS_AUX_LO", + obs_hardwaregain=5, + calibrate_rx_qec_en=1, + calibrate_tx_qec_en=1, + calibrate=1, + ), +) ######################################### @@ -378,24 +381,20 @@ def test_adrv9009_rx_data(test_dma_rx, iio_uri, classname, channel): ######################################## -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, frequency, scale, peak_min", [ - (params["one_cw_tone_manual"], 2000000, 0.5, -42), - (params["one_cw_tone_manual"], 2000000, 0.12, -55), - (params["one_cw_tone_manual"], 2000000, 0.25, -48), - (params["one_cw_tone_slow_attack"], 1000000, 0.12, -44), - (params["one_cw_tone_slow_attack"], 2000000, 0.12, -44), - (params["one_cw_tone_slow_attack"], 500000, 0.12, -44), - (params["change_attenuation_5dB_manual"], 2000000, 0.25, -53), - (params["change_attenuation_10dB_manual"], 2000000, 0.25, -58), - (params["change_attenuation_0dB_slow_attack"], 1000000, 0.12, -35), - (params["change_attenuation_20dB_slow_attack"], 1000000, 0.12, -54), - (params["change_rf_gain_0dB_manual"], 2000000, 0.25, -59), - (params["change_rf_gain_20dB_manual"], 2000000, 0.25, -38), + (params["one_cw_tone_manual"], 2000000, 0.5, -50), + (params["one_cw_tone_slow_attack"], 2000000, 0.12, -55), + (params["change_attenuation_10dB_manual"], 2000000, 0.25, -65), + (params["change_attenuation_0dB_slow_attack"], 1000000, 0.12, -45), + (params["change_attenuation_20dB_slow_attack"], 1000000, 0.12, -65), + (params["change_rf_gain_0dB_manual"], 2000000, 0.25, -65), + (params["change_rf_gain_20dB_manual"], 2000000, 0.25, -45), ], ) def test_adrv9009_dds_loopback( @@ -415,27 +414,22 @@ def test_adrv9009_dds_loopback( ######################################## @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( - "param_set, frequency, scale", + "param_set, frequency, scale, peak_min", [ - (params["one_cw_tone_manual"], 2000000, 0.5), - (params["one_cw_tone_manual"], 2000000, 0.12), - (params["one_cw_tone_manual"], 2000000, 0.25), - (params["one_cw_tone_slow_attack"], 1000000, 0.12), - (params["one_cw_tone_slow_attack"], 2000000, 0.12), - (params["one_cw_tone_slow_attack"], 500000, 0.12), - (params["change_attenuation_5dB_manual"], 2000000, 0.25), - (params["change_attenuation_10dB_manual"], 2000000, 0.25), - (params["change_attenuation_0dB_slow_attack"], 1000000, 0.12), - (params["change_attenuation_20dB_slow_attack"], 1000000, 0.12), - (params["change_rf_gain_0dB_manual"], 2000000, 0.25), - (params["change_rf_gain_20dB_manual"], 2000000, 0.25), + (params["one_cw_tone_manual"], 2000000, 0.5, -60), + (params["one_cw_tone_slow_attack"], 1000000, 0.12, -65), + (params["change_attenuation_5dB_manual"], 2000000, 0.5, -65), + (params["change_attenuation_10dB_manual"], 2000000, 0.5, -70), + (params["change_attenuation_0dB_slow_attack"], 1000000, 0.5, -40), + (params["change_attenuation_20dB_slow_attack"], 1000000, 0.5, -60), + (params["change_rf_gain_0dB_manual"], 2000000, 0.5, -70), + (params["change_rf_gain_20dB_manual"], 2000000, 0.5, -50), ], ) -@pytest.mark.parametrize("peak_min", [-50]) def test_adrv9009_dds_loopback_with_10dB_splitter( test_dds_loopback, iio_uri, @@ -452,43 +446,41 @@ def test_adrv9009_dds_loopback_with_10dB_splitter( ######################################## -# @pytest.mark.obs_required -# @pytest.mark.iio_hardware(hardware) -# @pytest.mark.parametrize("classname", [(classname)]) -# @pytest.mark.parametrize( -# "channel, param_set", -# [ -# (0, params_obs["obs_tx"]), -# (0, params_obs["obs_tx_change_attenuation_10dB"]), -# (0, params_obs["obs_tx_change_rf_gain_10dB"]), -# (0, params_obs["obs_tx_change_rf_gain_5dB"]), -# (0, params_obs["obs_aux"]), -# (0, params_obs["obs_aux_change_attenuation_10dB"]), -# (0, params_obs["obs_aux_change_rf_gain_10dB"]), -# (0, params_obs["obs_aux_change_rf_gain_5dB"]), -# ], -# ) -# @pytest.mark.parametrize( -# "frequency, scale, peak_min, use_obs", [(50000000, 0.25, -40.5, True)] -# ) -# def test_adrv9009_dds_loopback_for_obs( -# test_dds_loopback, -# iio_uri, -# classname, -# param_set, -# channel, -# frequency, -# scale, -# peak_min, -# use_obs, -# ): -# test_dds_loopback( -# iio_uri, classname, param_set, channel, frequency, scale, peak_min, use_obs -# ) +@pytest.mark.obs_required +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize( + "channel, param_set, peak_min", + [ + (0, params_obs["obs_tx"], -45), + (0, params_obs["obs_tx_change_attenuation_10dB"], -55), + (0, params_obs["obs_tx_change_rf_gain_10dB"], -35), + (0, params_obs["obs_tx_change_rf_gain_5dB"], -40), + (0, params_obs["obs_aux"], -45), + (0, params_obs["obs_aux_change_attenuation_10dB"], -55), + (0, params_obs["obs_aux_change_rf_gain_10dB"], -35), + (0, params_obs["obs_aux_change_rf_gain_5dB"], -40), + ], +) +@pytest.mark.parametrize("frequency, scale, use_obs", [(50000000, 0.25, True)]) +def test_adrv9009_dds_loopback_for_obs( + test_dds_loopback, + iio_uri, + classname, + param_set, + channel, + frequency, + scale, + peak_min, + use_obs, +): + test_dds_loopback( + iio_uri, classname, param_set, channel, frequency, scale, peak_min, use_obs + ) ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -524,7 +516,7 @@ def test_adrv9009_two_tone_loopback( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( @@ -559,52 +551,45 @@ def test_adrv9009_two_tone_loopback_with_10dB_splitter( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( - "param_set", + "param_set, sfdr_min", [ - params["one_cw_tone_manual"], - params["one_cw_tone_slow_attack"], - params["change_attenuation_5dB_manual"], - params["change_attenuation_10dB_manual"], - params["change_attenuation_0dB_slow_attack"], - params["change_attenuation_20dB_slow_attack"], - params["change_rf_gain_0dB_manual"], - params["change_rf_gain_20dB_manual"], - params["change_trx_lo_1GHz_slow_attack"], - params["change_trx_lo_3GHz_slow_attack"], - params["change_trx_lo_5GHz_slow_attack"], + (params["one_cw_tone_manual"], 50), + (params["one_cw_tone_slow_attack"], 55), + (params["change_attenuation_5dB_manual"], 45), + (params["change_attenuation_10dB_manual"], 40), + (params["change_attenuation_0dB_slow_attack"], 50), + (params["change_attenuation_20dB_slow_attack"], 50), + (params["change_rf_gain_20dB_manual"], 50), + (params["change_trx_lo_1GHz_slow_attack"], 35), ], ) -@pytest.mark.parametrize("sfdr_min", [30]) def test_adrv9009_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_min): test_sfdr(iio_uri, classname, channel, param_set, sfdr_min) ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( - "param_set", + "param_set, sfdr_min", [ - params["one_cw_tone_manual"], - params["one_cw_tone_slow_attack"], - params["change_attenuation_5dB_manual"], - params["change_attenuation_10dB_manual"], - params["change_attenuation_0dB_slow_attack"], - params["change_attenuation_20dB_slow_attack"], - params["change_rf_gain_0dB_manual"], - params["change_rf_gain_20dB_manual"], - params["change_trx_lo_1GHz_slow_attack"], - params["change_trx_lo_3GHz_slow_attack"], - params["change_trx_lo_5GHz_slow_attack"], + (params["one_cw_tone_manual"], 40), + (params["one_cw_tone_slow_attack"], 45), + (params["change_attenuation_5dB_manual"], 40), + (params["change_attenuation_10dB_manual"], 30), + (params["change_attenuation_0dB_slow_attack"], 50), + (params["change_attenuation_20dB_slow_attack"], 40), + (params["change_rf_gain_20dB_manual"], 45), + (params["change_trx_lo_1GHz_slow_attack"], 30), ], ) -@pytest.mark.parametrize("sfdr_min", [40]) def test_adrv9009_sfdr_with_10dB_splitter( test_sfdr, iio_uri, classname, channel, param_set, sfdr_min ): @@ -612,47 +597,48 @@ def test_adrv9009_sfdr_with_10dB_splitter( ######################################### -# @pytest.mark.obs_required -# @pytest.mark.iio_hardware(hardware) -# @pytest.mark.parametrize("classname", [(classname)]) -# @pytest.mark.parametrize("channel", [0, 1]) -# @pytest.mark.parametrize( -# "param_set", -# [ -# params_obs["obs_tx"], -# params_obs["obs_tx_change_attenuation_10dB"], -# params_obs["obs_tx_change_rf_gain_10dB"], -# params_obs["obs_tx_change_rf_gain_5dB"], -# params_obs["obs_aux"], -# params_obs["obs_aux_change_attenuation_10dB"], -# params_obs["obs_aux_change_rf_gain_10dB"], -# params_obs["obs_aux_change_rf_gain_5dB"], -# ], -# ) -# @pytest.mark.parametrize("sfdr_min", [45]) -# @pytest.mark.parametrize("use_obs", [True]) -# def test_adrv9009_sfdr_for_obs( -# test_sfdr, iio_uri, classname, channel, param_set, sfdr_min, use_obs -# ): -# test_sfdr(iio_uri, classname, channel, param_set, sfdr_min, use_obs) +@pytest.mark.obs_required +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize("channel", [0]) +@pytest.mark.parametrize( + "param_set", + [ + params_obs["obs_tx"], + params_obs["obs_tx_change_attenuation_10dB"], + params_obs["obs_tx_change_rf_gain_10dB"], + params_obs["obs_tx_change_rf_gain_5dB"], + params_obs["obs_aux"], + params_obs["obs_aux_change_attenuation_10dB"], + params_obs["obs_aux_change_rf_gain_10dB"], + params_obs["obs_aux_change_rf_gain_5dB"], + ], +) +@pytest.mark.parametrize("sfdr_min", [45]) +@pytest.mark.parametrize("use_obs", [True]) +def test_adrv9009_sfdr_for_obs( + test_sfdr, iio_uri, classname, channel, param_set, sfdr_min, use_obs +): + test_sfdr(iio_uri, classname, channel, param_set, sfdr_min, use_obs) ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_slow_attack"], 0.12, 33.5, 41.5), - (params["change_attenuation_0dB_slow_attack"], 0.12, 24, 32), + (params["one_cw_tone_slow_attack"], 0.12, 35.5, 45.5), + (params["change_attenuation_0dB_slow_attack"], 0.12, 28.5, 38.5), (params["change_attenuation_20dB_slow_attack"], 0.12, 40, 45.5), - (params["change_trx_lo_1GHz_slow_attack"], 0, 35, 60), + (params["change_trx_lo_1GHz_slow_attack"], 0, 40, 45.5), (params["change_trx_lo_1GHz_slow_attack"], 0.9, 25, 35), - (params["change_trx_lo_3GHz_slow_attack"], 0, 35, 60), - (params["change_trx_lo_3GHz_slow_attack"], 0.9, 0, 22), - (params["change_trx_lo_5GHz_slow_attack"], 0, 35, 60), - (params["change_trx_lo_5GHz_slow_attack"], 0.9, 20, 25), + (params["change_trx_lo_3GHz_slow_attack"], 0, 40, 45.5), + (params["change_trx_lo_3GHz_slow_attack"], 0.9, 16, 26), + (params["change_trx_lo_5GHz_slow_attack"], 0, 40, 45.5), + (params["change_trx_lo_5GHz_slow_attack"], 0.9, 15, 25), ], ) def test_adrv9009_dds_gain_check_agc( @@ -672,24 +658,19 @@ def test_adrv9009_dds_gain_check_agc( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( - "param_set, dds_scale, min_rssi", + "param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_slow_attack"], 0.12, 40), - (params["change_attenuation_0dB_slow_attack"], 0.12, 30), - (params["change_attenuation_20dB_slow_attack"], 0.12, 43.5), - (params["change_trx_lo_1GHz_slow_attack"], 0, 43.5), - (params["change_trx_lo_1GHz_slow_attack"], 0.9, 30), - (params["change_trx_lo_3GHz_slow_attack"], 0, 43.75), - (params["change_trx_lo_3GHz_slow_attack"], 0.9, 23), - (params["change_trx_lo_5GHz_slow_attack"], 0, 43.75), - (params["change_trx_lo_5GHz_slow_attack"], 0.9, 25), + (params["one_cw_tone_slow_attack"], 0.12, 38, 45), + (params["change_attenuation_0dB_slow_attack"], 0.12, 28, 45), + (params["change_trx_lo_1GHz_slow_attack"], 0.9, 25, 45), + (params["change_trx_lo_3GHz_slow_attack"], 0.9, 15, 45), + (params["change_trx_lo_5GHz_slow_attack"], 0.9, 15, 40), ], ) -@pytest.mark.parametrize("max_rssi", [50]) def test_adrv9009_dds_gain_check_agc_with_10db_splitter( test_gain_check, iio_uri, @@ -706,19 +687,20 @@ def test_adrv9009_dds_gain_check_agc_with_10db_splitter( ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_manual"], 0.5, 30, 40), + (params["one_cw_tone_manual"], 0.5, 35, 45), (params["one_cw_tone_manual"], 0.12, 40, 45), (params["one_cw_tone_manual"], 0.25, 35, 45), (params["change_attenuation_5dB_manual"], 0.25, 40, 45), (params["change_attenuation_10dB_manual"], 0.25, 40, 45), (params["change_rf_gain_0dB_manual"], 0.25, 40, 45), - (params["change_rf_gain_20dB_manual"], 0.25, 25, 35), + (params["change_rf_gain_20dB_manual"], 0.25, 25, 45), ( dict( trx_lo=1000000000, @@ -770,19 +752,17 @@ def test_adrv9009_dds_gain_check_vary_power( ######################################### @pytest.mark.obs_required -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set, dds_scale, min_rssi, max_rssi", [ - (params["one_cw_tone_manual"], 0.5, 38, 45), + (params["one_cw_tone_manual"], 0.5, 35, 45), (params["one_cw_tone_manual"], 0.12, 43, 45), - (params["one_cw_tone_manual"], 0.25, 43, 45), + (params["one_cw_tone_manual"], 0.25, 42, 45), (params["change_attenuation_5dB_manual"], 0.25, 43, 45), (params["change_attenuation_10dB_manual"], 0.25, 43, 45), - (params["change_rf_gain_0dB_manual"], 0.25, 42.5, 44.5), - (params["change_rf_gain_20dB_manual"], 0.25, 34, 44), ( dict( trx_lo=1000000000, @@ -797,7 +777,7 @@ def test_adrv9009_dds_gain_check_vary_power( ), 0.5, 42.5, - 44.5, + 45, ), ( dict( @@ -812,8 +792,8 @@ def test_adrv9009_dds_gain_check_vary_power( calibrate=1, ), 0.5, - 36, - 43.5, + 30, + 45, ), ], ) @@ -833,11 +813,10 @@ def test_adrv9009_dds_gain_check_vary_power_with_10dB_splitter( ######################################### -# TODO: Test, see what's its difference with dds_loopback, PROBLEMATIC -# OSError: [Errno 5] Input/output error -@pytest.mark.iio_hardware(hardware) +@pytest.mark.no_obs_required +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) -@pytest.mark.parametrize("channel", [0]) +@pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set", [ @@ -876,7 +855,7 @@ def test_adrv9009_iq_loopback(test_iq_loopback, iio_uri, classname, channel, par ######################################### -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) @pytest.mark.parametrize("classname", [(classname)]) @pytest.mark.parametrize("attr", ["profile"]) @pytest.mark.parametrize( @@ -890,10 +869,10 @@ def test_adrv9009_profile_write( ######################################### @pytest.mark.skipif(skip_jesd, reason="JESD module not importable") -@pytest.mark.iio_hardware(hardware) +@pytest.mark.iio_hardware(hardware, True) def test_adrv9009_jesd(iio_uri): import adi - sdr = adi.adrv9009(uri=iio_uri, jesd_monitor=True) + sdr = adi.adrv9009(iio_uri, jesd_monitor=True) info = sdr._jesd.get_all_statuses() assert info