2014-03-03 11:09:26 -08:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* \section COPYRIGHT
|
|
|
|
*
|
|
|
|
* Copyright 2013-2014 The libLTE Developers. See the
|
|
|
|
* COPYRIGHT file at the top-level directory of this distribution.
|
|
|
|
*
|
|
|
|
* \section LICENSE
|
|
|
|
*
|
|
|
|
* This file is part of the libLTE library.
|
|
|
|
*
|
|
|
|
* libLTE is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License as
|
|
|
|
* published by the Free Software Foundation, either version 3 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* libLTE 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 Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* A copy of the GNU Lesser 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 PRECODING_H_
|
|
|
|
#define PRECODING_H_
|
|
|
|
|
2015-03-18 05:16:28 -07:00
|
|
|
#include "srslte/config.h"
|
2014-06-13 04:42:29 -07:00
|
|
|
|
2014-03-03 11:09:26 -08:00
|
|
|
typedef _Complex float cf_t;
|
|
|
|
|
|
|
|
/** 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.
|
|
|
|
*/
|
|
|
|
|
2014-11-13 07:14:22 -08:00
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
cf_t *h_mod;
|
2014-11-15 04:11:41 -08:00
|
|
|
cf_t *tmp1;
|
|
|
|
cf_t *tmp2;
|
|
|
|
cf_t *tmp3;
|
2014-11-13 07:14:22 -08:00
|
|
|
float *y_mod;
|
|
|
|
float *z_real;
|
|
|
|
float *z_imag;
|
|
|
|
uint32_t max_frame_len;
|
|
|
|
}precoding_t;
|
|
|
|
|
|
|
|
|
|
|
|
LIBLTE_API int precoding_init(precoding_t *q,
|
|
|
|
uint32_t max_frame_len);
|
|
|
|
|
|
|
|
LIBLTE_API void precoding_free(precoding_t *q);
|
|
|
|
|
2014-03-03 11:09:26 -08:00
|
|
|
/* Generates the vector "y" from the input vector "x"
|
|
|
|
*/
|
2014-11-13 07:14:22 -08:00
|
|
|
LIBLTE_API int precoding_single(precoding_t *q,
|
|
|
|
cf_t *x,
|
|
|
|
cf_t *y,
|
|
|
|
int nof_symbols);
|
2014-03-11 11:42:51 -07:00
|
|
|
|
2014-11-13 07:14:22 -08:00
|
|
|
LIBLTE_API int precoding_diversity(precoding_t *q,
|
|
|
|
cf_t *x[MAX_LAYERS],
|
|
|
|
cf_t *y[MAX_PORTS],
|
|
|
|
int nof_ports, int nof_symbols);
|
|
|
|
|
|
|
|
LIBLTE_API int precoding_type(precoding_t *q,
|
|
|
|
cf_t *x[MAX_LAYERS],
|
|
|
|
cf_t *y[MAX_PORTS],
|
|
|
|
int nof_layers,
|
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
|
|
|
lte_mimo_type_t type);
|
|
|
|
|
|
|
|
/* Estimates the vector "x" based on the received signal "y" and the channel estimates "h"
|
2014-03-11 11:42:51 -07:00
|
|
|
*/
|
2014-11-15 04:11:41 -08:00
|
|
|
LIBLTE_API int predecoding_single(precoding_t *q,
|
|
|
|
cf_t *y,
|
|
|
|
cf_t *h,
|
|
|
|
cf_t *x,
|
|
|
|
int nof_symbols,
|
|
|
|
float noise_estimate);
|
|
|
|
|
|
|
|
LIBLTE_API int predecoding_diversity(precoding_t *q,
|
2014-11-13 07:14:22 -08:00
|
|
|
cf_t *y,
|
2014-11-15 04:11:41 -08:00
|
|
|
cf_t *h[MAX_PORTS],
|
|
|
|
cf_t *x[MAX_LAYERS],
|
|
|
|
int nof_ports,
|
|
|
|
int nof_symbols,
|
|
|
|
float noise_estimate);
|
2014-11-13 07:14:22 -08:00
|
|
|
|
|
|
|
LIBLTE_API int predecoding_type(precoding_t *q,
|
|
|
|
cf_t *y,
|
|
|
|
cf_t *h[MAX_PORTS],
|
|
|
|
cf_t *x[MAX_LAYERS],
|
|
|
|
int nof_ports,
|
|
|
|
int nof_layers,
|
|
|
|
int nof_symbols,
|
2014-11-15 04:11:41 -08:00
|
|
|
lte_mimo_type_t type,
|
|
|
|
float noise_estimate);
|
2014-03-11 11:42:51 -07:00
|
|
|
|
2014-03-03 11:09:26 -08:00
|
|
|
#endif /* PRECODING_H_ */
|