/** * * \section COPYRIGHT * * Copyright 2013-2020 Software Radio Systems Limited * * By using this file, you agree to the terms and conditions set * forth in the LICENSE file which can be found at the top level of * the distribution. * */ /****************************************************************************** * File: psss.h * * Description: Primary sidelink synchronization signal (PSSS) generation and detection. * * * Reference: 3GPP TS 36.211 version 15.6.0 Release 15 Sec. 9.7.1 *****************************************************************************/ #ifndef SRSLTE_PSSS_H #define SRSLTE_PSSS_H #include #include #include "srslte/config.h" #include "srslte/phy/common/phy_common.h" #include "srslte/phy/dft/dft.h" #define SRSLTE_PSSS_LEN 62 typedef struct SRSLTE_API { cf_t psss_signal[2][SRSLTE_PSSS_LEN]; // One sequence for each N_id_2 cf_t** psss_sf_freq; cf_t* input_pad_freq; cf_t* input_pad_time; cf_t* dot_prod_output; cf_t* dot_prod_output_time; cf_t* shifted_output; float* shifted_output_abs; int32_t corr_peak_pos; float corr_peak_value; uint32_t N_id_2; srslte_dft_plan_t plan_input; srslte_dft_plan_t plan_out; } srslte_psss_t; SRSLTE_API int srslte_psss_init(srslte_psss_t* q, uint32_t nof_prb, srslte_cp_t cp); SRSLTE_API int srslte_psss_generate(cf_t* psss_signal, uint32_t N_id_2); SRSLTE_API void srslte_psss_put_sf_buffer(cf_t* psss_signal, cf_t* sf_buffer, uint32_t nof_prb, srslte_cp_t cp); SRSLTE_API int srslte_psss_find(srslte_psss_t* q, cf_t* input, uint32_t nof_prb, srslte_cp_t cp); SRSLTE_API void srslte_psss_free(srslte_psss_t* q); #endif // SRSLTE_PSSS_H