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:
@@ -120,7 +120,8 @@ void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
*/
|
||||
|
||||
if (eNB->frame_parms.prach_emtc_config_common.prach_ConfigInfo.prach_CElevel_enable[0] == 1) {
|
||||
if ((eNB->prach_energy_counter == 100) && (max_preamble_energy[0] > eNB->measurements.prach_I0 + eNB->prach_DTX_threshold_emtc[0])) {
|
||||
if ((eNB->prach_energy_counter == NUM_PRACH_RX_FOR_NOISE_ESTIMATE)
|
||||
&& (max_preamble_energy[0] > eNB->measurements.prach_I0 + eNB->prach_DTX_threshold_emtc[0])) {
|
||||
eNB->UL_INFO.rach_ind_br.rach_indication_body.number_of_preambles++;
|
||||
eNB->preamble_list_br[ind].preamble_rel8.timing_advance = max_preamble_delay[ind]; //
|
||||
eNB->preamble_list_br[ind].preamble_rel8.preamble = max_preamble[ind];
|
||||
@@ -142,7 +143,7 @@ void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
}
|
||||
} */// ce_level
|
||||
} else {
|
||||
if ((eNB->prach_energy_counter == 100) &&
|
||||
if ((eNB->prach_energy_counter == NUM_PRACH_RX_FOR_NOISE_ESTIMATE) &&
|
||||
(max_preamble_energy[0] > eNB->measurements.prach_I0+eNB->prach_DTX_threshold)) {
|
||||
LOG_D(PHY,"[eNB %d/%d][RAPROC] Frame %d, subframe %d Initiating RA procedure with preamble %d, energy %d.%d dB, delay %d\n",
|
||||
eNB->Mod_id,
|
||||
@@ -186,7 +187,8 @@ void prach_procedures(PHY_VARS_eNB *eNB,
|
||||
|
||||
if (frame==0) LOG_D(PHY,"prach_I0 = %d.%d dB\n",eNB->measurements.prach_I0/10,eNB->measurements.prach_I0%10);
|
||||
|
||||
if (eNB->prach_energy_counter < 100) eNB->prach_energy_counter++;
|
||||
if (eNB->prach_energy_counter < NUM_PRACH_RX_FOR_NOISE_ESTIMATE)
|
||||
eNB->prach_energy_counter++;
|
||||
}
|
||||
} // else br_flag
|
||||
|
||||
|
||||
@@ -145,7 +145,8 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_rac
|
||||
max_preamble_delay[0],
|
||||
gNB->prach_energy_counter);
|
||||
|
||||
if ((gNB->prach_energy_counter == 100) && (max_preamble_energy[0] > gNB->measurements.prach_I0 + gNB->prach_thres)
|
||||
if ((gNB->prach_energy_counter == NUM_PRACH_RX_FOR_NOISE_ESTIMATE)
|
||||
&& (max_preamble_energy[0] > gNB->measurements.prach_I0 + gNB->prach_thres)
|
||||
&& (rach_ind->number_of_pdus < MAX_NUM_NR_RX_RACH_PDUS)) {
|
||||
LOG_A(NR_PHY,
|
||||
"[RAPROC] %d.%d Initiating RA procedure with preamble %d, energy %d.%d dB (I0 %d, thres %d), delay %d start symbol "
|
||||
@@ -185,7 +186,8 @@ void L1_nr_prach_procedures(PHY_VARS_gNB *gNB, int frame, int slot, nfapi_nr_rac
|
||||
}
|
||||
gNB->measurements.prach_I0 = ((gNB->measurements.prach_I0*900)>>10) + ((max_preamble_energy[0]*124)>>10);
|
||||
if (frame==0) LOG_I(PHY,"prach_I0 = %d.%d dB\n",gNB->measurements.prach_I0/10,gNB->measurements.prach_I0%10);
|
||||
if (gNB->prach_energy_counter < 100) gNB->prach_energy_counter++;
|
||||
if (gNB->prach_energy_counter < NUM_PRACH_RX_FOR_NOISE_ESTIMATE)
|
||||
gNB->prach_energy_counter++;
|
||||
} //if prach_id>0
|
||||
rach_ind->slot = prach_start_slot;
|
||||
} // for NUMBER_OF_NR_PRACH_OCCASION_MAX
|
||||
|
||||
Reference in New Issue
Block a user