srsLTE/lib/include/srslte/phy/phch/pcfich.h

83 lines
2.4 KiB
C
Raw Normal View History

/**
2014-03-27 09:31:25 -07:00
*
* \section COPYRIGHT
2014-03-27 09:31:25 -07:00
*
* Copyright 2013-2020 Software Radio Systems Limited
2014-03-27 09:31:25 -07:00
*
* 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.
2014-03-27 09:31:25 -07:00
*
*/
/******************************************************************************
* File: pcfich.h
*
* Description: Physical control format indicator channel
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.7
*****************************************************************************/
2018-03-31 10:04:04 -07:00
#ifndef SRSLTE_PCFICH_H
#define SRSLTE_PCFICH_H
2014-03-27 09:31:25 -07:00
#include "srslte/config.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/ch_estimation/chest_dl.h"
2017-05-18 00:48:24 -07:00
#include "srslte/phy/common/phy_common.h"
#include "srslte/phy/mimo/layermap.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/mimo/precoding.h"
2017-05-18 00:48:24 -07:00
#include "srslte/phy/modem/demod_soft.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/modem/mod.h"
2017-05-18 00:48:24 -07:00
#include "srslte/phy/phch/regs.h"
2019-04-23 01:53:11 -07:00
#include "srslte/phy/scrambling/scrambling.h"
2014-03-27 09:31:25 -07:00
#define PCFICH_CFI_LEN 32
#define PCFICH_RE PCFICH_CFI_LEN / 2
2014-03-27 09:31:25 -07:00
/* PCFICH object */
typedef struct SRSLTE_API {
2015-03-18 05:41:50 -07:00
srslte_cell_t cell;
int nof_symbols;
uint32_t nof_rx_antennas;
2014-03-27 09:31:25 -07:00
2014-06-17 02:11:41 -07:00
/* handler to REGs resource mapper */
srslte_regs_t* regs;
2014-03-27 09:31:25 -07:00
2014-06-17 02:11:41 -07:00
/* buffers */
cf_t ce[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS][PCFICH_RE];
2015-03-18 11:14:24 -07:00
cf_t symbols[SRSLTE_MAX_PORTS][PCFICH_RE];
cf_t x[SRSLTE_MAX_PORTS][PCFICH_RE];
cf_t d[PCFICH_RE];
// cfi table in floats
float cfi_table_float[3][PCFICH_CFI_LEN];
2014-03-27 09:31:25 -07:00
2014-06-17 02:11:41 -07:00
/* bit message */
2014-10-17 11:44:01 -07:00
uint8_t data[PCFICH_CFI_LEN];
2014-03-27 09:31:25 -07:00
/* received soft bits */
float data_f[PCFICH_CFI_LEN];
2014-06-17 02:11:41 -07:00
/* tx & rx objects */
2019-04-23 01:53:11 -07:00
srslte_modem_table_t mod;
srslte_sequence_t seq[SRSLTE_NOF_SF_X_FRAME];
2015-03-18 11:14:24 -07:00
} srslte_pcfich_t;
2014-03-27 09:31:25 -07:00
SRSLTE_API int srslte_pcfich_init(srslte_pcfich_t* q, uint32_t nof_rx_antennas);
SRSLTE_API int srslte_pcfich_set_cell(srslte_pcfich_t* q, srslte_regs_t* regs, srslte_cell_t cell);
SRSLTE_API void srslte_pcfich_free(srslte_pcfich_t* q);
2014-03-27 09:31:25 -07:00
2019-04-23 01:53:11 -07:00
SRSLTE_API int srslte_pcfich_decode(srslte_pcfich_t* q,
srslte_dl_sf_cfg_t* sf,
srslte_chest_dl_res_t* channel,
cf_t* sf_symbols[SRSLTE_MAX_PORTS],
float* corr_result);
SRSLTE_API int srslte_pcfich_encode(srslte_pcfich_t* q, srslte_dl_sf_cfg_t* sf, cf_t* sf_symbols[SRSLTE_MAX_PORTS]);
2014-03-27 09:31:25 -07:00
2018-03-31 10:04:04 -07:00
#endif // SRSLTE_PCFICH_H