mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
2.8 KiB
C
100 lines
2.8 KiB
C
5 years ago
|
/*
|
||
|
* Copyright 2013-2019 Software Radio Systems Limited
|
||
|
*
|
||
|
* This file is part of srsLTE.
|
||
|
*
|
||
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
|
* srsLTE is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* A copy of the GNU Affero General Public License can be found in
|
||
|
* the LICENSE file in the top-level directory of this distribution
|
||
|
* and at http://www.gnu.org/licenses/.
|
||
|
*
|
||
|
*/
|
||
|
#ifndef SRSLTE_CHEST_SL_H
|
||
|
#define SRSLTE_CHEST_SL_H
|
||
|
|
||
|
#include <stdio.h>
|
||
|
|
||
|
#include "srslte/config.h"
|
||
|
|
||
|
#include "srslte/phy/ch_estimation/chest_common.h"
|
||
|
#include "srslte/phy/ch_estimation/refsignal_ul.h"
|
||
|
#include "srslte/phy/common/phy_common.h"
|
||
|
#include "srslte/phy/resampling/interp.h"
|
||
|
|
||
|
typedef struct {
|
||
|
|
||
|
uint32_t nof_prb;
|
||
|
uint32_t sf_n_re;
|
||
|
|
||
|
uint32_t M_sc_rs;
|
||
|
int8_t nr_DMRS_symbols;
|
||
|
|
||
|
// Orthogonal Sequence (W) Transmission Mode 1, 2 and PSBCH
|
||
|
int8_t* w;
|
||
|
|
||
|
// Cyclic Shift Values
|
||
|
int8_t* n_CS;
|
||
|
|
||
|
// Refrence Signal Cyclic Shift
|
||
|
float* alpha;
|
||
|
|
||
|
// Group Hopping Flag
|
||
|
uint32_t f_gh;
|
||
|
uint32_t* f_gh_pattern;
|
||
|
uint32_t f_ss;
|
||
|
|
||
|
// Sequence Group Number
|
||
|
uint32_t* u;
|
||
|
|
||
|
// Base Sequence Number - always 0 for sidelink
|
||
|
uint32_t v;
|
||
|
|
||
|
int32_t N_zc;
|
||
|
|
||
|
int32_t* q;
|
||
|
|
||
|
float** r;
|
||
|
|
||
|
cf_t** r_uv;
|
||
|
|
||
|
cf_t** r_sequence;
|
||
|
|
||
|
cf_t** dmrs_received;
|
||
|
cf_t* pilot_estimates_1;
|
||
|
cf_t* pilot_estimates_2;
|
||
|
cf_t* ce;
|
||
|
|
||
|
srslte_interp_linsrslte_vec_t lin_vec_sl;
|
||
|
|
||
|
} srslte_chest_sl_t;
|
||
|
|
||
|
int srslte_chest_sl_gen_psbch_dmrs(
|
||
|
srslte_chest_sl_t* q, srslte_sl_tm_t txMode, uint32_t nof_prb, uint32_t sf_idx, uint32_t N_sl_id);
|
||
|
|
||
|
int srslte_chest_sl_init_psbch_dmrs(srslte_chest_sl_t* q);
|
||
|
|
||
|
int srslte_chest_sl_put_psbch_dmrs(srslte_chest_sl_t* q, cf_t* sf_buffer, srslte_sl_tm_t tx_mode, uint32_t nof_prb);
|
||
|
void srslte_chest_sl_put_pscch_dmrs(
|
||
|
srslte_chest_sl_t* q, uint32_t prb_idx, uint32_t nof_prb, cf_t* sf_buffer, srslte_sl_tm_t txMode);
|
||
|
void srslte_chest_sl_put_pssch_dmrs(srslte_chest_sl_t* q,
|
||
|
uint32_t prb_start,
|
||
|
uint32_t prb_end,
|
||
|
uint32_t prb_num,
|
||
|
uint32_t nof_prb,
|
||
|
cf_t* sf_buffer,
|
||
|
srslte_sl_tm_t txMode);
|
||
|
|
||
|
void srslte_chest_sl_psbch_ls_estimate_equalize(srslte_chest_sl_t* q, cf_t* sf_buffer, cf_t* output, uint32_t nof_prb);
|
||
|
|
||
|
void srslte_chest_sl_free(srslte_chest_sl_t* q);
|
||
|
|
||
|
#endif
|