Commit 756c20c0 authored by Francesco Mani's avatar Francesco Mani

tentative fix for delayed RA procedure at UE

parent ecdd7a7f
...@@ -33,12 +33,12 @@ ...@@ -33,12 +33,12 @@
// last channel estimate of the receiver // last channel estimate of the receiver
void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
PHY_VARS_NR_UE *ue, PHY_VARS_NR_UE *ue,
module_id_t gNB_id, module_id_t gNB_id,
uint8_t frame, uint8_t frame,
uint8_t subframe, uint8_t subframe,
unsigned char clear, unsigned char clear,
short coef) short coef)
{ {
static int max_pos_fil = 0; static int max_pos_fil = 0;
......
...@@ -228,7 +228,7 @@ typedef struct { ...@@ -228,7 +228,7 @@ typedef struct {
/// Pointer to Msg3 payload for UL-grant /// Pointer to Msg3 payload for UL-grant
uint8_t *Msg3; uint8_t *Msg3;
/// Frame of last completed synch /// Frame of last completed synch
uint8_t sync_frame; uint16_t sync_frame;
/// Flag to indicate that prach is ready to start: it is enabled with an initial delay after the sync /// Flag to indicate that prach is ready to start: it is enabled with an initial delay after the sync
uint8_t init_msg1; uint8_t init_msg1;
} NR_PRACH_RESOURCES_t; } NR_PRACH_RESOURCES_t;
......
...@@ -311,7 +311,6 @@ void nr_ue_pbch_procedures(uint8_t gNB_id, ...@@ -311,7 +311,6 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
{ {
// int i; // int i;
//int pbch_tx_ant=0; //int pbch_tx_ant=0;
//uint8_t pbch_phase;
int ret = 0; int ret = 0;
//static uint8_t first_run = 1; //static uint8_t first_run = 1;
//uint8_t pbch_trials = 0; //uint8_t pbch_trials = 0;
...@@ -323,7 +322,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id, ...@@ -323,7 +322,7 @@ void nr_ue_pbch_procedures(uint8_t gNB_id,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_PBCH_PROCEDURES, VCD_FUNCTION_IN);
//LOG_I(PHY,"[UE %d] Frame %d, Trying PBCH %d (NidCell %d, gNB_id %d)\n",ue->Mod_id,frame_rx,pbch_phase,ue->frame_parms.Nid_cell,gNB_id); LOG_D(PHY,"[UE %d] Frame %d, Trying PBCH (NidCell %d, gNB_id %d)\n",ue->Mod_id,frame_rx,ue->frame_parms.Nid_cell,gNB_id);
ret = nr_rx_pbch(ue, proc, ret = nr_rx_pbch(ue, proc,
ue->pbch_vars[gNB_id], ue->pbch_vars[gNB_id],
...@@ -2166,7 +2165,7 @@ void nr_ue_prach_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, uint8_t ...@@ -2166,7 +2165,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); 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) % MAX_FRAME_NUMBER)){ if (!prach_resources->init_msg1 && ((MAX_FRAME_NUMBER+frame_tx-ue->prach_resources[gNB_id]->sync_frame)% MAX_FRAME_NUMBER)>150){
ue->prach_cnt = 0; ue->prach_cnt = 0;
prach_resources->init_msg1 = 1; prach_resources->init_msg1 = 1;
} }
......
...@@ -147,7 +147,7 @@ void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t ...@@ -147,7 +147,7 @@ void compute_csi_bitlen (NR_CellGroupConfig_t *secondaryCellGroup, NR_UE_info_t
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen =0; UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen =0;
} }
LOG_I (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d", LOG_I (MAC, "UCI: CSI_bit len : ssbri %d, rsrp: %d, diff_rsrp: %d\n",
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].cri_ssbri_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].cri_ssbri_bitlen,
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].rsrp_bitlen, UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].rsrp_bitlen,
UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen); UE_info->csi_report_template[UE_id][csi_report_id].CSI_report_bitlen[0].diff_rsrp_bitlen);
......
...@@ -415,6 +415,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP, ...@@ -415,6 +415,7 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
"reset RA state information for RA-RNTI %04x/index %d\n", "reset RA state information for RA-RNTI %04x/index %d\n",
ra->rnti, ra->rnti,
i); i);
return; return;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment