Add Delay Mechanism for Initial MIB/SIB Transmission in gNB Scheduler

This commit introduces a delay mechanism for the first MIB/SIB transmission
in the gNB scheduler to allow PRACH noise estimate to converge stabilize
before first PRACH preamble reception.

Key changes:
- Added the `num_scheduled_prach_rx` variable to gNB_MAC_INST to keep track
  of total number scheduled of PRACH receptions. Using uint64_t type to avoid
  overflow.
- Updated the `gNB_dlsch_ulsch_scheduler` function to conditionally schedule
  MIB/SIB transmissions if `num_scheduled_prach_rx` is at least 100.
  The value comes from OAIs implementation of PRACH noise estimate.
This commit is contained in:
Bartosz Podrygajlo
2025-04-18 10:26:36 +02:00
parent f3eb713084
commit a3ef5293fb
7 changed files with 22 additions and 13 deletions
+9 -7
View File
@@ -212,14 +212,16 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP, frame_t frame, slot_t slo
nr_mac_update_timers(module_idP, frame, slot);
// This schedules MIB
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
if (gNB->num_scheduled_prach_rx >= NUM_PRACH_RX_FOR_NOISE_ESTIMATE || get_softmodem_params()->phy_test) {
// This schedules MIB
schedule_nr_mib(module_idP, frame, slot, &sched_info->DL_req);
// This schedules SIB1
// SIB19 will be scheduled if ntn_Config_r17 is initialized
if (IS_SA_MODE(get_softmodem_params())) {
schedule_nr_sib1(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
schedule_nr_other_sib(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
// This schedules SIB1
// SIB19 will be scheduled if ntn_Config_r17 is initialized
if (IS_SA_MODE(get_softmodem_params())) {
schedule_nr_sib1(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
schedule_nr_other_sib(module_idP, frame, slot, &sched_info->DL_req, &sched_info->TX_req);
}
}
// This schedule PRACH if we are not in phy_test mode
@@ -430,6 +430,7 @@ void schedule_nr_prach(module_id_t module_idP, frame_t frameP, slot_t slotP)
}
}
if(td_index == 0) {
gNB->num_scheduled_prach_rx++;
AssertFatal(UL_tti_req->n_pdus < sizeof(UL_tti_req->pdus_list) / sizeof(UL_tti_req->pdus_list[0]),
"Invalid UL_tti_req->n_pdus %d\n", UL_tti_req->n_pdus);
+1
View File
@@ -275,6 +275,7 @@ void mac_top_init_gNB(ngran_node_t node_type,
RC.nrmac[i]->common_channels[0].pre_ServingCellConfig = scd;
RC.nrmac[i]->first_MIB = true;
RC.nrmac[i]->num_scheduled_prach_rx = 0;
RC.nrmac[i]->common_channels[0].mib = get_new_MIB_NR(scc);
RC.nrmac[i]->cset0_bwp_start = 0;
+1 -1
View File
@@ -936,7 +936,7 @@ typedef struct gNB_MAC_INST_s {
pthread_mutex_t sched_lock;
mac_stats_t mac_stats;
uint64_t num_scheduled_prach_rx;
} gNB_MAC_INST;
#endif /*__LAYER2_NR_MAC_GNB_H__ */