fix message 1 frame number calculation on NR UE
UE initiates the RA procedure with sending message 1 via PRACH 150 frames after synchronizing with the gNB. As the frame numbers wrap at 1024, we have to calculate the frame number for message 1 using modulo calculation.
This commit is contained in:
@@ -2077,7 +2077,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX_PRACH, VCD_FUNCTION_IN);
|
||||
|
||||
if (!prach_resources->init_msg1 && (frame_tx > ue->prach_resources[gNB_id]->sync_frame + 150)){
|
||||
if (!prach_resources->init_msg1 && (frame_tx == (ue->prach_resources[gNB_id]->sync_frame + 150) % MAX_FRAME_NUMBER)){
|
||||
ue->prach_cnt = 0;
|
||||
prach_resources->init_msg1 = 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user