Commit 88a6a92c authored by Hongzhi Wang's avatar Hongzhi Wang

bug fix adjust sync

parent ec060cbc
...@@ -80,8 +80,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, ...@@ -80,8 +80,6 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
// do not filter to have proactive timing adjustment // do not filter to have proactive timing adjustment
//max_pos_fil = max_pos; //max_pos_fil = max_pos;
if(subframe == 0)
{
diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3); diff = max_pos_fil - (frame_parms->nb_prefix_samples>>3);
if ( abs(diff) < SYNCH_HYST ) if ( abs(diff) < SYNCH_HYST )
...@@ -135,5 +133,5 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms, ...@@ -135,5 +133,5 @@ void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
#endif //DEBUG_PHY #endif //DEBUG_PHY
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_ADJUST_SYNCH, VCD_FUNCTION_OUT);
}
} }
...@@ -445,7 +445,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -445,7 +445,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
assert(0); assert(0);
} }
if( symbol == 3) if ( symbol == (ue->symbol_offset+1)%(ue->frame_parms.symbols_per_slot))
{ {
// do ifft of channel estimate // do ifft of channel estimate
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++)
......
...@@ -241,7 +241,7 @@ void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue, ...@@ -241,7 +241,7 @@ void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier; unsigned int ssb_offset = ue->frame_parms.first_carrier_offset + ue->frame_parms.ssb_start_subcarrier;
if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size; if (ssb_offset>= ue->frame_parms.ofdm_symbol_size) ssb_offset-=ue->frame_parms.ofdm_symbol_size;
symbol_offset = ue->frame_parms.ofdm_symbol_size*(ue->symbol_offset+1); symbol_offset = ue->frame_parms.ofdm_symbol_size*((ue->symbol_offset+1)%(ue->frame_parms.symbols_per_slot));
ue->measurements.rsrp[eNB_offset] = 0; ue->measurements.rsrp[eNB_offset] = 0;
......
...@@ -1707,7 +1707,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1707,7 +1707,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
int frame_rx = proc->frame_rx; int frame_rx = proc->frame_rx;
int nr_tti_rx = proc->nr_tti_rx; int nr_tti_rx = proc->nr_tti_rx;
int slot_pbch; int slot_pbch;
//int slot_ssb; int slot_ssb;
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][0]; NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][0];
fapi_nr_config_request_t *cfg = &ue->nrUE_config; fapi_nr_config_request_t *cfg = &ue->nrUE_config;
...@@ -1733,10 +1733,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1733,10 +1733,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
get_coreset_rballoc(pdcch_vars->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb); get_coreset_rballoc(pdcch_vars->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
slot_pbch = is_pbch_in_slot(cfg, frame_rx, nr_tti_rx, fp); slot_pbch = is_pbch_in_slot(cfg, frame_rx, nr_tti_rx, fp);
//slot_ssb = is_ssb_in_slot(cfg, frame_rx, nr_tti_rx, fp); slot_ssb = is_ssb_in_slot(cfg, frame_rx, nr_tti_rx, fp);
// looking for pbch only in slot where it is supposed to be // looking for pbch only in slot where it is supposed to be
if ((ue->decode_MIB == 1) && slot_pbch) if (slot_ssb)
{ {
LOG_D(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx); LOG_D(PHY," ------ PBCH ChannelComp/LLR: frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
for (int i=1; i<4; i++) { for (int i=1; i<4; i++) {
...@@ -1761,10 +1761,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1761,10 +1761,12 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
nr_ue_rsrp_measurements(ue,nr_tti_rx,0); nr_ue_rsrp_measurements(ue,nr_tti_rx,0);
//} //}
if ((ue->decode_MIB == 1) && slot_pbch)
{
nr_ue_pbch_procedures(gNB_id, ue, proc, 0); nr_ue_pbch_procedures(gNB_id, ue, proc, 0);
if (ue->no_timing_correction==0) { if (ue->no_timing_correction==0)
{
LOG_D(PHY,"start adjust sync slot = %d no timing %d\n", nr_tti_rx, ue->no_timing_correction); LOG_D(PHY,"start adjust sync slot = %d no timing %d\n", nr_tti_rx, ue->no_timing_correction);
nr_adjust_synch_ue(fp, nr_adjust_synch_ue(fp,
ue, ue,
...@@ -1776,6 +1778,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1776,6 +1778,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
} }
} }
}
#ifdef NR_PDCCH_SCHED #ifdef NR_PDCCH_SCHED
nr_gold_pdcch(ue, 0, 2); nr_gold_pdcch(ue, 0, 2);
......
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