diff --git a/openair1/PHY/MODULATION/modulation_UE.h b/openair1/PHY/MODULATION/modulation_UE.h index 20fdaa7ad84f0fef7433432c7ac0c847f9fd1f99..6ed10a8c77c3cf355235500d93ed10a175646f9b 100644 --- a/openair1/PHY/MODULATION/modulation_UE.h +++ b/openair1/PHY/MODULATION/modulation_UE.h @@ -57,7 +57,8 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, unsigned char symbol, unsigned char Ns, - int sample_offset); + int sample_offset, + bool pbch_decoded); int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, unsigned char l, diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index 71be5ba6ed843232ca948f92eed66cb92b9e6e2f..a811850ff70a61516c158adac40e0f6f75203820 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -150,7 +150,8 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, unsigned char symbol, unsigned char Ns, - int sample_offset) + int sample_offset, + bool pbch_decoded) { NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; NR_UE_COMMON *common_vars = &ue->common_vars; @@ -160,7 +161,7 @@ int nr_slot_fep_init_sync(PHY_VARS_NR_UE *ue, unsigned int nb_prefix_samples; unsigned int nb_prefix_samples0; - if (ue->is_synchronized) { + if (pbch_decoded) { nb_prefix_samples = frame_parms->nb_prefix_samples; nb_prefix_samples0 = frame_parms->nb_prefix_samples0; } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c index 80648a7ffc5d3e66642241f110a73b4e6011d369..efaf386fe1e7cfe53efa5981073a072503cee33a 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c @@ -298,7 +298,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, proc, i, 0, - is*fp->samples_per_frame+ue->ssb_offset); + is*fp->samples_per_frame+ue->ssb_offset, + false); #ifdef DEBUG_INITIAL_SYNCH LOG_I(PHY,"Calling sss detection (normal CP)\n"); @@ -339,6 +340,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, } if (ret == 0) { + // sync at symbol ue->symbol_offset // computing the offset wrt the beginning of the frame int mu = fp->numerology_index; @@ -543,7 +545,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, proc, l, // the UE PHY has no notion of the symbols to be monitored in the search space phy_pdcch_config.slot, - is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset); + is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset, + true); nr_pdcch_channel_estimation(ue, proc, @@ -571,7 +574,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, proc, m, phy_pdcch_config.slot, // same slot and offset as pdcch - is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset); + is*fp->samples_per_frame+phy_pdcch_config.sfn*fp->samples_per_frame+ue->rx_offset, + true); } int ret = nr_ue_pdsch_procedures(ue, diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 3bde23484932d57b696903ac71579e6e573ce458..4334525637e9d56b62782129f4a8d02ad951d4f7 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -512,7 +512,6 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP, int nr_dl_slots = n; int nr_ulstart_slot = 0; if (tdd) { - nr_ulstart_slot = tdd->nrofDownlinkSlots + (tdd->nrofUplinkSymbols == 0); nr_dl_slots = tdd->nrofDownlinkSlots + (tdd->nrofDownlinkSymbols != 0); nr_ulstart_slot = tdd->nrofDownlinkSlots; nr_slots_period /= get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity);