From fec145cac6eb7330d17e60ca46e5be8edde3b493 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 3 Apr 2024 15:08:36 +0200 Subject: [PATCH 1/4] Pucch2 polar rx: fix dynamic range fixes the overflow issue in the PUCCH2 RX with 4+ RX antennas and 12+ bits (polar code format). The fix scales the polar decoding LLR computation according to the number of RX antennas. The issue was clear for 100 MHz 4 RX antennas. Even nr_pucchsim -s -5 -q 8 -P 2 -b 12 -R 273 -z4 -n1000 doesn't converge to 0 BLER with increasing SNR. The issue didn't appear in CI because of the bandwidth and antenna count limitations. --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 56b08f2e1d..118c828519 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1519,7 +1519,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, corr_re = ( corr32_re[symb][half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_re[aa]))[0]); corr_im = ( corr32_im[symb][half_prb>>2][aa]/(2*nc_group_size*4/2)+((int16_t*)(&prod_im[aa]))[0]); - corr_tmp += corr_re*corr_re + corr_im*corr_im; + corr_tmp += (corr_re*corr_re + corr_im*corr_im)>>(Prx/2); /* LOG_D(PHY,"pucch2 half_prb %d cw %d (%d,%d) aa %d: (%d,%d,%d,%d,%d,%d,%d,%d)x(%d,%d,%d,%d,%d,%d,%d,%d) (%d,%d)+(%d,%d) = (%d,%d) => %d\n", half_prb,cw,cw&15,cw>>4,aa, From e289c11b1bf6d9e40c079a0c00fd2f0e372cf9bd Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 8 Apr 2024 10:49:04 +0200 Subject: [PATCH 2/4] Order nr_pucchsim options alphabetically in help --- openair1/SIMULATION/NR_PHY/pucchsim.c | 43 +++++++++++++-------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 0139dd8304..1afba2ba85 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -347,36 +347,35 @@ int main(int argc, char **argv) default: case 'h': printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]); - printf("-h This message\n"); - printf("-p Use extended prefix mode\n"); + //printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n"); + printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n"); + printf("-b number of HARQ bits (1-2)\n"); + printf("-B payload to be transmitted on PUCCH\n"); + printf("-c Activate scheduling request\n"); printf("-d Use TDD\n"); + printf("-f Output filename (.txt format) for Pe/SNR results\n"); + printf("-F Input filename (.txt format) for RX conformance testing\n"); + printf("-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)\n"); + printf("-i Enter number of ofdm symbols for pucch\n"); + printf("-I Starting symbol index for pucch\n"); + printf("-h This message\n"); + printf("-m initial cyclic shift m0\n"); printf("-n Number of frames to simulate\n"); + printf("-N Nid_cell\n"); + printf("-o Carrier frequency offset in Hz\n"); + printf("-O oversampling factor (1,2,4,8,16)\n"); + printf("-p Use extended prefix mode\n"); + printf("-P Enter the format of PUCCH\n"); + printf("-q PUCCH number of PRB\n"); + printf("-r PUCCH starting PRB\n"); + printf("-R N_RB_DL\n"); printf("-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated\n"); printf("-S Ending SNR, runs from SNR0 to SNR1\n"); printf("-t Delay spread for multipath channel\n"); - printf("-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)\n"); + printf("-T to check nacktoack miss for format 1\n"); printf("-x Transmission mode (1,2,6 for the moment)\n"); printf("-y Number of TX antennas used in eNB\n"); printf("-z Number of RX antennas used in UE\n"); - printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n"); - printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n"); - printf("-o Carrier frequency offset in Hz\n"); - printf("-N Nid_cell\n"); - printf("-R N_RB_DL\n"); - printf("-O oversampling factor (1,2,4,8,16)\n"); - printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n"); - //printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n"); - printf("-f Output filename (.txt format) for Pe/SNR results\n"); - printf("-F Input filename (.txt format) for RX conformance testing\n"); - printf("-i Enter number of ofdm symbols for pucch\n"); - printf("-I Starting symbol index for pucch\n"); - printf("-r PUCCH starting PRB\n"); - printf("-q PUCCH number of PRB\n"); - printf("-P Enter the format of PUCCH\n"); - printf("-b number of HARQ bits (1-2)\n"); - printf("-B payload to be transmitted on PUCCH\n"); - printf("-m initial cyclic shift m0\n"); - printf("-T to check nacktoack miss for format 1\n"); exit (-1); break; } From fdb993279e3db4e4303e70a7367759cc07bc7e6d Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 8 Apr 2024 12:53:23 +0200 Subject: [PATCH 3/4] Add more nr_pucchsim tests for 273 PRBs --- cmake_targets/autotests/test_case_list.xml | 24 +++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 303dede311..81b4f02465 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -295,7 +295,16 @@ (Test16: Format 2 19-bit 8/106 PRB), (Test17: Format 2 32-bit 8/106 PRB), (Test18: Format 2 32-bit 16/106 PRB), - (Test19: Format 2 64-bit 16/106 PRB) + (Test19: Format 2 64-bit 16/106 PRB), + (Test20: Format 0 1-bit Ack miss 273 PRB), + (Test21: Format 0 2-bit Ack miss 273 PRB), + (Test22: Format 0 2-bit Ack miss+SR 273 PRB), + (Test23: Format 2 4-bit 2/273 PRB), + (Test24: Format 2 7-bit 2/273 PRB), + (Test25: Format 2 11-bit 2/273 PRB), + (Test26: Format 2 12-bit 8/273 PRB), + (Test27: Format 2 19-bit 8/273 PRB), + (Test28: Format 2 64-bit 16/273 PRB) nr_pucchsim -R 106 -i 1 -P 0 -b 1 -s-2 -n1000 -R 106 -i 1 -P 0 -b 2 -s-2 -n1000 @@ -315,8 +324,17 @@ -R 106 -i 1 -P 2 -q8 -b 19 -s-3 -n1000 -R 106 -i 1 -P 2 -q8 -b 32 -s-3 -n1000 -R 106 -i 1 -P 2 -q16 -b 32 -s-3 -n1000 - -R 106 -i 1 -P 2 -q16 -b 64 -s-3 -n1000 - test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 + -R 106 -i 1 -P 2 -q16 -b 64 -s-3 -n1000 + -R 273 -z8 -i 1 -P 0 -b 1 -s-2 -n1000 + -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -n1000 + -R 273 -z8 -i 1 -P 0 -b 2 -s-2 -c -n1000 + -R 273 -z8 -i 1 -P 2 -b 4 -s0 -n1000 + -R 273 -z8 -i 1 -P 2 -b 7 -s3 -n1000 + -R 273 -z8 -i 1 -P 2 -b 11 -s6 -n1000 + -R 273 -z8 -i 1 -P 2 -q8 -b 12 -s-3 -n1000 + -R 273 -z8 -i 1 -P 2 -q8 -b 19 -s-3 -n1000 + -R 273 -z8 -i 1 -P 2 -q16 -b 64 -s-3 -n1000 + test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 test21 test22 test23 test24 test25 test26 test27 test28 PUCCH test OK segmentation fault|assertion|exiting|fatal 3 From 8940400aa6c7fc7bd16f792971e257a8edbe0266 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Mon, 8 Apr 2024 14:19:35 +0200 Subject: [PATCH 4/4] Define subband power avg through MAX_ANT, is bigger --- openair1/PHY/defs_gNB.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/defs_gNB.h b/openair1/PHY/defs_gNB.h index c4ef28bc0b..9a73311c6a 100644 --- a/openair1/PHY/defs_gNB.h +++ b/openair1/PHY/defs_gNB.h @@ -519,7 +519,7 @@ typedef struct { //! estimated avg subband noise power (dB) unsigned int n0_subband_power_avg_dB; //! estimated avg subband noise power per antenna (dB) - unsigned int n0_subband_power_avg_perANT_dB[NB_ANTENNAS_RX]; + unsigned int n0_subband_power_avg_perANT_dB[MAX_ANT]; //! estimated avg noise power per RB (dB) int n0_subband_power_tot_dB[275]; //! estimated avg noise power per RB (dBm)