mirror of https://github.com/pvnis/srsRAN_4G.git
Moved all subdirectories in phy upwards. Changed copyright
parent
7d1d2910ee
commit
2b4da53ef9
@ -1,126 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* \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 _LTE_
|
||||
#define _LTE_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <complex.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#include "srslte/phy/utils/bit.h"
|
||||
#include "srslte/phy/utils/convolution.h"
|
||||
#include "srslte/phy/utils/debug.h"
|
||||
#include "srslte/phy/utils/dft.h"
|
||||
#include "srslte/phy/utils/matrix.h"
|
||||
#include "srslte/phy/utils/mux.h"
|
||||
#include "srslte/phy/utils/cexptab.h"
|
||||
#include "srslte/phy/utils/pack.h"
|
||||
#include "srslte/phy/utils/vector.h"
|
||||
|
||||
#include "srslte/phy/common/timestamp.h"
|
||||
#include "srslte/phy/common/sequence.h"
|
||||
#include "srslte/phy/common/phy_common.h"
|
||||
#include "srslte/phy/common/fft.h"
|
||||
|
||||
#include "srslte/phy/ch_estimation/chest_dl.h"
|
||||
#include "srslte/phy/ch_estimation/refsignal_dl.h"
|
||||
#include "srslte/phy/ch_estimation/refsignal_ul.h"
|
||||
|
||||
#include "srslte/phy/resampling/interp.h"
|
||||
#include "srslte/phy/resampling/decim.h"
|
||||
#include "srslte/phy/resampling/resample_arb.h"
|
||||
|
||||
#include "srslte/phy/channel/ch_awgn.h"
|
||||
|
||||
#include "srslte/phy/fec/viterbi.h"
|
||||
#include "srslte/phy/fec/convcoder.h"
|
||||
#include "srslte/phy/fec/crc.h"
|
||||
#include "srslte/phy/fec/tc_interl.h"
|
||||
#include "srslte/phy/fec/turbocoder.h"
|
||||
#include "srslte/phy/fec/turbodecoder.h"
|
||||
#include "srslte/phy/fec/rm_conv.h"
|
||||
#include "srslte/phy/fec/rm_turbo.h"
|
||||
|
||||
#include "srslte/phy/filter/filter2d.h"
|
||||
#include "srslte/phy/filter/dft_precoding.h"
|
||||
|
||||
#include "srslte/phy/io/binsource.h"
|
||||
#include "srslte/phy/io/filesink.h"
|
||||
#include "srslte/phy/io/filesource.h"
|
||||
#include "srslte/phy/io/netsink.h"
|
||||
#include "srslte/phy/io/netsource.h"
|
||||
|
||||
#include "srslte/phy/modem/demod_hard.h"
|
||||
#include "srslte/phy/modem/demod_soft.h"
|
||||
#include "srslte/phy/modem/mod.h"
|
||||
#include "srslte/phy/modem/modem_table.h"
|
||||
|
||||
#include "srslte/phy/mimo/precoding.h"
|
||||
#include "srslte/phy/mimo/layermap.h"
|
||||
|
||||
#include "srslte/phy/phch/cqi.h"
|
||||
#include "srslte/phy/phch/dci.h"
|
||||
#include "srslte/phy/phch/harq.h"
|
||||
#include "srslte/phy/phch/pbch.h"
|
||||
#include "srslte/phy/phch/pcfich.h"
|
||||
#include "srslte/phy/phch/pdcch.h"
|
||||
#include "srslte/phy/phch/pdsch.h"
|
||||
#include "srslte/phy/phch/phich.h"
|
||||
#include "srslte/phy/phch/pusch.h"
|
||||
#include "srslte/phy/phch/prach.h"
|
||||
#include "srslte/phy/phch/ra.h"
|
||||
#include "srslte/phy/phch/regs.h"
|
||||
#include "srslte/phy/phch/sch.h"
|
||||
#include "srslte/phy/phch/uci.h"
|
||||
|
||||
#include "srslte/phy/ue/ue_sync.h"
|
||||
#include "srslte/phy/ue/ue_mib.h"
|
||||
#include "srslte/phy/ue/ue_cell_search.h"
|
||||
#include "srslte/phy/ue/ue_dl.h"
|
||||
#include "srslte/phy/ue/ue_ul.h"
|
||||
|
||||
#include "srslte/phy/scrambling/scrambling.h"
|
||||
|
||||
#include "srslte/phy/sync/pss.h"
|
||||
#include "srslte/phy/sync/sfo.h"
|
||||
#include "srslte/phy/sync/sss.h"
|
||||
#include "srslte/phy/sync/sync.h"
|
||||
#include "srslte/phy/sync/cfo.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#undef I // Fix complex.h #define I nastiness when using C++
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,148 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* \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 VECTOR_
|
||||
#define VECTOR_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include "srslte/config.h"
|
||||
|
||||
typedef _Complex float cf_t;
|
||||
|
||||
|
||||
#define MAX(a,b) ((a)>(b)?(a):(b))
|
||||
#define MIN(a,b) ((a)<(b)?(a):(b))
|
||||
|
||||
// Cumulative moving average
|
||||
#define VEC_CMA(data, average, n) ((average) + ((data) - (average)) / ((n)+1))
|
||||
|
||||
// Exponential moving average
|
||||
#define VEC_EMA(data, average, alpha) ((alpha)*(data)+(1-alpha)*(average))
|
||||
|
||||
/** Return the sum of all the elements */
|
||||
LIBLTE_API int vec_acc_ii(int *x, uint32_t len);
|
||||
LIBLTE_API float vec_acc_ff(float *x, uint32_t len);
|
||||
LIBLTE_API cf_t vec_acc_cc(cf_t *x, uint32_t len);
|
||||
|
||||
LIBLTE_API void *vec_malloc(uint32_t size);
|
||||
|
||||
LIBLTE_API void *vec_realloc(void *ptr, uint32_t old_size, uint32_t new_size);
|
||||
|
||||
/* print vectors */
|
||||
LIBLTE_API void vec_fprint_c(FILE *stream, cf_t *x, uint32_t len);
|
||||
LIBLTE_API void vec_fprint_f(FILE *stream, float *x, uint32_t len);
|
||||
LIBLTE_API void vec_fprint_b(FILE *stream, uint8_t *x, uint32_t len);
|
||||
LIBLTE_API void vec_fprint_byte(FILE *stream, uint8_t *x, uint32_t len);
|
||||
LIBLTE_API void vec_fprint_i(FILE *stream, int *x, uint32_t len);
|
||||
LIBLTE_API void vec_fprint_hex(FILE *stream, uint8_t *x, uint32_t len);
|
||||
|
||||
/* Saves a vector to a file */
|
||||
LIBLTE_API void vec_save_file(char *filename, void *buffer, uint32_t len);
|
||||
|
||||
/* sum two vectors */
|
||||
LIBLTE_API void vec_sum_ch(uint8_t *x, uint8_t *y, char *z, uint32_t len);
|
||||
LIBLTE_API void vec_sum_fff(float *x, float *y, float *z, uint32_t len);
|
||||
LIBLTE_API void vec_sum_ccc(cf_t *x, cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
/* substract two vectors z=x-y */
|
||||
LIBLTE_API void vec_sub_fff(float *x, float *y, float *z, uint32_t len);
|
||||
LIBLTE_API void vec_sub_ccc(cf_t *x, cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
/* Square distance */
|
||||
LIBLTE_API void vec_square_dist(cf_t symbol, cf_t *points, float *distance, uint32_t npoints);
|
||||
|
||||
/* scalar addition */
|
||||
LIBLTE_API void vec_sc_add_fff(float *x, float h, float *z, uint32_t len);
|
||||
LIBLTE_API void vec_sc_add_cfc(cf_t *x, float h, cf_t *z, uint32_t len);
|
||||
LIBLTE_API void vec_sc_add_ccc(cf_t *x, cf_t h, cf_t *z, uint32_t len);
|
||||
|
||||
/* scalar product */
|
||||
LIBLTE_API void vec_sc_prod_cfc(cf_t *x, float h, cf_t *z, uint32_t len);
|
||||
LIBLTE_API void vec_sc_prod_ccc(cf_t *x, cf_t h, cf_t *z, uint32_t len);
|
||||
LIBLTE_API void vec_sc_prod_fff(float *x, float h, float *z, uint32_t len);
|
||||
|
||||
LIBLTE_API void vec_convert_fi(float *x, int16_t *z, float scale, uint32_t len);
|
||||
|
||||
LIBLTE_API void vec_deinterleave_cf(cf_t *x, float *real, float *imag, uint32_t len);
|
||||
LIBLTE_API void vec_deinterleave_real_cf(cf_t *x, float *real, uint32_t len);
|
||||
|
||||
LIBLTE_API void vec_interleave_cf(float *real, float *imag, cf_t *x, uint32_t len);
|
||||
|
||||
/* vector product (element-wise) */
|
||||
LIBLTE_API void vec_prod_ccc(cf_t *x, cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
/* vector product (element-wise) */
|
||||
LIBLTE_API void vec_prod_cfc(cf_t *x, float *y, cf_t *z, uint32_t len);
|
||||
|
||||
/* conjugate vector product (element-wise) */
|
||||
LIBLTE_API void vec_prod_conj_ccc(cf_t *x, cf_t *y, cf_t *z, uint32_t len);
|
||||
|
||||
/* Dot-product */
|
||||
LIBLTE_API cf_t vec_dot_prod_cfc(cf_t *x, float *y, uint32_t len);
|
||||
LIBLTE_API cf_t vec_dot_prod_ccc(cf_t *x, cf_t *y, uint32_t len);
|
||||
LIBLTE_API cf_t vec_dot_prod_conj_ccc(cf_t *x, cf_t *y, uint32_t len);
|
||||
LIBLTE_API float vec_dot_prod_fff(float *x, float *y, uint32_t len);
|
||||
|
||||
/* z=x/y vector division (element-wise) */
|
||||
LIBLTE_API void vec_div_ccc(cf_t *x, cf_t *y, float *y_mod, cf_t *z, float *z_real, float *z_imag, uint32_t len);
|
||||
void vec_div_cfc(cf_t *x, float *y, cf_t *z, float *z_real, float *z_imag, uint32_t len);
|
||||
LIBLTE_API void vec_div_fff(float *x, float *y, float *z, uint32_t len);
|
||||
|
||||
/* conjugate */
|
||||
LIBLTE_API void vec_conj_cc(cf_t *x, cf_t *y, uint32_t len);
|
||||
|
||||
/* average vector power */
|
||||
LIBLTE_API float vec_avg_power_cf(cf_t *x, uint32_t len);
|
||||
|
||||
/* return the index of the maximum value in the vector */
|
||||
LIBLTE_API uint32_t vec_max_fi(float *x, uint32_t len);
|
||||
LIBLTE_API uint32_t vec_max_abs_ci(cf_t *x, uint32_t len);
|
||||
|
||||
/* maximum between two vectors */
|
||||
LIBLTE_API void vec_max_fff(float *x, float *y, float *z, uint32_t len);
|
||||
|
||||
/* quantify vector of floats and convert to uint8_t */
|
||||
LIBLTE_API void vec_quant_fuc(float *in, uint8_t *out, float gain, float offset, float clip, uint32_t len);
|
||||
|
||||
/* magnitude of each vector element */
|
||||
LIBLTE_API void vec_abs_cf(cf_t *x, float *abs, uint32_t len);
|
||||
LIBLTE_API void vec_abs_square_cf(cf_t *x, float *abs_square, uint32_t len);
|
||||
|
||||
/* argument of each vector element */
|
||||
LIBLTE_API void vec_arg_cf(cf_t *x, float *arg, uint32_t len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // VECTOR_
|
@ -0,0 +1,126 @@
|
||||
/**
|
||||
*
|
||||
* \section COPYRIGHT
|
||||
*
|
||||
* Copyright 2013-2014 The srsLTE Developers. See the
|
||||
* COPYRIGHT file at the top-level directory of this distribution.
|
||||
*
|
||||
* \section LICENSE
|
||||
*
|
||||
* This file is part of the srsLTE library.
|
||||
*
|
||||
* srsLTE 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.
|
||||
*
|
||||
* 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 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 _LTE_
|
||||
#define _LTE_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <complex.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "srslte/config.h"
|
||||
|
||||
#include "srslte/utils/bit.h"
|
||||
#include "srslte/utils/convolution.h"
|
||||
#include "srslte/utils/debug.h"
|
||||
#include "srslte/utils/dft.h"
|
||||
#include "srslte/utils/matrix.h"
|
||||
#include "srslte/utils/mux.h"
|
||||
#include "srslte/utils/cexptab.h"
|
||||
#include "srslte/utils/pack.h"
|
||||
#include "srslte/utils/vector.h"
|
||||
|
||||
#include "srslte/common/timestamp.h"
|
||||
#include "srslte/common/sequence.h"
|
||||
#include "srslte/common/phy_common.h"
|
||||
#include "srslte/common/fft.h"
|
||||
|
||||
#include "srslte/ch_estimation/chest_dl.h"
|
||||
#include "srslte/ch_estimation/refsignal_dl.h"
|
||||
#include "srslte/ch_estimation/refsignal_ul.h"
|
||||
|
||||
#include "srslte/resampling/interp.h"
|
||||
#include "srslte/resampling/decim.h"
|
||||
#include "srslte/resampling/resample_arb.h"
|
||||
|
||||
#include "srslte/channel/ch_awgn.h"
|
||||
|
||||
#include "srslte/fec/viterbi.h"
|
||||
#include "srslte/fec/convcoder.h"
|
||||
#include "srslte/fec/crc.h"
|
||||
#include "srslte/fec/tc_interl.h"
|
||||
#include "srslte/fec/turbocoder.h"
|
||||
#include "srslte/fec/turbodecoder.h"
|
||||
#include "srslte/fec/rm_conv.h"
|
||||
#include "srslte/fec/rm_turbo.h"
|
||||
|
||||
#include "srslte/filter/filter2d.h"
|
||||
#include "srslte/filter/dft_precoding.h"
|
||||
|
||||
#include "srslte/io/binsource.h"
|
||||
#include "srslte/io/filesink.h"
|
||||
#include "srslte/io/filesource.h"
|
||||
#include "srslte/io/netsink.h"
|
||||
#include "srslte/io/netsource.h"
|
||||
|
||||
#include "srslte/modem/demod_hard.h"
|
||||
#include "srslte/modem/demod_soft.h"
|
||||
#include "srslte/modem/mod.h"
|
||||
#include "srslte/modem/modem_table.h"
|
||||
|
||||
#include "srslte/mimo/precoding.h"
|
||||
#include "srslte/mimo/layermap.h"
|
||||
|
||||
#include "srslte/phch/cqi.h"
|
||||
#include "srslte/phch/dci.h"
|
||||
#include "srslte/phch/harq.h"
|
||||
#include "srslte/phch/pbch.h"
|
||||
#include "srslte/phch/pcfich.h"
|
||||
#include "srslte/phch/pdcch.h"
|
||||
#include "srslte/phch/pdsch.h"
|
||||
#include "srslte/phch/phich.h"
|
||||
#include "srslte/phch/pusch.h"
|
||||
#include "srslte/phch/prach.h"
|
||||
#include "srslte/phch/ra.h"
|
||||
#include "srslte/phch/regs.h"
|
||||
#include "srslte/phch/sch.h"
|
||||
#include "srslte/phch/uci.h"
|
||||
|
||||
#include "srslte/ue/ue_sync.h"
|
||||
#include "srslte/ue/ue_mib.h"
|
||||
#include "srslte/ue/ue_cell_search.h"
|
||||
#include "srslte/ue/ue_dl.h"
|
||||
#include "srslte/ue/ue_ul.h"
|
||||
|
||||
#include "srslte/scrambling/scrambling.h"
|
||||
|
||||
#include "srslte/sync/pss.h"
|
||||
#include "srslte/sync/sfo.h"
|
||||
#include "srslte/sync/sss.h"
|
||||
#include "srslte/sync/sync.h"
|
||||
#include "srslte/sync/cfo.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#undef I // Fix complex.h #define I nastiness when using C++
|
||||
#endif
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue