From a6f03b3f798b91ee0520c8f4722851408fa51188 Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 9 Oct 2024 08:57:40 +0200 Subject: [PATCH] ULSCH scheduler fix when using transform precoding Bug in ULSCH scheduler for transform precoding. It ignores transform precoding specific tables when building ul_pf_tbs. --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c index cb233eae1b..218fdbb0c1 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c @@ -1754,7 +1754,7 @@ static bool allocate_ul_retransmission(gNB_MAC_INST *nrmac, return true; } -uint32_t ul_pf_tbs[3][29]; // pre-computed, approximate TBS values for PF coefficient +uint32_t ul_pf_tbs[5][29]; // pre-computed, approximate TBS values for PF coefficient typedef struct UEsched_s { float coef; NR_UE_info_t * UE; @@ -2221,11 +2221,11 @@ nr_pp_impl_ul nr_init_fr1_ulsch_preprocessor(int CC_id) * which should approximately(!) give us the TBsize. In particular, the * number of symbols, the number of DMRS symbols, and the exact Qm and R, are * not correct*/ - for (int mcsTableIdx = 0; mcsTableIdx < 3; ++mcsTableIdx) { + for (int mcsTableIdx = 0; mcsTableIdx < 5; ++mcsTableIdx) { for (int mcs = 0; mcs < 29; ++mcs) { - if (mcs > 27 && mcsTableIdx == 1) + if (mcs > 27 && (mcsTableIdx == 1 || mcsTableIdx == 3 || mcsTableIdx == 4)) continue; - const uint8_t Qm = nr_get_Qm_dl(mcs, mcsTableIdx); + const uint8_t Qm = nr_get_Qm_ul(mcs, mcsTableIdx); const uint16_t R = nr_get_code_rate_ul(mcs, mcsTableIdx); /* note: we do not update R/Qm based on low MCS or pi2BPSK */ ul_pf_tbs[mcsTableIdx][mcs] = nr_compute_tbs(Qm,