Merge remote-tracking branch 'origin/fix_sib19_reception' into integration_2025_w32 (!3548)

NR UE: fix reliable SIB19 reception when ntn-UlSyncValidityDuration-r17 expires

Fixes:
- gNB: fix scheduling of Rel-17 SIBs
- gNB: fix case in update_SIB1_NR_SI() when multiple Rel-17 SIBs would be defined
- NR UE: fix calculation of SI window expiry

Updating LEO scenario to test this
- set ntn-UlSyncValidityDuration-r17 to 5 seconds for LEO scenario
- NTN config: setting sib1_tda is not required anymore
This commit is contained in:
Jaroslava Fiedlerova
2025-08-04 16:18:08 +02:00
6 changed files with 22 additions and 36 deletions
@@ -16,7 +16,6 @@ gNBs =
////////// Physical parameters:
sib1_tda = 5;
min_rxtxtime = 6;
num_dlharq = 32;
num_ulharq = 32;
@@ -150,6 +149,8 @@ gNBs =
#ext2
#ntn_Config_r17
# This can be of values {s5, s10, s15, s20, s25, s30, s35, s40, s45, s50, s55, s60, s120, s180, s240, s900}
ntn-UlSyncValidityDuration-r17 = 5;
cellSpecificKoffset_r17 = 40;
ta-Common-r17 = 4627000; # 18.84 ms
ta-CommonDrift-r17 = -230000; # -46 µs/s
@@ -16,7 +16,6 @@ gNBs =
////////// Physical parameters:
sib1_tda = 5;
min_rxtxtime = 6;
disable_harq = 1;
cu_sibs = [2];
@@ -385,12 +385,14 @@ bool search_space_monitoring_ocasion_other_si(NR_UE_MAC_INST_t *mac,
return false;
}
bool is_window_valid(NR_UE_MAC_INST_t *mac, int window_slots, int abs_slot)
static bool is_window_valid(NR_UE_MAC_INST_t *mac, int window_slots, int abs_slot, int slots_per_frame)
{
if (mac->si_SchedInfo.si_window_start == -1) {
// out of window
return false;
} else if (abs_slot > mac->si_SchedInfo.si_window_start + window_slots) {
} else if ((abs_slot - mac->si_SchedInfo.si_window_start + MAX_FRAME_NUMBER * slots_per_frame)
% (MAX_FRAME_NUMBER * slots_per_frame)
>= window_slots) {
// window expired
mac->si_SchedInfo.si_window_start = -1;
return false;
@@ -407,33 +409,18 @@ static bool monitor_dci_for_other_SI(NR_UE_MAC_INST_t *mac,
{
// according to 5.2.2.3.2 in 331
const int abs_slot = frame * slots_per_frame + slot;
const si_schedinfo_config_t *config = mac->si_SchedInfo.si_SchedInfo_list.array[si_idx];
const int window_slots = 5 << mac->si_SchedInfo.si_WindowLength;
const int x = (config->si_WindowPosition - 1) * window_slots;
const int T = 8 << config->si_Periodicity; // radio frame periodicity
si_schedinfo_config_t *config = mac->si_SchedInfo.si_SchedInfo_list.array[si_idx];
int window_slots = 5 << mac->si_SchedInfo.si_WindowLength;
int x = (config->si_WindowPosition - 1) * window_slots;
int T = 8 << config->si_Periodicity; // radio frame periodicity
bool check_valid;
switch (config->type) {
case NR_SI_INFO :
if (mac->si_SchedInfo.si_window_start == -1) {
if ((frame % T) == (x / slots_per_frame) && (x % slots_per_frame == 0))
mac->si_SchedInfo.si_window_start = abs_slot; // in terms of absolute slot number
}
check_valid = is_window_valid(mac, window_slots, abs_slot);
if (check_valid && search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame))
return true;
break;
case NR_SI_INFO_v1700 :
if (mac->si_SchedInfo.si_window_start == -1) {
if ((frame % T == floor(x / slots_per_frame)) && (slot == x % slots_per_frame))
mac->si_SchedInfo.si_window_start = abs_slot;
}
if (is_window_valid(mac, window_slots, abs_slot))
return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame);
break;
default :
AssertFatal(false, "Invalid SI-SchedulingInfo case\n");
if (mac->si_SchedInfo.si_window_start == -1) {
if ((frame % T) == (x / slots_per_frame) && (slot == x % slots_per_frame))
mac->si_SchedInfo.si_window_start = abs_slot; // in terms of absolute slot number
}
if (is_window_valid(mac, window_slots, abs_slot, slots_per_frame))
return search_space_monitoring_ocasion_other_si(mac, ss, abs_slot, frame, slot, slots_per_frame);
return false;
}
@@ -310,6 +310,7 @@ void nr_ue_decode_BCCH_DL_SCH(NR_UE_MAC_INST_t *mac,
if (mac->get_otherSI[i])
mac->get_otherSI[i] = false;
}
mac->si_SchedInfo.si_window_start = -1;
T(T_NRUE_MAC_DL_PDU_WITH_DATA,
T_INT(SI_RNTI),
T_INT(-1 /* frame, unavailable here */),
@@ -775,7 +775,7 @@ static bool test_other_sib_sched_occasion(int window_pos,
int rel_frame,
int rel_slot)
{
int x = window_pos * window_len;
int x = (window_pos - 1) * window_len;
int T = 8 << period;
int test_frame = (frame - rel_frame) % MAX_FRAME_NUMBER;
int si_slot = (x % n_slots_frame) + rel_slot;
@@ -848,7 +848,7 @@ void schedule_nr_other_sib(module_id_t module_idP,
for (int ssb = 0; ssb < num_ssb; ssb++) {
for (int i = 0; i < schedInfo->schedulingInfoList.list.count; i++) {
NR_SchedulingInfo_t *schedulingInfo = schedInfo->schedulingInfoList.list.array[i];
if (test_other_sib_sched_occasion(i,
if (test_other_sib_sched_occasion(i + 1,
window_length_sl,
schedulingInfo->si_Periodicity,
n_slots_frame,
+3 -5
View File
@@ -2418,9 +2418,7 @@ void update_SIB1_NR_SI(NR_BCCH_DL_SCH_Message_t *sib1_bcch, int num_sibs, int si
schedulingInfo->si_BroadcastStatus = NR_SchedulingInfo__si_BroadcastStatus_broadcasting;
schedulingInfo->si_Periodicity = NR_SchedulingInfo__si_Periodicity_rf16;
bool reg_sib = false;
NR_SI_SchedulingInfo_v1700_t *si_schedulingInfo_v17 = NULL;
NR_SchedulingInfo2_r17_t *schedulingInfo2_r17 = NULL;
bool v17_sib = false;
for (int i = 0; i < num_sibs; i++) {
int sib_num = sibs[i];
AssertFatal(sib_num > 1 && sib_num < 21, "other SIB invalid type\n");
@@ -2438,8 +2436,7 @@ void update_SIB1_NR_SI(NR_BCCH_DL_SCH_Message_t *sib1_bcch, int num_sibs, int si
}
asn1cSeqAdd(&schedulingInfo->sib_MappingInfo.list, mapping);
} else {
if (v17_sib == false) {
si_schedulingInfo_v17 = calloc(1, sizeof(*si_schedulingInfo_v17));
if (schedulingInfo2_r17 == NULL) {
schedulingInfo2_r17 = calloc(1, sizeof(*schedulingInfo2_r17));
schedulingInfo2_r17->si_BroadcastStatus_r17 = NR_SchedulingInfo2_r17__si_BroadcastStatus_r17_broadcasting;
schedulingInfo2_r17->si_Periodicity_r17 = NR_SchedulingInfo2_r17__si_Periodicity_r17_rf16;
@@ -2458,7 +2455,8 @@ void update_SIB1_NR_SI(NR_BCCH_DL_SCH_Message_t *sib1_bcch, int num_sibs, int si
AssertFatal(reg_sib, "At least 1 SIB from SchedulingInfo (SIB2 to SIB14 included) needs to be present\n");
asn1cSeqAdd(&info->schedulingInfoList.list, schedulingInfo);
sib1->si_SchedulingInfo = info;
if (si_schedulingInfo_v17) {
if (schedulingInfo2_r17) {
NR_SI_SchedulingInfo_v1700_t *si_schedulingInfo_v17 = calloc_or_fail(1, sizeof(*si_schedulingInfo_v17));
asn1cSeqAdd(&si_schedulingInfo_v17->schedulingInfoList2_r17.list, schedulingInfo2_r17);
NR_SIB1_v1610_IEs_t *sib1_v1610 = NULL;
if (sib1->nonCriticalExtension)