From eb9cb2f988a97e84f8a8102f97c8d9b1458be4d5 Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 17 Oct 2024 10:08:08 +0200 Subject: [PATCH 1/4] added DTX detection in PUCCH 2 receiver. This is detected by MAC already which will drop PUCCH 2 indications that are detected as DTX. For the moment this uses the same pucch0_dtx_threshold value indicated in L1 section of the configuration file. --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index cda49b83d8..3b6209cd82 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1087,6 +1087,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, pucch2_lev += signal_energy_nodc(rp[aa][symb], nb_re_pucch); } } + int decoderState=2; pucch2_lev /= Prx * Prx * pucch_pdu->nr_of_symbols; int pucch2_levdB = dB_fixed(pucch2_lev); int scaling = 0; @@ -1099,8 +1100,10 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, else if (pucch2_levdB > 54) scaling = 1; + if (pucch2_levdB < gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres/10)) + decoderState=1; LOG_D(PHY, - "%d.%d Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d, pucch2_lev %d dB (scaling %d)\n", + "%d.%d Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d, pucch2_lev %d dB (scaling %d), n0+thres %d decoderState %d\n", frame, slot, pucch_pdu->nr_of_symbols, @@ -1110,7 +1113,9 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, pucch_pdu->bit_len_csi_part1, pucch_pdu->bit_len_csi_part2, pucch2_levdB, - scaling); + scaling, + gNB->measurements.n0_subband_power_avg_dB+(gNB->pucch0_thres/10), + decoderState); int nc_group_size=1; // 2 PRB int ngroup = prb_size_ext/nc_group_size/2; @@ -1365,7 +1370,6 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, uint64_t decodedPayload[2]; uint8_t corr_dB; - int decoderState=2; if (nb_bit < 12) { // short blocklength case simde__m256i *rp_re[Prx2][2]; simde__m256i *rp2_re[Prx2][2]; From af53f35824c6c4c77077e1d9c6e5ed031c627bfe Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 18 Oct 2024 11:17:58 +0200 Subject: [PATCH 2/4] avoid processing PUCCH2 without polar if declared missed detection --- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 23 ++++++++----------- .../LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c | 1 + 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index 3b6209cd82..cf322dfc51 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1087,7 +1087,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, pucch2_lev += signal_energy_nodc(rp[aa][symb], nb_re_pucch); } } - int decoderState=2; + pucch2_lev /= Prx * Prx * pucch_pdu->nr_of_symbols; int pucch2_levdB = dB_fixed(pucch2_lev); int scaling = 0; @@ -1100,10 +1100,8 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, else if (pucch2_levdB > 54) scaling = 1; - if (pucch2_levdB < gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres/10)) - decoderState=1; LOG_D(PHY, - "%d.%d Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d, pucch2_lev %d dB (scaling %d), n0+thres %d decoderState %d\n", + "%d.%d Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d, pucch2_lev %d dB (scaling %d)\n", frame, slot, pucch_pdu->nr_of_symbols, @@ -1113,9 +1111,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, pucch_pdu->bit_len_csi_part1, pucch_pdu->bit_len_csi_part2, pucch2_levdB, - scaling, - gNB->measurements.n0_subband_power_avg_dB+(gNB->pucch0_thres/10), - decoderState); + scaling); int nc_group_size=1; // 2 PRB int ngroup = prb_size_ext/nc_group_size/2; @@ -1370,7 +1366,11 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, uint64_t decodedPayload[2]; uint8_t corr_dB; - if (nb_bit < 12) { // short blocklength case + int decoderState = 2; + if (pucch2_levdB < gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10)) + decoderState = 1; // assuming missed detection, only attempt to decode for polar case (with CRC) + LOG_D(PHY, "n0+thres %d decoderState %d\n", gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10), decoderState); + if (nb_bit < 12 && decoderState == 2) { // short blocklength case simde__m256i *rp_re[Prx2][2]; simde__m256i *rp2_re[Prx2][2]; simde__m256i *rp_im[Prx2][2]; @@ -1386,8 +1386,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, simde__m256i prod_re[Prx2],prod_im[Prx2]; uint64_t corr=0; int cw_ML=0; - - + for (int cw=0;cw<1<= 12) { // polar coded case simde__m64 *rp_re[Prx2][2]; simde__m64 *rp2_re[Prx2][2]; simde__m64 *rp_im[Prx2][2]; diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c index 189f74a0ab..facef09b52 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c @@ -1119,6 +1119,7 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id, } /* phy-test has hardcoded allocation, so no use to handle CSI reports */ if ((uci_234->pduBitmap >> 2) & 0x01 && !get_softmodem_params()->phy_test) { + LOG_D(NR_MAC, "CSI CRC %d\n", uci_234->csi_part1.csi_part1_crc); if (uci_234->csi_part1.csi_part1_crc != 1) { // API to parse the csi report and store it into sched_ctrl extract_pucch_csi_report(csi_MeasConfig, uci_234, frame, slot, UE, nrmac->common_channels->ServingCellConfigCommon); From 03b24c1ee68af985ff7416ed69e1eaa7c8892cfb Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Fri, 18 Oct 2024 15:43:08 +0200 Subject: [PATCH 3/4] fixed signal level computation for PUCCH2 and threshold in pucchsim. Threshold allows detection with -9 dB SNR with 8 RX antennas --- openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c | 4 ++-- openair1/PHY/NR_TRANSPORT/pucch_rx.c | 6 +++--- openair1/SIMULATION/NR_PHY/pucchsim.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c index c55be480d7..42b0b0b515 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c +++ b/openair1/PHY/NR_ESTIMATION/nr_measurements_gNB.c @@ -154,7 +154,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB, int slot, int first_symb, int num_sy signal_energy = signal_energy_nodc(ul_ch, 12); } n0_subband_power[aarx][rb] += signal_energy; - LOG_D(PHY,"slot %d symbol %d RB %d aarx %d n0_subband_power %d\n", slot, s, rb, aarx, signal_energy); + LOG_D(NR_PHY,"slot %d symbol %d RB %d aarx %d n0_subband_power %d\n", slot, s, rb, aarx, signal_energy); } //antenna } } //rb @@ -177,7 +177,7 @@ void gNB_I0_measurements(PHY_VARS_gNB *gNB, int slot, int first_symb, int num_sy n0_subband_tot_perPRB/=frame_parms->nb_antennas_rx; measurements->n0_subband_power_tot_dB[rb] = dB_fixed(n0_subband_tot_perPRB); measurements->n0_subband_power_tot_dBm[rb] = measurements->n0_subband_power_tot_dB[rb] - gNB->rx_total_gain_dB - dB_fixed(frame_parms->N_RB_UL); - LOG_D(PHY,"n0_subband_power_tot_dB[%d] => %d, over %d symbols\n",rb,measurements->n0_subband_power_tot_dB[rb],nb_symb[rb]); + LOG_D(NR_PHY,"n0_subband_power_tot_dB[%d] => %d, over %d symbols\n",rb,measurements->n0_subband_power_tot_dB[rb],nb_symb[rb]); n0_subband_tot += n0_subband_tot_perPRB; nb_rb++; } diff --git a/openair1/PHY/NR_TRANSPORT/pucch_rx.c b/openair1/PHY/NR_TRANSPORT/pucch_rx.c index cf322dfc51..084046cc38 100644 --- a/openair1/PHY/NR_TRANSPORT/pucch_rx.c +++ b/openair1/PHY/NR_TRANSPORT/pucch_rx.c @@ -1088,7 +1088,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, } } - pucch2_lev /= Prx * Prx * pucch_pdu->nr_of_symbols; + pucch2_lev /= Prx * pucch_pdu->nr_of_symbols; int pucch2_levdB = dB_fixed(pucch2_lev); int scaling = 0; if (pucch2_levdB > 72) @@ -1100,7 +1100,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, else if (pucch2_levdB > 54) scaling = 1; - LOG_D(PHY, + LOG_D(NR_PHY, "%d.%d Decoding pucch2 for %d symbols, %d PRB, nb_harq %d, nb_sr %d, nb_csi %d/%d, pucch2_lev %d dB (scaling %d)\n", frame, slot, @@ -1369,7 +1369,7 @@ void nr_decode_pucch2(PHY_VARS_gNB *gNB, int decoderState = 2; if (pucch2_levdB < gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10)) decoderState = 1; // assuming missed detection, only attempt to decode for polar case (with CRC) - LOG_D(PHY, "n0+thres %d decoderState %d\n", gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10), decoderState); + LOG_D(NR_PHY, "n0+thres %d decoderState %d\n", gNB->measurements.n0_subband_power_avg_dB + (gNB->pucch0_thres / 10), decoderState); if (nb_bit < 12 && decoderState == 2) { // short blocklength case simde__m256i *rp_re[Prx2][2]; simde__m256i *rp2_re[Prx2][2]; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 9817a0b2bb..359310050c 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -145,7 +145,7 @@ int main(int argc, char **argv) //unsigned char frame_type = 0; int loglvl=OAILOG_WARNING; int sr_flag = 0; - int pucch_DTX_thres = 50; + int pucch_DTX_thres = 0; cpuf = get_cpu_freq_GHz(); if ((uniqCfg = load_configmodule(argc, argv, CONFIG_ENABLECMDLINEONLY)) == 0) { From d156661ce3401c5934b5f4b71b00adfc3d771923 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Fri, 18 Oct 2024 16:25:18 +0200 Subject: [PATCH 4/4] CI: decrease test SNR for nr_pucchsim with 8 antennas --- cmake_targets/autotests/test_case_list.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 5afe683055..90ec5c7f24 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -330,7 +330,7 @@ -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 4 -s-10 -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