From bd6180e362e5c0d89c6790f04123a8dc274d22d7 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Fri, 22 Aug 2025 17:13:50 +0200 Subject: [PATCH] UL TDA: ensure we reach Msg3 in all cases In at least the case of mu=1, min_rxtxtime=2 and DDDSU with no UL symbols (for ULSCH) in the mixed slot, the current state of code does not allow a UE to attach. This is because at mu=1, Msg3 is k2+delta, where k2=min_rxtxtime and delta(mu)=3. Prior, this special case was handled because we had a dedicated Msg3 TDA, which in most cases is not necessary (because the mixed slot allocates the DCI, and the following mixed slot has the UL grant). Add code that tries to ensure that we only add the Msg3 TDA in cases when we need it. Fixes: 961a646dc756 ("Remove dedicated Msg3 TDA") --- openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c index 435ec2b6e8..6b808eebfa 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c +++ b/openair2/LAYER2/NR_MAC_gNB/nr_radio_config.c @@ -1115,6 +1115,7 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i int N_dl1 = p1->nrofDownlinkSlots; int N_ul1 = p1->nrofUplinkSlots; + int N_dl2 = p2 ? p2->nrofDownlinkSlots : 0; int N_ul2 = p2 ? p2->nrofUplinkSlots : 0; int tdd_period_idx = get_tdd_period_idx(scc->tdd_UL_DL_ConfigurationCommon); int nb_periods_per_frame = get_nb_periods_per_frame(tdd_period_idx); @@ -1155,6 +1156,22 @@ void nr_rrc_config_ul_tda(NR_ServingCellConfigCommon_t *scc, int min_fb_delay, i } } } + + // for Msg3, an additional get_delta_for_k2(mu) is added to k2. + // check that any UL slot is reachable under this condition + // the below is designed to only hit specific (known) cases + // examples: DDDSU (no TDA in S), + int N_dl = max(N_dl1, N_dl2); + int delta = get_delta_for_k2(mu); + int k2_msg3 = k2 + delta; + if (nb_slots_per_period % k2_msg3 == 0 /* see example above */ + && k2_msg3 > N_dl /* otherwise, can always have a D that reaches U */ + && k2_msg3 > N_ul /* otherwise, can always have a D that reaches U */ + && !has_ul_mixed /* if mixed slot, even for DDDSU would reach */) { + /* reach next UL from mixed slot in previous period */ + tda = set_TimeDomainResourceAllocation(k2_msg3, get_SLIV(0, 13)); + asn1cSeqAdd(&tda_list->list, tda); + } } AssertFatal(tda_list->list.count <= 16, "cannot reach all UL slots with current TDD configuration\n");