fixing counter of trashed frames for two frames synchronization
This commit is contained in:
@@ -592,6 +592,10 @@ void *UE_thread(void *arg) {
|
|||||||
// and we shifted above to the first slot of next frame
|
// and we shifted above to the first slot of next frame
|
||||||
// the synch thread proc context is hard linked to regular processing thread context, thread id = 0
|
// the synch thread proc context is hard linked to regular processing thread context, thread id = 0
|
||||||
UE_nr_rxtx_proc_t *proc=&(((processingData_t *)NotifiedFifoData(processingMsg[0]))->proc);
|
UE_nr_rxtx_proc_t *proc=&(((processingData_t *)NotifiedFifoData(processingMsg[0]))->proc);
|
||||||
|
// synchronization is on two frame basis
|
||||||
|
// if it succeeds on the first frame the second one needs to be considered as trashed
|
||||||
|
if(!UE->is_synchronized_on_frame)
|
||||||
|
trashed_frames++;
|
||||||
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
|
// shift the frame index with all the frames we trashed meanwhile we perform the synch search
|
||||||
proc->decoded_frame_rx=(proc->decoded_frame_rx + trashed_frames) % MAX_FRAME_NUMBER;
|
proc->decoded_frame_rx=(proc->decoded_frame_rx + trashed_frames) % MAX_FRAME_NUMBER;
|
||||||
decoded_frame_rx=proc->decoded_frame_rx;
|
decoded_frame_rx=proc->decoded_frame_rx;
|
||||||
|
|||||||
@@ -208,6 +208,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode)
|
|||||||
int32_t metric_tdd_ncp=0;
|
int32_t metric_tdd_ncp=0;
|
||||||
uint8_t phase_tdd_ncp;
|
uint8_t phase_tdd_ncp;
|
||||||
double im, re;
|
double im, re;
|
||||||
|
int is;
|
||||||
|
|
||||||
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
NR_DL_FRAME_PARMS *fp = &ue->frame_parms;
|
||||||
int ret=-1;
|
int ret=-1;
|
||||||
@@ -242,7 +243,7 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode)
|
|||||||
cnt =0;
|
cnt =0;
|
||||||
|
|
||||||
// initial sync performed on two successive frames, if pbch passes on first frame, no need to process second frame
|
// initial sync performed on two successive frames, if pbch passes on first frame, no need to process second frame
|
||||||
for(int is=0; is<2;is++) {
|
for(is=0; is<2;is++) {
|
||||||
|
|
||||||
/* process pss search on received buffer */
|
/* process pss search on received buffer */
|
||||||
sync_pos = pss_synchro_nr(ue, is, NO_RATE_CHANGE);
|
sync_pos = pss_synchro_nr(ue, is, NO_RATE_CHANGE);
|
||||||
@@ -372,6 +373,8 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, runmode_t mode)
|
|||||||
#endif
|
#endif
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
ue->is_synchronized_on_frame = is; // to notify on which of the two frames sync was successful
|
||||||
|
|
||||||
if (ue->UE_scan_carrier == 0) {
|
if (ue->UE_scan_carrier == 0) {
|
||||||
|
|
||||||
#if UE_AUTOTEST_TRACE
|
#if UE_AUTOTEST_TRACE
|
||||||
|
|||||||
@@ -878,8 +878,10 @@ typedef struct {
|
|||||||
int UE_scan_carrier;
|
int UE_scan_carrier;
|
||||||
/// \brief Indicator that UE should enable estimation and compensation of frequency offset
|
/// \brief Indicator that UE should enable estimation and compensation of frequency offset
|
||||||
int UE_fo_compensation;
|
int UE_fo_compensation;
|
||||||
/// \brief Indicator that UE is synchronized to an eNB
|
/// \brief Indicator that UE is synchronized to a gNB
|
||||||
int is_synchronized;
|
int is_synchronized;
|
||||||
|
/// \brief Indicates on which frame is synchronized in a two frame synchronization
|
||||||
|
int is_synchronized_on_frame;
|
||||||
/// Data structure for UE process scheduling
|
/// Data structure for UE process scheduling
|
||||||
UE_nr_proc_t proc;
|
UE_nr_proc_t proc;
|
||||||
/// Flag to indicate the UE shouldn't do timing correction at all
|
/// Flag to indicate the UE shouldn't do timing correction at all
|
||||||
|
|||||||
Reference in New Issue
Block a user