coarse-cleaning-pss-sss
This commit is contained in:
@@ -37,12 +37,6 @@
|
||||
|
||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||
|
||||
#ifdef DEFINE_VARIABLES_PSS_NR_H
|
||||
#define EXTERN
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************** CODE GENERATION ***********************************/
|
||||
|
||||
//#define PSS_DECIMATOR /* decimation of sample is done between time correlation */
|
||||
@@ -81,55 +75,10 @@
|
||||
#define SYNC_TMP_SIZE (NB_ANTENNAS_RX*SYNCHRO_FFT_SIZE_MAX*IQ_SIZE) /* to be aligned with existing lte synchro */
|
||||
#define SYNCF_TMP_SIZE (SYNCHRO_FFT_SIZE_MAX*IQ_SIZE)
|
||||
|
||||
/************* STRUCTURES *****************************************/
|
||||
|
||||
|
||||
/************** VARIABLES *****************************************/
|
||||
|
||||
//#define STATIC_SYNC_BUFFER
|
||||
|
||||
#ifdef STATIC_SYNC_BUFFER
|
||||
/* buffer defined in file lte_sync_time */
|
||||
EXTERN int16_t synchro_tmp[SYNC_TMP_SIZE] __attribute__((aligned(32)));
|
||||
EXTERN int16_t synchroF_tmp[SYNCF_TMP_SIZE] __attribute__((aligned(32)));
|
||||
#else
|
||||
EXTERN int16_t *synchro_tmp;
|
||||
EXTERN int16_t *synchroF_tmp;
|
||||
#endif
|
||||
|
||||
EXTERN int16_t *primary_synchro_nr[NUMBER_PSS_SEQUENCE]
|
||||
#ifdef INIT_VARIABLES_PSS_NR_H
|
||||
= { NULL, NULL, NULL}
|
||||
#endif
|
||||
;
|
||||
EXTERN int16_t *primary_synchro_nr2[NUMBER_PSS_SEQUENCE]
|
||||
#ifdef INIT_VARIABLES_PSS_NR_H
|
||||
= { NULL, NULL, NULL}
|
||||
#endif
|
||||
;
|
||||
EXTERN int16_t *primary_synchro_time_nr[NUMBER_PSS_SEQUENCE]
|
||||
#ifdef INIT_VARIABLES_PSS_NR_H
|
||||
= { NULL, NULL, NULL}
|
||||
#endif
|
||||
;
|
||||
|
||||
/* profiling structure */
|
||||
EXTERN time_stats_t generic_time[TIME_LAST];
|
||||
|
||||
#ifndef DEFINE_HEADER_ONLY
|
||||
|
||||
/************** FUNCTION ******************************************/
|
||||
|
||||
void init_context_synchro_nr(NR_DL_FRAME_PARMS *frame_parms_ue);
|
||||
void free_context_synchro_nr(void);
|
||||
void init_context_pss_nr(NR_DL_FRAME_PARMS *frame_parms_ue);
|
||||
void free_context_pss_nr(void);
|
||||
int set_pss_nr(int ofdm_symbol_size);
|
||||
int pss_synchro_nr(PHY_VARS_NR_UE *PHY_vars_UE, int is, int rate_change);
|
||||
int pss_search_time_nr(c16_t **rxdata, PHY_VARS_NR_UE *ue, int fo_flag, int is);
|
||||
|
||||
#endif
|
||||
#undef EXTERN
|
||||
int16_t *get_primary_synchro_nr2(const int nid2);
|
||||
|
||||
#endif /* PSS_NR_H */
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
#define NB_SYMBOLS_PBCH (3)
|
||||
#define NR_N_SYMBOLS_SSB (4)
|
||||
|
||||
#define IQ_SIZE (sizeof(int16_t) * 2) /* I and Q are alternatively stored into buffers */
|
||||
#define IQ_SIZE sizeof(c16_t) /* I and Q are alternatively stored into buffers */
|
||||
#define N_SYMB_SLOT (14)
|
||||
|
||||
/* SS/PBCH parameters : see from TS 38.211 table 7.4.3.1-1: Resources within an SS/PBCH block for PSS... */
|
||||
|
||||
@@ -38,13 +38,6 @@
|
||||
|
||||
#include "pss_nr.h"
|
||||
|
||||
#ifdef DEFINE_VARIABLES_SSS_NR_H
|
||||
#define EXTERN
|
||||
#define INIT_VARIABLES_SSS_NR_H
|
||||
#else
|
||||
#define EXTERN extern
|
||||
#endif
|
||||
|
||||
/************** DEFINE ********************************************/
|
||||
|
||||
#define SAMPLES_IQ (sizeof(int16_t)*2)
|
||||
@@ -64,26 +57,7 @@
|
||||
/************** VARIABLES *****************************************/
|
||||
|
||||
#define PHASE_HYPOTHESIS_NUMBER (16)
|
||||
#define INDEX_NO_PHASE_DIFFERENCE (3) /* this is for no phase shift case */
|
||||
|
||||
EXTERN const int16_t phase_re_nr[PHASE_HYPOTHESIS_NUMBER]
|
||||
#ifdef INIT_VARIABLES_SSS_NR_H
|
||||
// -pi/3 ---- pi/3
|
||||
= {16384,20173,23571,26509,28932,30791,32051,32687,32687,32051,30791,
|
||||
28932,26509,23571,20173,16384}
|
||||
#endif
|
||||
;
|
||||
|
||||
EXTERN const int16_t phase_im_nr[PHASE_HYPOTHESIS_NUMBER]
|
||||
#ifdef INIT_VARIABLES_SSS_NR_H
|
||||
// -pi/3 ---- pi/3
|
||||
= {-28377,-25821,-22762,-19260,-15383,-11207,-6813,-2286,2286,6813,11207,
|
||||
15383,19260,22762,25821,28377}
|
||||
#endif
|
||||
;
|
||||
|
||||
EXTERN int16_t d_sss[N_ID_2_NUMBER][N_ID_1_NUMBER][LENGTH_SSS_NR];
|
||||
|
||||
#define INDEX_NO_PHASE_DIFFERENCE (3) /* this is for no phase shift case */
|
||||
/************** FUNCTION ******************************************/
|
||||
|
||||
void init_context_sss_nr(int amp);
|
||||
@@ -92,14 +66,11 @@ void free_context_sss_nr(void);
|
||||
void insert_sss_nr(int16_t *sss_time,
|
||||
NR_DL_FRAME_PARMS *frame_parms);
|
||||
|
||||
int pss_ch_est_nr(PHY_VARS_NR_UE *ue,
|
||||
int32_t pss_ext[NB_ANTENNAS_RX][LENGTH_PSS_NR],
|
||||
int32_t sss_ext[NB_ANTENNAS_RX][LENGTH_SSS_NR]);
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int32_t *tot_metric, uint8_t *phase_max, int *freq_offset_sss, c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
|
||||
#undef INIT_VARIABLES_SSS_NR_H
|
||||
#undef EXTERN
|
||||
|
||||
int rx_sss_nr(PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
int32_t *tot_metric,
|
||||
uint8_t *phase_max,
|
||||
int *freq_offset_sss,
|
||||
c16_t rxdataF[][ue->frame_parms.samples_per_slot_wCP]);
|
||||
#endif /* SSS_NR_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user