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/test_adrv9009_p.py b/test/test_adrv9009_p.py index d4a0da98c..6559d1b90 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, + ), +) ######################################### @@ -385,18 +388,13 @@ def test_adrv9009_rx_data(test_dma_rx, iio_uri, classname, channel): @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( @@ -420,23 +418,18 @@ def test_adrv9009_dds_loopback( @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, @@ -453,39 +446,37 @@ 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) +@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 + ) ######################################### @@ -560,26 +551,23 @@ def test_adrv9009_two_tone_loopback_with_10dB_splitter( ######################################### +@pytest.mark.no_obs_required @pytest.mark.iio_hardware(hardware) @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) @@ -590,22 +578,18 @@ def test_adrv9009_sfdr(test_sfdr, iio_uri, classname, channel, param_set, sfdr_m @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 ): @@ -613,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) +@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.no_obs_required @pytest.mark.iio_hardware(hardware) @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( @@ -677,20 +662,15 @@ def test_adrv9009_dds_gain_check_agc( @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, @@ -714,13 +694,13 @@ def test_adrv9009_dds_gain_check_agc_with_10db_splitter( @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, @@ -778,13 +758,11 @@ def test_adrv9009_dds_gain_check_vary_power( @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, @@ -799,7 +777,7 @@ def test_adrv9009_dds_gain_check_vary_power( ), 0.5, 42.5, - 44.5, + 45, ), ( dict( @@ -814,8 +792,8 @@ def test_adrv9009_dds_gain_check_vary_power( calibrate=1, ), 0.5, - 36, - 43.5, + 30, + 45, ), ], ) @@ -835,12 +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.no_obs_required @pytest.mark.iio_hardware(hardware) @pytest.mark.parametrize("classname", [(classname)]) -@pytest.mark.parametrize("channel", [0]) +@pytest.mark.parametrize("channel", [0, 1]) @pytest.mark.parametrize( "param_set", [ @@ -897,6 +873,6 @@ def test_adrv9009_profile_write( 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