2020-11-26 01:25:22 -08:00
|
|
|
/**
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2020-11-26 01:25:22 -08:00
|
|
|
* \section COPYRIGHT
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2021-03-19 03:45:56 -07:00
|
|
|
* Copyright 2013-2021 Software Radio Systems Limited
|
2014-03-03 11:09:26 -08:00
|
|
|
*
|
2020-11-26 01:25:22 -08: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-03 11:09:26 -08:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-04-03 05:49:12 -07:00
|
|
|
/******************************************************************************
|
|
|
|
* File: precoding.h
|
|
|
|
*
|
|
|
|
* Description: MIMO precoding and deprecoding.
|
|
|
|
* Single antenna and tx diversity supported.
|
|
|
|
*
|
|
|
|
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.3.4
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
#ifndef SRSRAN_PRECODING_H
|
|
|
|
#define SRSRAN_PRECODING_H
|
2014-03-03 11:09:26 -08:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
#include "srsran/config.h"
|
|
|
|
#include "srsran/phy/common/phy_common.h"
|
2014-06-13 04:42:29 -07:00
|
|
|
|
2014-03-03 11:09:26 -08:00
|
|
|
/** The precoder takes as input nlayers vectors "x" from the
|
|
|
|
* layer mapping and generates nports vectors "y" to be mapped onto
|
|
|
|
* resources on each of the antenna ports.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Generates the vector "y" from the input vector "x"
|
|
|
|
*/
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_single(cf_t* x, cf_t* y, int nof_symbols, float scaling);
|
2019-12-16 07:04:22 -08:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_diversity(cf_t* x[SRSRAN_MAX_LAYERS],
|
|
|
|
cf_t* y[SRSRAN_MAX_PORTS],
|
2019-12-16 07:04:22 -08:00
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
2017-11-21 01:14:09 -08:00
|
|
|
float scaling);
|
2017-03-20 16:55:16 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_cdd(cf_t* x[SRSRAN_MAX_LAYERS],
|
|
|
|
cf_t* y[SRSRAN_MAX_PORTS],
|
2019-12-16 07:04:22 -08:00
|
|
|
int nof_layers,
|
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
2017-11-21 01:14:09 -08:00
|
|
|
float scaling);
|
2015-03-18 11:14:24 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_type(cf_t* x[SRSRAN_MAX_LAYERS],
|
|
|
|
cf_t* y[SRSRAN_MAX_PORTS],
|
2019-04-23 01:53:11 -07:00
|
|
|
int nof_layers,
|
|
|
|
int nof_ports,
|
|
|
|
int codebook_idx,
|
|
|
|
int nof_symbols,
|
|
|
|
float scaling,
|
2021-03-19 03:45:56 -07:00
|
|
|
srsran_tx_scheme_t type);
|
2014-11-13 07:14:22 -08:00
|
|
|
|
|
|
|
/* Estimates the vector "x" based on the received signal "y" and the channel estimates "h"
|
2014-03-11 11:42:51 -07:00
|
|
|
*/
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int
|
|
|
|
srsran_predecoding_single(cf_t* y, cf_t* h, cf_t* x, float* csi, int nof_symbols, float scaling, float noise_estimate);
|
2019-12-16 07:04:22 -08:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_predecoding_single_multi(cf_t* y[SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* h[SRSRAN_MAX_PORTS],
|
2019-12-16 07:04:22 -08:00
|
|
|
cf_t* x,
|
2021-03-19 03:45:56 -07:00
|
|
|
float* csi[SRSRAN_MAX_CODEWORDS],
|
2019-12-16 07:04:22 -08:00
|
|
|
int nof_rxant,
|
|
|
|
int nof_symbols,
|
|
|
|
float scaling,
|
|
|
|
float noise_estimate);
|
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_predecoding_diversity(cf_t* y,
|
|
|
|
cf_t* h[SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* x[SRSRAN_MAX_LAYERS],
|
2019-12-16 07:04:22 -08:00
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
2017-11-21 01:14:09 -08:00
|
|
|
float scaling);
|
2015-03-18 11:14:24 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_predecoding_diversity_multi(cf_t* y[SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* h[SRSRAN_MAX_PORTS][SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* x[SRSRAN_MAX_LAYERS],
|
|
|
|
float* csi[SRSRAN_MAX_LAYERS],
|
2019-12-16 07:04:22 -08:00
|
|
|
int nof_rxant,
|
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
|
|
|
float scaling);
|
2014-03-11 11:42:51 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API void srsran_predecoding_set_mimo_decoder(srsran_mimo_decoder_t _mimo_decoder);
|
2017-08-17 01:17:48 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_predecoding_type(cf_t* y[SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* h[SRSRAN_MAX_PORTS][SRSRAN_MAX_PORTS],
|
|
|
|
cf_t* x[SRSRAN_MAX_LAYERS],
|
|
|
|
float* csi[SRSRAN_MAX_CODEWORDS],
|
2019-04-23 01:53:11 -07:00
|
|
|
int nof_rxant,
|
|
|
|
int nof_ports,
|
|
|
|
int nof_layers,
|
|
|
|
int codebook_idx,
|
|
|
|
int nof_symbols,
|
2021-03-19 03:45:56 -07:00
|
|
|
srsran_tx_scheme_t type,
|
2019-04-23 01:53:11 -07:00
|
|
|
float scaling,
|
|
|
|
float noise_estimate);
|
2017-03-24 19:51:17 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_pmi_select(cf_t* h[SRSRAN_MAX_PORTS][SRSRAN_MAX_PORTS],
|
2019-12-16 07:04:22 -08:00
|
|
|
uint32_t nof_symbols,
|
|
|
|
float noise_estimate,
|
|
|
|
int nof_layers,
|
|
|
|
uint32_t* pmi,
|
2021-03-19 03:45:56 -07:00
|
|
|
float sinr[SRSRAN_MAX_CODEBOOKS]);
|
2017-08-03 04:56:57 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
SRSRAN_API int srsran_precoding_cn(cf_t* h[SRSRAN_MAX_PORTS][SRSRAN_MAX_PORTS],
|
2017-08-29 00:59:06 -07:00
|
|
|
uint32_t nof_tx_antennas,
|
|
|
|
uint32_t nof_rx_antennas,
|
|
|
|
uint32_t nof_symbols,
|
2019-12-16 07:04:22 -08:00
|
|
|
float* cn);
|
2017-08-29 00:59:06 -07:00
|
|
|
|
2021-03-19 03:45:56 -07:00
|
|
|
#endif // SRSRAN_PRECODING_H
|