Moved all subdirectories in phy upwards. Changed copyright

master
ismagom 10 years ago
parent 7d1d2910ee
commit 2b4da53ef9

@ -36,7 +36,7 @@ PROJECT (LIBLTE)
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")
INCLUDE(libLTEPackage) #setup cpack INCLUDE(srsLTEPackage) #setup cpack
INCLUDE(BuildMex) INCLUDE(BuildMex)
include(CTest) include(CTest)
@ -167,6 +167,6 @@ INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/graphics/include)
######################################################################## ########################################################################
ADD_SUBDIRECTORY(common) ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(cuhd) ADD_SUBDIRECTORY(cuhd)
ADD_SUBDIRECTORY(graphics)
ADD_SUBDIRECTORY(srslte) ADD_SUBDIRECTORY(srslte)
add_subdirectory(mex) add_subdirectory(mex)
ADD_SUBDIRECTORY(graphics)

@ -20,9 +20,9 @@
# and at http://www.gnu.org/licenses/. # and at http://www.gnu.org/licenses/.
# #
SET(CPACK_PACKAGE_DESCRIPTION "libLTE") SET(CPACK_PACKAGE_DESCRIPTION "srsLTE")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LTE library for SDR.") SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "LTE library for SDR.")
SET(CPACK_PACKAGE_NAME "liblte") SET(CPACK_PACKAGE_NAME "srslte")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-dev (>= 1.35)") SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.3.6), libgcc1 (>= 1:4.1), libboost-dev (>= 1.35)")
SET(CPACK_PACKAGE_CONTACT "Ismael Gomez ") SET(CPACK_PACKAGE_CONTACT "Ismael Gomez ")

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,32 +30,32 @@
// Generic helper definitions for shared library support // Generic helper definitions for shared library support
#if defined _WIN32 || defined __CYGWIN__ #if defined _WIN32 || defined __CYGWIN__
#define LIBLTE_IMPORT __declspec(dllimport) #define SRSLTE_IMPORT __declspec(dllimport)
#define LIBLTE_EXPORT __declspec(dllexport) #define SRSLTE_EXPORT __declspec(dllexport)
#define LIBLTE_LOCAL #define SRSLTE_LOCAL
#else #else
#if __GNUC__ >= 4 #if __GNUC__ >= 4
#define LIBLTE_IMPORT __attribute__ ((visibility ("default"))) #define SRSLTE_IMPORT __attribute__ ((visibility ("default")))
#define LIBLTE_EXPORT __attribute__ ((visibility ("default"))) #define SRSLTE_EXPORT __attribute__ ((visibility ("default")))
#else #else
#define LIBLTE_IMPORT #define SRSLTE_IMPORT
#define LIBLTE_EXPORT #define SRSLTE_EXPORT
#define LIBLTE_LOCAL #define SRSLTE_LOCAL
#endif #endif
#endif #endif
// Define LIBLTE_API // Define SRSLTE_API
// LIBLTE_API is used for the public API symbols. // SRSLTE_API is used for the public API symbols.
#ifdef LIBLTE_DLL_EXPORTS // defined if we are building the LIBLTE DLL (instead of using it) #ifdef SRSLTE_DLL_EXPORTS // defined if we are building the SRSLTE DLL (instead of using it)
#define LIBLTE_API LIBLTE_EXPORT #define SRSLTE_API SRSLTE_EXPORT
#else #else
#define LIBLTE_API LIBLTE_IMPORT #define SRSLTE_API SRSLTE_IMPORT
#endif #endif
// Common error codes // Common error codes
#define LIBLTE_SUCCESS 0 #define SRSLTE_SUCCESS 0
#define LIBLTE_ERROR -1 #define SRSLTE_ERROR -1
#define LIBLTE_ERROR_INVALID_INPUTS -2 #define SRSLTE_ERROR_INVALID_INPUTS -2
#endif // CONFIG_H #endif // CONFIG_H

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -36,83 +36,83 @@ extern "C" {
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/cuhd/cuhd_utils.h" #include "srslte/cuhd/cuhd_utils.h"
LIBLTE_API int cuhd_open(char *args, SRSLTE_API int cuhd_open(char *args,
void **handler); void **handler);
LIBLTE_API int cuhd_close(void *h); SRSLTE_API int cuhd_close(void *h);
LIBLTE_API int cuhd_start_rx_stream(void *h); SRSLTE_API int cuhd_start_rx_stream(void *h);
LIBLTE_API int cuhd_start_rx_stream_nsamples(void *h, SRSLTE_API int cuhd_start_rx_stream_nsamples(void *h,
uint32_t nsamples); uint32_t nsamples);
LIBLTE_API int cuhd_stop_rx_stream(void *h); SRSLTE_API int cuhd_stop_rx_stream(void *h);
LIBLTE_API void cuhd_flush_buffer(void *h); SRSLTE_API void cuhd_flush_buffer(void *h);
LIBLTE_API bool cuhd_rx_wait_lo_locked(void *h); SRSLTE_API bool cuhd_rx_wait_lo_locked(void *h);
LIBLTE_API double cuhd_set_rx_srate(void *h, SRSLTE_API double cuhd_set_rx_srate(void *h,
double freq); double freq);
LIBLTE_API double cuhd_set_rx_gain(void *h, SRSLTE_API double cuhd_set_rx_gain(void *h,
double gain); double gain);
LIBLTE_API double cuhd_set_rx_freq(void *h, SRSLTE_API double cuhd_set_rx_freq(void *h,
double freq); double freq);
LIBLTE_API double cuhd_set_rx_freq_offset(void *h, SRSLTE_API double cuhd_set_rx_freq_offset(void *h,
double freq, double freq,
double off); double off);
LIBLTE_API double cuhd_set_rx_freq_offset(void *h, SRSLTE_API double cuhd_set_rx_freq_offset(void *h,
double freq, double freq,
double off); double off);
LIBLTE_API int cuhd_recv(void *h, SRSLTE_API int cuhd_recv(void *h,
void *data, void *data,
uint32_t nsamples, uint32_t nsamples,
bool blocking); bool blocking);
LIBLTE_API int cuhd_recv_with_time(void *h, SRSLTE_API int cuhd_recv_with_time(void *h,
void *data, void *data,
uint32_t nsamples, uint32_t nsamples,
bool blocking, bool blocking,
time_t *secs, time_t *secs,
double *frac_secs); double *frac_secs);
LIBLTE_API double cuhd_set_tx_srate(void *h, SRSLTE_API double cuhd_set_tx_srate(void *h,
double freq); double freq);
LIBLTE_API double cuhd_set_tx_gain(void *h, SRSLTE_API double cuhd_set_tx_gain(void *h,
double gain); double gain);
LIBLTE_API double cuhd_set_tx_freq(void *h, SRSLTE_API double cuhd_set_tx_freq(void *h,
double freq); double freq);
LIBLTE_API double cuhd_set_tx_freq_offset(void *h, SRSLTE_API double cuhd_set_tx_freq_offset(void *h,
double freq, double freq,
double offset); double offset);
LIBLTE_API int cuhd_send(void *h, SRSLTE_API int cuhd_send(void *h,
void *data, void *data,
uint32_t nsamples, uint32_t nsamples,
bool blocking); bool blocking);
LIBLTE_API int cuhd_send(void *h, SRSLTE_API int cuhd_send(void *h,
void *data, void *data,
uint32_t nsamples, uint32_t nsamples,
bool blocking); bool blocking);
LIBLTE_API int cuhd_send_timed(void *h, SRSLTE_API int cuhd_send_timed(void *h,
void *data, void *data,
int nsamples, int nsamples,
time_t secs, time_t secs,
double frac_secs); double frac_secs);
LIBLTE_API int cuhd_send_timed2(void *h, SRSLTE_API int cuhd_send_timed2(void *h,
void *data, void *data,
int nsamples, int nsamples,
time_t secs, time_t secs,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -27,4 +27,4 @@
#include "srslte/config.h" #include "srslte/config.h"
LIBLTE_API int cuhd_rssi_scan(void *uhd, float *freqs, float *rssi, int nof_bands, double fs, int nsamp); SRSLTE_API int cuhd_rssi_scan(void *uhd, float *freqs, float *rssi, int nof_bands, double fs, int nsamp);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -32,8 +32,8 @@
#include "srslte/cuhd/cuhd.h" #include "srslte/cuhd/cuhd.h"
#include "srslte/phy/utils/vector.h" #include "srslte/utils/vector.h"
#include "srslte/phy/utils/debug.h" #include "srslte/utils/debug.h"
int cuhd_rssi_scan(void *uhd, float *freqs, float *rssi, int nof_bands, double fs, int nsamp) { int cuhd_rssi_scan(void *uhd, float *freqs, float *rssi, int nof_bands, double fs, int nsamp) {
int i, j; int i, j;

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -40,8 +40,8 @@ extern "C" {
#include "srslte/graphics/plot/plot_complex.h" #include "srslte/graphics/plot/plot_complex.h"
#include "srslte/graphics/plot/plot_waterfall.h" #include "srslte/graphics/plot/plot_waterfall.h"
LIBLTE_API int plot_init(); SRSLTE_API int plot_init();
LIBLTE_API void plot_exit(); SRSLTE_API void plot_exit();
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -43,15 +43,15 @@ typedef enum {
typedef void* plot_complex_t; typedef void* plot_complex_t;
LIBLTE_API int plot_complex_init(plot_complex_t *h); SRSLTE_API int plot_complex_init(plot_complex_t *h);
LIBLTE_API void plot_complex_setTitle(plot_complex_t *h, char *title); SRSLTE_API void plot_complex_setTitle(plot_complex_t *h, char *title);
LIBLTE_API void plot_complex_setNewData(plot_complex_t *h, _Complex float *data, SRSLTE_API void plot_complex_setNewData(plot_complex_t *h, _Complex float *data,
int num_points); int num_points);
LIBLTE_API void plot_complex_setXAxisAutoScale(plot_complex_t *h, plot_complex_id_t id, bool on); SRSLTE_API void plot_complex_setXAxisAutoScale(plot_complex_t *h, plot_complex_id_t id, bool on);
LIBLTE_API void plot_complex_setYAxisAutoScale(plot_complex_t *h, plot_complex_id_t id, bool on); SRSLTE_API void plot_complex_setYAxisAutoScale(plot_complex_t *h, plot_complex_id_t id, bool on);
LIBLTE_API void plot_complex_setXAxisScale(plot_complex_t *h, plot_complex_id_t id, double xMin, double xMax); SRSLTE_API void plot_complex_setXAxisScale(plot_complex_t *h, plot_complex_id_t id, double xMin, double xMax);
LIBLTE_API void plot_complex_setYAxisScale(plot_complex_t *h, plot_complex_id_t id, double yMin, double yMax); SRSLTE_API void plot_complex_setYAxisScale(plot_complex_t *h, plot_complex_id_t id, double yMin, double yMax);
LIBLTE_API void plot_complex_setXAxisRange(plot_complex_t *h, double xMin, double xMax); SRSLTE_API void plot_complex_setXAxisRange(plot_complex_t *h, double xMin, double xMax);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,16 +38,16 @@ extern "C" {
typedef void* plot_real_t; typedef void* plot_real_t;
LIBLTE_API int plot_real_init(plot_real_t *h); SRSLTE_API int plot_real_init(plot_real_t *h);
LIBLTE_API void plot_real_setTitle(plot_real_t *h, char *title); SRSLTE_API void plot_real_setTitle(plot_real_t *h, char *title);
LIBLTE_API void plot_real_setNewData(plot_real_t *h, float *data, SRSLTE_API void plot_real_setNewData(plot_real_t *h, float *data,
int num_points); int num_points);
LIBLTE_API void plot_real_setXAxisAutoScale(plot_real_t *h, bool on); SRSLTE_API void plot_real_setXAxisAutoScale(plot_real_t *h, bool on);
LIBLTE_API void plot_real_setYAxisAutoScale(plot_real_t *h, bool on); SRSLTE_API void plot_real_setYAxisAutoScale(plot_real_t *h, bool on);
LIBLTE_API void plot_real_setXAxisScale(plot_real_t *h, double xMin, double xMax); SRSLTE_API void plot_real_setXAxisScale(plot_real_t *h, double xMin, double xMax);
LIBLTE_API void plot_real_setYAxisScale(plot_real_t *h, double yMin, double yMax); SRSLTE_API void plot_real_setYAxisScale(plot_real_t *h, double yMin, double yMax);
LIBLTE_API void plot_real_setXAxisRange(plot_real_t *h, double xMin, double xMax); SRSLTE_API void plot_real_setXAxisRange(plot_real_t *h, double xMin, double xMax);
LIBLTE_API void plot_real_setLabels(plot_real_t *h, char *xLabel, char *yLabel); SRSLTE_API void plot_real_setLabels(plot_real_t *h, char *xLabel, char *yLabel);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,15 +38,15 @@ extern "C" {
typedef void* plot_scatter_t; typedef void* plot_scatter_t;
LIBLTE_API int plot_scatter_init(plot_scatter_t *h); SRSLTE_API int plot_scatter_init(plot_scatter_t *h);
LIBLTE_API void plot_scatter_setTitle(plot_scatter_t *h, char *title); SRSLTE_API void plot_scatter_setTitle(plot_scatter_t *h, char *title);
LIBLTE_API void plot_scatter_setNewData(plot_scatter_t *h, _Complex float *data, SRSLTE_API void plot_scatter_setNewData(plot_scatter_t *h, _Complex float *data,
int num_points); int num_points);
LIBLTE_API void plot_scatter_setXAxisAutoScale(plot_scatter_t *h, bool on); SRSLTE_API void plot_scatter_setXAxisAutoScale(plot_scatter_t *h, bool on);
LIBLTE_API void plot_scatter_setYAxisAutoScale(plot_scatter_t *h, bool on); SRSLTE_API void plot_scatter_setYAxisAutoScale(plot_scatter_t *h, bool on);
LIBLTE_API void plot_scatter_setXAxisScale(plot_scatter_t *h, double xMin, double xMax); SRSLTE_API void plot_scatter_setXAxisScale(plot_scatter_t *h, double xMin, double xMax);
LIBLTE_API void plot_scatter_setYAxisScale(plot_scatter_t *h, double yMin, double yMax); SRSLTE_API void plot_scatter_setYAxisScale(plot_scatter_t *h, double yMin, double yMax);
LIBLTE_API void plot_scatter_setAxisLabels(plot_scatter_t *h, char *xLabel, char *yLabel); SRSLTE_API void plot_scatter_setAxisLabels(plot_scatter_t *h, char *xLabel, char *yLabel);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,21 +38,21 @@ extern "C" {
typedef void* plot_waterfall_t; typedef void* plot_waterfall_t;
LIBLTE_API int plot_waterfall_init(plot_waterfall_t *h, int numDataPoints, int numRows); SRSLTE_API int plot_waterfall_init(plot_waterfall_t *h, int numDataPoints, int numRows);
LIBLTE_API void plot_waterfall_setTitle(plot_waterfall_t *h, char *title); SRSLTE_API void plot_waterfall_setTitle(plot_waterfall_t *h, char *title);
LIBLTE_API void plot_waterfall_appendNewData(plot_waterfall_t *h, float *data, SRSLTE_API void plot_waterfall_appendNewData(plot_waterfall_t *h, float *data,
int num_points); int num_points);
LIBLTE_API void plot_complex_setPlotXLabel(plot_waterfall_t *h, char *xLabel); SRSLTE_API void plot_complex_setPlotXLabel(plot_waterfall_t *h, char *xLabel);
LIBLTE_API void plot_complex_setPlotYLabel(plot_waterfall_t *h, char *yLabel); SRSLTE_API void plot_complex_setPlotYLabel(plot_waterfall_t *h, char *yLabel);
LIBLTE_API void plot_waterfall_setPlotXAxisRange(plot_waterfall_t *h, double xMin, double xMax); SRSLTE_API void plot_waterfall_setPlotXAxisRange(plot_waterfall_t *h, double xMin, double xMax);
LIBLTE_API void plot_waterfall_setPlotXAxisScale(plot_waterfall_t *h, double xMin, double xMax); SRSLTE_API void plot_waterfall_setPlotXAxisScale(plot_waterfall_t *h, double xMin, double xMax);
LIBLTE_API void plot_waterfall_setPlotYAxisScale(plot_waterfall_t *h, double yMin, double yMax); SRSLTE_API void plot_waterfall_setPlotYAxisScale(plot_waterfall_t *h, double yMin, double yMax);
LIBLTE_API void plot_waterfall_setSpectrogramXLabel(plot_waterfall_t *h, char* xLabel); SRSLTE_API void plot_waterfall_setSpectrogramXLabel(plot_waterfall_t *h, char* xLabel);
LIBLTE_API void plot_waterfall_setSpectrogramYLabel(plot_waterfall_t *h, char* yLabel); SRSLTE_API void plot_waterfall_setSpectrogramYLabel(plot_waterfall_t *h, char* yLabel);
LIBLTE_API void plot_waterfall_setSpectrogramXAxisRange(plot_waterfall_t *h, double xMin, double xMax); SRSLTE_API void plot_waterfall_setSpectrogramXAxisRange(plot_waterfall_t *h, double xMin, double xMax);
LIBLTE_API void plot_waterfall_setSpectrogramYAxisRange(plot_waterfall_t *h, double yMin, double yMax); SRSLTE_API void plot_waterfall_setSpectrogramYAxisRange(plot_waterfall_t *h, double yMin, double yMax);
LIBLTE_API void plot_waterfall_setSpectrogramZAxisScale(plot_waterfall_t *h, double zMin, double zMax); SRSLTE_API void plot_waterfall_setSpectrogramZAxisScale(plot_waterfall_t *h, double zMin, double zMax);
#ifdef __cplusplus #ifdef __cplusplus

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,7 +38,7 @@ static int plot_initiated=0;
void *qt_thread(void *arg) void *qt_thread(void *arg)
{ {
int argc = 1; int argc = 1;
char* argv[] = { const_cast<char *>("libLTE Visualizer"), NULL }; char* argv[] = { const_cast<char *>("srsLTE Visualizer"), NULL };
QApplication app(argc, argv); QApplication app(argc, argv);
app.exec(); app.exec();
pthread_exit(NULL); pthread_exit(NULL);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -7,7 +7,7 @@
class ScatterplotWrapper; class ScatterplotWrapper;
class LIBLTE_API Scatterplot class Scatterplot
{ {
public: public:
Scatterplot(); Scatterplot();
@ -28,8 +28,7 @@ private:
ScatterplotWrapper* plot_; ScatterplotWrapper* plot_;
}; };
template<class Iterator> template<class Iterator> void Scatterplot::setNewData(Iterator begin, Iterator end)
LIBLTE_API void Scatterplot::setNewData(Iterator begin, Iterator end)
{ {
int numPoints = end-begin; int numPoints = end-begin;
std::complex<double>* data = new std::complex<double>[numPoints]; std::complex<double>* data = new std::complex<double>[numPoints];

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -212,11 +212,11 @@ if plot_noise_estimation_only
subplot(1,3,1) subplot(1,3,1)
plot(SNR_values_db, SNR_values_db, SNR_values_db, 10*log10(SNR_liblte),SNR_values_db, 10*log10(SNR_matlab)) plot(SNR_values_db, SNR_values_db, SNR_values_db, 10*log10(SNR_liblte),SNR_values_db, 10*log10(SNR_matlab))
legend('Theory','libLTE','Matlab') legend('Theory','srsLTE','Matlab')
subplot(1,3,2) subplot(1,3,2)
plot(SNR_values_db, 10*log10(noiseTx), SNR_values_db, 10*log10(noiseEst_liblte),SNR_values_db, 10*log10(noiseEst)) plot(SNR_values_db, 10*log10(noiseTx), SNR_values_db, 10*log10(noiseEst_liblte),SNR_values_db, 10*log10(noiseEst))
legend('Theory','libLTE','Matlab') legend('Theory','srsLTE','Matlab')
subplot(1,3,3) subplot(1,3,3)
plot(1:10*length(SNR_values_db),RSRP,10*(1:length(SNR_values_db)),meanRSRP) plot(1:10*length(SNR_values_db),RSRP,10*(1:length(SNR_values_db)),meanRSRP)

@ -96,7 +96,7 @@ if (length(SNR_values_db) > 1)
grid on grid on
xlabel('SNR (dB)'); xlabel('SNR (dB)');
ylabel('BLER') ylabel('BLER')
legend('Matlab','libLTE') legend('Matlab','srsLTE')
axis([min(SNR_values_db) max(SNR_values_db) 1/Nrealizations/10 1]) axis([min(SNR_values_db) max(SNR_values_db) 1/Nrealizations/10 1])
else else
disp(error) disp(error)

@ -144,7 +144,7 @@ parfor snr_idx=1:length(SNR_values)
decoded(snr_idx) = decoded(snr_idx) + (length(rxDCI)>0); decoded(snr_idx) = decoded(snr_idx) + (length(rxDCI)>0);
%% Same with libLTE %% Same with srsLTE
[rxCFI, pcfichSymbols2, pcfichSymbolsRx2] = liblte_pcfich(enbConfigRx, rxWaveform); [rxCFI, pcfichSymbols2, pcfichSymbolsRx2] = liblte_pcfich(enbConfigRx, rxWaveform);
decoded_cfi_liblte(snr_idx) = decoded_cfi_liblte(snr_idx) + (rxCFI == txCFI); decoded_cfi_liblte(snr_idx) = decoded_cfi_liblte(snr_idx) + (rxCFI == txCFI);
enbConfigRx.CFI = rxCFI; enbConfigRx.CFI = rxCFI;
@ -160,7 +160,7 @@ if (Npackets>1)
SNR_values,1-decoded_liblte/Npackets, 'ro-',... SNR_values,1-decoded_liblte/Npackets, 'ro-',...
SNR_values,1-decoded_cfi_liblte/Npackets,'rx:') SNR_values,1-decoded_cfi_liblte/Npackets,'rx:')
grid on grid on
legend('Matlab all','Matlab cfi', 'libLTE all', 'libLTE cfi') legend('Matlab all','Matlab cfi', 'srsLTE all', 'srsLTE cfi')
xlabel('SNR (dB)') xlabel('SNR (dB)')
ylabel('BLER') ylabel('BLER')
axis([min(SNR_values) max(SNR_values) 1/Npackets/10 1]) axis([min(SNR_values) max(SNR_values) 1/Npackets/10 1])

@ -94,7 +94,7 @@ for snr_idx=1:length(SNR_values)
decoded(snr_idx) = decoded(snr_idx) + ~blkcrc; decoded(snr_idx) = decoded(snr_idx) + ~blkcrc;
%% Same with libLTE %% Same with srsLTE
if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0) if (rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1) > 0)
[dec2, data, pdschRx, pdschSymbols2, deb] = liblte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ... [dec2, data, pdschRx, pdschSymbols2, deb] = liblte_pdsch(rmccFgOut, rmccFgOut.PDSCH, ...
rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ... rmccFgOut.PDSCH.TrBlkSizes(sf_idx+1), ...
@ -116,7 +116,7 @@ if (length(SNR_values)>1)
semilogy(SNR_values,1-decoded/Npackets/(Nsf+1),'bo-',... semilogy(SNR_values,1-decoded/Npackets/(Nsf+1),'bo-',...
SNR_values,1-decoded_liblte/Npackets/(Nsf+1), 'ro-') SNR_values,1-decoded_liblte/Npackets/(Nsf+1), 'ro-')
grid on; grid on;
legend('Matlab','libLTE') legend('Matlab','srsLTE')
xlabel('SNR (dB)') xlabel('SNR (dB)')
ylabel('BLER') ylabel('BLER')
axis([min(SNR_values) max(SNR_values) 1/Npackets/(Nsf+1) 1]) axis([min(SNR_values) max(SNR_values) 1/Npackets/(Nsf+1) 1])

@ -111,7 +111,7 @@ for snr_idx=1:length(SNR_values)
error(3,snr_idx) = error(3,snr_idx) + ((idx ~= m0 && idx ~= m1)); error(3,snr_idx) = error(3,snr_idx) + ((idx ~= m0 && idx ~= m1));
% libLTE results % srsLTE results
[n,sf_idx,lt_corr0]=liblte_sss(enb,rxWaveform,'full'); [n,sf_idx,lt_corr0]=liblte_sss(enb,rxWaveform,'full');
[m, idx]=max(lt_corr0); [m, idx]=max(lt_corr0);
error(4,snr_idx) = error(4,snr_idx) + ((idx ~= m0 && idx ~= m1)); error(4,snr_idx) = error(4,snr_idx) + ((idx ~= m0 && idx ~= m1));

@ -44,7 +44,7 @@ if (length(SNR_values_db) > 1)
grid on grid on
xlabel('SNR (dB)') xlabel('SNR (dB)')
ylabel('BLER') ylabel('BLER')
legend('Matlab','libLTE'); legend('Matlab','srsLTE');
else else
disp(errors1); disp(errors1);
disp(errors2); disp(errors2);

@ -41,7 +41,7 @@ if (length(SNR_values_db) > 1)
grid on grid on
xlabel('SNR (dB)') xlabel('SNR (dB)')
ylabel('BLER') ylabel('BLER')
legend('Matlab','libLTE'); legend('Matlab','srsLTE');
else else
disp(errors1); disp(errors1);
disp(errors2); disp(errors2);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -42,49 +42,49 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
LIBLTE_API bool mexutils_isScalar(const mxArray *ptr); SRSLTE_API bool mexutils_isScalar(const mxArray *ptr);
LIBLTE_API int mexutils_read_cell(const mxArray *ptr, SRSLTE_API int mexutils_read_cell(const mxArray *ptr,
lte_cell_t *cell); lte_cell_t *cell);
LIBLTE_API char *mexutils_get_char_struct(const mxArray *ptr, SRSLTE_API char *mexutils_get_char_struct(const mxArray *ptr,
const char *field_name); const char *field_name);
LIBLTE_API int mexutils_read_uint32_struct(const mxArray *ptr, SRSLTE_API int mexutils_read_uint32_struct(const mxArray *ptr,
const char *field_name, const char *field_name,
uint32_t *value); uint32_t *value);
LIBLTE_API int mexutils_read_float_struct(const mxArray *ptr, SRSLTE_API int mexutils_read_float_struct(const mxArray *ptr,
const char *field_name, const char *field_name,
float *value); float *value);
LIBLTE_API int mexutils_write_f(float *buffer, SRSLTE_API int mexutils_write_f(float *buffer,
mxArray **ptr, mxArray **ptr,
uint32_t nr, uint32_t nr,
uint32_t nc); uint32_t nc);
LIBLTE_API int mexutils_write_cf(cf_t *buffer, SRSLTE_API int mexutils_write_cf(cf_t *buffer,
mxArray **ptr, mxArray **ptr,
uint32_t nr, uint32_t nr,
uint32_t nc); uint32_t nc);
LIBLTE_API int mexutils_write_uint8(uint8_t *buffer, SRSLTE_API int mexutils_write_uint8(uint8_t *buffer,
mxArray **ptr, mxArray **ptr,
uint32_t nr, uint32_t nr,
uint32_t nc); uint32_t nc);
LIBLTE_API int mexutils_write_int(int *buffer, SRSLTE_API int mexutils_write_int(int *buffer,
mxArray **ptr, mxArray **ptr,
uint32_t nr, uint32_t nr,
uint32_t nc); uint32_t nc);
LIBLTE_API int mexutils_read_uint8(const mxArray *ptr, SRSLTE_API int mexutils_read_uint8(const mxArray *ptr,
uint8_t **buffer); uint8_t **buffer);
LIBLTE_API int mexutils_read_f(const mxArray *ptr, SRSLTE_API int mexutils_read_f(const mxArray *ptr,
float **buffer); float **buffer);
LIBLTE_API int mexutils_read_cf(const mxArray *ptr, SRSLTE_API int mexutils_read_cf(const mxArray *ptr,
cf_t **buffer); cf_t **buffer);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -27,9 +27,9 @@
#include <string.h> #include <string.h>
#include <complex.h> #include <complex.h>
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/mex/mexutils.h" #include "srslte/mex/mexutils.h"
#include "srslte/phy/utils/vector.h" #include "srslte/utils/vector.h"
bool mexutils_isScalar(const mxArray *ptr) { bool mexutils_isScalar(const mxArray *ptr) {

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,7 +37,7 @@
#include <signal.h> #include <signal.h>
#include "srslte/rrc/rrc.h" #include "srslte/rrc/rrc.h"
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#include "srslte/cuhd/cuhd.h" #include "srslte/cuhd/cuhd.h"
#include "cuhd_utils.h" #include "cuhd_utils.h"
@ -183,7 +183,7 @@ int main(int argc, char **argv) {
cuhd_set_rx_srate(uhd, (double) srate); cuhd_set_rx_srate(uhd, (double) srate);
} else { } else {
fprintf(stderr, "Invalid number of PRB %d\n", cell.nof_prb); fprintf(stderr, "Invalid number of PRB %d\n", cell.nof_prb);
return LIBLTE_ERROR; return SRSLTE_ERROR;
} }
INFO("Stopping UHD and flushing buffer...\n",0); INFO("Stopping UHD and flushing buffer...\n",0);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -35,7 +35,7 @@
#include <unistd.h> #include <unistd.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#include "cuhd_utils.h" #include "cuhd_utils.h"

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -35,7 +35,7 @@
#include <unistd.h> #include <unistd.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#include "srslte/rrc/rrc.h" #include "srslte/rrc/rrc.h"
#include "cuhd_utils.h" #include "cuhd_utils.h"
@ -52,7 +52,7 @@ int cuhd_recv_wrapper_cs(void *h, void *data, uint32_t nsamples, timestamp_t *t)
* Return 1 if the MIB is decoded, 0 if not or -1 on error. * Return 1 if the MIB is decoded, 0 if not or -1 on error.
*/ */
int cuhd_mib_decoder(void *uhd, uint32_t max_nof_frames, lte_cell_t *cell) { int cuhd_mib_decoder(void *uhd, uint32_t max_nof_frames, lte_cell_t *cell) {
int ret = LIBLTE_ERROR; int ret = SRSLTE_ERROR;
ue_mib_sync_t ue_mib; ue_mib_sync_t ue_mib;
uint8_t bch_payload[BCH_PAYLOAD_LEN], bch_payload_unpacked[BCH_PAYLOAD_LEN]; uint8_t bch_payload[BCH_PAYLOAD_LEN], bch_payload_unpacked[BCH_PAYLOAD_LEN];
@ -92,7 +92,7 @@ clean_exit:
int cuhd_cell_search(void *uhd, cell_search_cfg_t *config, int cuhd_cell_search(void *uhd, cell_search_cfg_t *config,
int force_N_id_2, lte_cell_t *cell) int force_N_id_2, lte_cell_t *cell)
{ {
int ret = LIBLTE_ERROR; int ret = SRSLTE_ERROR;
ue_cell_search_t cs; ue_cell_search_t cs;
ue_cell_search_result_t found_cells[3]; ue_cell_search_result_t found_cells[3];
@ -100,7 +100,7 @@ int cuhd_cell_search(void *uhd, cell_search_cfg_t *config,
if (ue_cell_search_init(&cs, cuhd_recv_wrapper_cs, uhd)) { if (ue_cell_search_init(&cs, cuhd_recv_wrapper_cs, uhd)) {
fprintf(stderr, "Error initiating UE cell detect\n"); fprintf(stderr, "Error initiating UE cell detect\n");
return LIBLTE_ERROR; return SRSLTE_ERROR;
} }
if (config->max_frames_pss) { if (config->max_frames_pss) {
@ -126,10 +126,10 @@ int cuhd_cell_search(void *uhd, cell_search_cfg_t *config,
} }
if (ret < 0) { if (ret < 0) {
fprintf(stderr, "Error searching cell\n"); fprintf(stderr, "Error searching cell\n");
return LIBLTE_ERROR; return SRSLTE_ERROR;
} else if (ret == 0) { } else if (ret == 0) {
fprintf(stderr, "Could not find any cell in this frequency\n"); fprintf(stderr, "Could not find any cell in this frequency\n");
return LIBLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
// Save result // Save result
@ -152,7 +152,7 @@ int cuhd_cell_search(void *uhd, cell_search_cfg_t *config,
*/ */
int cuhd_search_and_decode_mib(void *uhd, cell_search_cfg_t *config, int force_N_id_2, lte_cell_t *cell) int cuhd_search_and_decode_mib(void *uhd, cell_search_cfg_t *config, int force_N_id_2, lte_cell_t *cell)
{ {
int ret = LIBLTE_ERROR; int ret = SRSLTE_ERROR;
printf("Searching for cell...\n"); printf("Searching for cell...\n");
ret = cuhd_cell_search(uhd, config, force_N_id_2, cell); ret = cuhd_cell_search(uhd, config, force_N_id_2, cell);
@ -161,7 +161,7 @@ int cuhd_search_and_decode_mib(void *uhd, cell_search_cfg_t *config, int force_N
ret = cuhd_mib_decoder(uhd, config->max_frames_pbch, cell); ret = cuhd_mib_decoder(uhd, config->max_frames_pbch, cell);
if (ret < 0) { if (ret < 0) {
fprintf(stderr, "Could not decode PBCH from CELL ID %d\n", cell->id); fprintf(stderr, "Could not decode PBCH from CELL ID %d\n", cell->id);
return LIBLTE_ERROR; return SRSLTE_ERROR;
} }
} }
return ret; return ret;

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -26,9 +26,9 @@
*/ */
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t max_frames_pbch; // maximum number of 5ms frames to capture for MIB decoding uint32_t max_frames_pbch; // maximum number of 5ms frames to capture for MIB decoding
uint32_t max_frames_pss; // maximum number of 5ms frames to capture for PSS correlation uint32_t max_frames_pss; // maximum number of 5ms frames to capture for PSS correlation
float threshold; // early-stops cell detection if mean PSR is above this value float threshold; // early-stops cell detection if mean PSR is above this value

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,7 +31,7 @@
#include <strings.h> #include <strings.h>
#include <math.h> #include <math.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
void usage(char *arg) { void usage(char *arg) {
printf("Usage: %s nbits snr_db\n",arg); printf("Usage: %s nbits snr_db\n",arg);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,7 +29,7 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
int main(int argc, char **argv) { int main(int argc, char **argv) {
binsource_t bs; binsource_t bs;

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -34,7 +34,7 @@
#include <pthread.h> #include <pthread.h>
#include <semaphore.h> #include <semaphore.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#include "srslte/rrc/rrc.h" #include "srslte/rrc/rrc.h"
#ifndef DISABLE_UHD #ifndef DISABLE_UHD

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -39,7 +39,7 @@
#include <semaphore.h> #include <semaphore.h>
#include "srslte/rrc/rrc.h" #include "srslte/rrc/rrc.h"
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#ifndef DISABLE_UHD #ifndef DISABLE_UHD
@ -286,7 +286,7 @@ int main(int argc, char **argv) {
cuhd_set_rx_srate(uhd, (double) srate); cuhd_set_rx_srate(uhd, (double) srate);
} else { } else {
fprintf(stderr, "Invalid number of PRB %d\n", cell.nof_prb); fprintf(stderr, "Invalid number of PRB %d\n", cell.nof_prb);
return LIBLTE_ERROR; return SRSLTE_ERROR;
} }
INFO("Stopping UHD and flushing buffer...\r",0); INFO("Stopping UHD and flushing buffer...\r",0);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -39,7 +39,7 @@
#include <semaphore.h> #include <semaphore.h>
#include "srslte/rrc/rrc.h" #include "srslte/rrc/rrc.h"
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
#include "srslte/cuhd/cuhd.h" #include "srslte/cuhd/cuhd.h"
@ -255,7 +255,7 @@ void rar_msg_fprint(FILE *stream, rar_msg_t *msg)
int rar_unpack(uint8_t *buffer, rar_msg_t *msg) int rar_unpack(uint8_t *buffer, rar_msg_t *msg)
{ {
int ret = LIBLTE_ERROR; int ret = SRSLTE_ERROR;
uint8_t *ptr = buffer; uint8_t *ptr = buffer;
if(buffer != NULL && if(buffer != NULL &&
@ -266,7 +266,7 @@ int rar_unpack(uint8_t *buffer, rar_msg_t *msg)
if(msg->hdr_type == rar_header_type_bi) { if(msg->hdr_type == rar_header_type_bi) {
ptr += 2; ptr += 2;
msg->BI = bit_unpack(&ptr, 4); msg->BI = bit_unpack(&ptr, 4);
ret = LIBLTE_SUCCESS; ret = SRSLTE_SUCCESS;
} else if (msg->hdr_type == rar_header_type_rapid) { } else if (msg->hdr_type == rar_header_type_rapid) {
msg->RAPID = bit_unpack(&ptr, 6); msg->RAPID = bit_unpack(&ptr, 6);
ptr++; ptr++;
@ -279,7 +279,7 @@ int rar_unpack(uint8_t *buffer, rar_msg_t *msg)
msg->ul_delay = *ptr++; msg->ul_delay = *ptr++;
msg->csi_req = *ptr++; msg->csi_req = *ptr++;
msg->temp_c_rnti = bit_unpack(&ptr, 16); msg->temp_c_rnti = bit_unpack(&ptr, 16);
ret = LIBLTE_SUCCESS; ret = SRSLTE_SUCCESS;
} }
} }

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,7 +31,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/time.h> #include <sys/time.h>
#include "srslte/phy/phy.h" #include "srslte/srslte.h"
char *input_file_name; char *input_file_name;
char *output_file_name="abs_corr.txt"; char *output_file_name="abs_corr.txt";

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -41,37 +41,37 @@
*/ */
typedef _Complex float cf_t; typedef _Complex float cf_t;
#define AGC_DEFAULT_BW (5e-2) #define SRSLTE_AGC_DEFAULT_BW (5e-2)
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
float bandwidth; float bandwidth;
float gain; float gain;
float y_out; float y_out;
bool lock; bool lock;
bool isfirst; bool isfirst;
} agc_t; } srslte_agc_t;
LIBLTE_API int agc_init (agc_t *q); SRSLTE_API int srslte_agc_init (srslte_agc_t *q);
LIBLTE_API void agc_free(agc_t *q); SRSLTE_API void srslte_agc_free(srslte_agc_t *q);
LIBLTE_API void agc_reset(agc_t *q); SRSLTE_API void srslte_agc_reset(srslte_agc_t *q);
LIBLTE_API void agc_set_bandwidth(agc_t *q, SRSLTE_API void srslte_agc_set_bandwidth(srslte_agc_t *q,
float bandwidth); float bandwidth);
LIBLTE_API float agc_get_rssi(agc_t *q); SRSLTE_API float srslte_agc_get_rssi(srslte_agc_t *q);
LIBLTE_API float agc_get_output_level(agc_t *q); SRSLTE_API float srslte_agc_get_output_level(srslte_agc_t *q);
LIBLTE_API float agc_get_gain(agc_t *q); SRSLTE_API float srslte_agc_get_gain(srslte_agc_t *q);
LIBLTE_API void agc_lock(agc_t *q, SRSLTE_API void srslte_agc_lock(srslte_agc_t *q,
bool enable); bool enable);
LIBLTE_API void agc_process(agc_t *q, SRSLTE_API void srslte_agc_process(srslte_agc_t *q,
cf_t *input, cf_t *input,
cf_t *output, cf_t *output,
uint32_t len); uint32_t len);
#endif // AGC_ #endif // AGC_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -34,10 +34,10 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/resampling/interp.h" #include "srslte/resampling/interp.h"
#include "srslte/phy/filter/filter2d.h" #include "srslte/filter/filter2d.h"
#include "srslte/phy/ch_estimation/refsignal_dl.h" #include "srslte/ch_estimation/refsignal_dl.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
/** 3GPP LTE Downlink channel estimator and equalizer. /** 3GPP LTE Downlink channel estimator and equalizer.
* Estimates the channel in the resource elements transmitting references and interpolates for the rest * Estimates the channel in the resource elements transmitting references and interpolates for the rest
@ -77,38 +77,38 @@ typedef struct {
} chest_dl_t; } chest_dl_t;
LIBLTE_API int chest_dl_init(chest_dl_t *q, SRSLTE_API int chest_dl_init(chest_dl_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void chest_dl_free(chest_dl_t *q); SRSLTE_API void chest_dl_free(chest_dl_t *q);
LIBLTE_API int chest_dl_set_filter_freq(chest_dl_t *q, SRSLTE_API int chest_dl_set_filter_freq(chest_dl_t *q,
float *filter, float *filter,
uint32_t filter_len); uint32_t filter_len);
LIBLTE_API int chest_dl_set_filter_time(chest_dl_t *q, SRSLTE_API int chest_dl_set_filter_time(chest_dl_t *q,
float *filter, float *filter,
uint32_t filter_len); uint32_t filter_len);
LIBLTE_API int chest_dl_estimate(chest_dl_t *q, SRSLTE_API int chest_dl_estimate(chest_dl_t *q,
cf_t *input, cf_t *input,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
uint32_t sf_idx); uint32_t sf_idx);
LIBLTE_API int chest_dl_estimate_port(chest_dl_t *q, SRSLTE_API int chest_dl_estimate_port(chest_dl_t *q,
cf_t *input, cf_t *input,
cf_t *ce, cf_t *ce,
uint32_t sf_idx, uint32_t sf_idx,
uint32_t port_id); uint32_t port_id);
LIBLTE_API float chest_dl_get_snr(chest_dl_t *q); SRSLTE_API float chest_dl_get_snr(chest_dl_t *q);
LIBLTE_API float chest_dl_get_noise_estimate(chest_dl_t *q); SRSLTE_API float chest_dl_get_noise_estimate(chest_dl_t *q);
LIBLTE_API float chest_dl_get_rssi(chest_dl_t *q); SRSLTE_API float chest_dl_get_rssi(chest_dl_t *q);
LIBLTE_API float chest_dl_get_rsrq(chest_dl_t *q); SRSLTE_API float chest_dl_get_rsrq(chest_dl_t *q);
LIBLTE_API float chest_dl_get_rsrp(chest_dl_t *q); SRSLTE_API float chest_dl_get_rsrp(chest_dl_t *q);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,7 +33,7 @@
*/ */
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
@ -45,39 +45,39 @@ typedef _Complex float cf_t;
/** Cell-Specific Reference Signal */ /** Cell-Specific Reference Signal */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
cf_t *pilots[2][NSUBFRAMES_X_FRAME]; // Saves the reference signal per subframe for ports 0,1 and ports 2,3 cf_t *pilots[2][NSUBFRAMES_X_FRAME]; // Saves the reference signal per subframe for ports 0,1 and ports 2,3
} refsignal_cs_t; } refsignal_cs_t;
LIBLTE_API int refsignal_cs_init(refsignal_cs_t *q, SRSLTE_API int refsignal_cs_init(refsignal_cs_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void refsignal_cs_free(refsignal_cs_t *q); SRSLTE_API void refsignal_cs_free(refsignal_cs_t *q);
LIBLTE_API int refsignal_cs_put_sf(lte_cell_t cell, SRSLTE_API int refsignal_cs_put_sf(lte_cell_t cell,
uint32_t port_id, uint32_t port_id,
cf_t *pilots, cf_t *pilots,
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int refsignal_cs_get_sf(lte_cell_t cell, SRSLTE_API int refsignal_cs_get_sf(lte_cell_t cell,
uint32_t port_id, uint32_t port_id,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *pilots); cf_t *pilots);
LIBLTE_API uint32_t refsignal_cs_fidx(lte_cell_t cell, SRSLTE_API uint32_t refsignal_cs_fidx(lte_cell_t cell,
uint32_t l, uint32_t l,
uint32_t port_id, uint32_t port_id,
uint32_t m); uint32_t m);
LIBLTE_API uint32_t refsignal_cs_nsymbol(uint32_t l, SRSLTE_API uint32_t refsignal_cs_nsymbol(uint32_t l,
lte_cp_t cp, lte_cp_t cp,
uint32_t port_id); uint32_t port_id);
LIBLTE_API uint32_t refsignal_cs_v(uint32_t port_id, SRSLTE_API uint32_t refsignal_cs_v(uint32_t port_id,
uint32_t ref_symbol_idx); uint32_t ref_symbol_idx);
LIBLTE_API uint32_t refsignal_cs_nof_symbols(uint32_t port_id); SRSLTE_API uint32_t refsignal_cs_nof_symbols(uint32_t port_id);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,8 +33,8 @@
*/ */
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/phch/pucch.h" #include "srslte/phch/pucch.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#define NOF_GROUPS_U 30 #define NOF_GROUPS_U 30
#define NOF_SEQUENCES_U 2 #define NOF_SEQUENCES_U 2
@ -43,7 +43,7 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t cyclic_shift; uint32_t cyclic_shift;
uint32_t cyclic_shift_for_drms; uint32_t cyclic_shift_for_drms;
uint32_t delta_ss; uint32_t delta_ss;
@ -53,13 +53,13 @@ typedef struct LIBLTE_API {
bool sequence_hopping_en; bool sequence_hopping_en;
}refsignal_drms_pusch_cfg_t; }refsignal_drms_pusch_cfg_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
float beta_pucch; float beta_pucch;
uint32_t nof_prb; uint32_t nof_prb;
}refsignal_srs_cfg_t; }refsignal_srs_cfg_t;
/** Uplink DeModulation Reference Signal (DMRS) */ /** Uplink DeModulation Reference Signal (DMRS) */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB]; uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB];
float *tmp_arg; float *tmp_arg;
@ -70,35 +70,35 @@ typedef struct LIBLTE_API {
} refsignal_ul_t; } refsignal_ul_t;
LIBLTE_API int refsignal_ul_init(refsignal_ul_t *q, SRSLTE_API int refsignal_ul_init(refsignal_ul_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void refsignal_ul_free(refsignal_ul_t *q); SRSLTE_API void refsignal_ul_free(refsignal_ul_t *q);
LIBLTE_API bool refsignal_drms_pusch_cfg_isvalid(refsignal_ul_t *q, SRSLTE_API bool refsignal_drms_pusch_cfg_isvalid(refsignal_ul_t *q,
refsignal_drms_pusch_cfg_t *cfg, refsignal_drms_pusch_cfg_t *cfg,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void refsignal_drms_pusch_put(refsignal_ul_t *q, SRSLTE_API void refsignal_drms_pusch_put(refsignal_ul_t *q,
refsignal_drms_pusch_cfg_t *cfg, refsignal_drms_pusch_cfg_t *cfg,
cf_t *r_pusch, cf_t *r_pusch,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t n_prb[2], uint32_t n_prb[2],
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int refsignal_dmrs_pusch_gen(refsignal_ul_t *q, SRSLTE_API int refsignal_dmrs_pusch_gen(refsignal_ul_t *q,
refsignal_drms_pusch_cfg_t *cfg, refsignal_drms_pusch_cfg_t *cfg,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t sf_idx, uint32_t sf_idx,
cf_t *r_pusch); cf_t *r_pusch);
LIBLTE_API int refsignal_dmrs_pucch_gen(refsignal_ul_t *q, SRSLTE_API int refsignal_dmrs_pucch_gen(refsignal_ul_t *q,
pucch_cfg_t *cfg, pucch_cfg_t *cfg,
uint32_t sf_idx, uint32_t sf_idx,
uint32_t n_rb, uint32_t n_rb,
cf_t *r_pucch) ; cf_t *r_pucch) ;
LIBLTE_API void refsignal_srs_gen(refsignal_ul_t *q, SRSLTE_API void refsignal_srs_gen(refsignal_ul_t *q,
refsignal_srs_cfg_t *cfg, refsignal_srs_cfg_t *cfg,
uint32_t sf_idx, uint32_t sf_idx,
cf_t *r_srs); cf_t *r_srs);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -36,22 +36,22 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
LIBLTE_API void ch_awgn_c(const cf_t* input, SRSLTE_API void ch_awgn_c(const cf_t* input,
cf_t* output, cf_t* output,
float variance, float variance,
uint32_t len); uint32_t len);
LIBLTE_API void ch_awgn_f(const float* x, SRSLTE_API void ch_awgn_f(const float* x,
float* y, float* y,
float variance, float variance,
uint32_t len); uint32_t len);
LIBLTE_API float ch_awgn_get_variance(float ebno_db, SRSLTE_API float ch_awgn_get_variance(float ebno_db,
float rate); float rate);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
const cf_t* input; const cf_t* input;
int in_len; int in_len;
struct ch_awgn_ctrl_in { struct ch_awgn_ctrl_in {
@ -62,8 +62,8 @@ typedef struct LIBLTE_API{
int out_len; int out_len;
}ch_awgn_hl; }ch_awgn_hl;
LIBLTE_API int ch_awgn_initialize(ch_awgn_hl* hl); SRSLTE_API int ch_awgn_initialize(ch_awgn_hl* hl);
LIBLTE_API int ch_awgn_work(ch_awgn_hl* hl); SRSLTE_API int ch_awgn_work(ch_awgn_hl* hl);
LIBLTE_API int ch_awgn_stop(ch_awgn_hl* hl); SRSLTE_API int ch_awgn_stop(ch_awgn_hl* hl);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -34,13 +34,13 @@
#include <stdlib.h> #include <stdlib.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/utils/dft.h" #include "srslte/utils/dft.h"
typedef _Complex float cf_t; /* this is only a shortcut */ typedef _Complex float cf_t; /* this is only a shortcut */
/* This is common for both directions */ /* This is common for both directions */
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
dft_plan_t fft_plan; dft_plan_t fft_plan;
uint32_t nof_symbols; uint32_t nof_symbols;
uint32_t symbol_sz; uint32_t symbol_sz;
@ -54,38 +54,38 @@ typedef struct LIBLTE_API{
cf_t *shift_buffer; cf_t *shift_buffer;
}lte_fft_t; }lte_fft_t;
LIBLTE_API int lte_fft_init(lte_fft_t *q, SRSLTE_API int lte_fft_init(lte_fft_t *q,
lte_cp_t cp_type, lte_cp_t cp_type,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void lte_fft_free(lte_fft_t *q); SRSLTE_API void lte_fft_free(lte_fft_t *q);
LIBLTE_API void lte_fft_run_slot(lte_fft_t *q, SRSLTE_API void lte_fft_run_slot(lte_fft_t *q,
cf_t *input, cf_t *input,
cf_t *output); cf_t *output);
LIBLTE_API void lte_fft_run_sf(lte_fft_t *q, SRSLTE_API void lte_fft_run_sf(lte_fft_t *q,
cf_t *input, cf_t *input,
cf_t *output); cf_t *output);
LIBLTE_API int lte_ifft_init(lte_fft_t *q, SRSLTE_API int lte_ifft_init(lte_fft_t *q,
lte_cp_t cp_type, lte_cp_t cp_type,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void lte_ifft_free(lte_fft_t *q); SRSLTE_API void lte_ifft_free(lte_fft_t *q);
LIBLTE_API void lte_ifft_run_slot(lte_fft_t *q, SRSLTE_API void lte_ifft_run_slot(lte_fft_t *q,
cf_t *input, cf_t *input,
cf_t *output); cf_t *output);
LIBLTE_API void lte_ifft_run_sf(lte_fft_t *q, SRSLTE_API void lte_ifft_run_sf(lte_fft_t *q,
cf_t *input, cf_t *input,
cf_t *output); cf_t *output);
LIBLTE_API int lte_fft_set_freq_shift(lte_fft_t *q, SRSLTE_API int lte_fft_set_freq_shift(lte_fft_t *q,
float freq_shift); float freq_shift);
LIBLTE_API void lte_fft_set_normalize(lte_fft_t *q, SRSLTE_API void lte_fft_set_normalize(lte_fft_t *q,
bool normalize_enable); bool normalize_enable);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -123,10 +123,10 @@ typedef enum {CPNORM, CPEXT} lte_cp_t;
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef enum LIBLTE_API { PHICH_NORM = 0, PHICH_EXT} phich_length_t; typedef enum SRSLTE_API { PHICH_NORM = 0, PHICH_EXT} phich_length_t;
typedef enum LIBLTE_API { R_1_6 = 0, R_1_2, R_1, R_2} phich_resources_t; typedef enum SRSLTE_API { R_1_6 = 0, R_1_2, R_1, R_2} phich_resources_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t nof_prb; uint32_t nof_prb;
uint32_t nof_ports; uint32_t nof_ports;
uint32_t bw_idx; uint32_t bw_idx;
@ -136,15 +136,15 @@ typedef struct LIBLTE_API {
phich_resources_t phich_resources; phich_resources_t phich_resources;
}lte_cell_t; }lte_cell_t;
typedef enum LIBLTE_API { typedef enum SRSLTE_API {
SINGLE_ANTENNA,TX_DIVERSITY, SPATIAL_MULTIPLEX SINGLE_ANTENNA,TX_DIVERSITY, SPATIAL_MULTIPLEX
} lte_mimo_type_t; } lte_mimo_type_t;
typedef enum LIBLTE_API { typedef enum SRSLTE_API {
LTE_BPSK = 0, LTE_QPSK = 1, LTE_QAM16 = 2, LTE_QAM64 = 3 LTE_BPSK = 0, LTE_QPSK = 1, LTE_QAM16 = 2, LTE_QAM64 = 3
} lte_mod_t; } lte_mod_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
int id; int id;
float fd; float fd;
} lte_earfcn_t; } lte_earfcn_t;
@ -153,76 +153,76 @@ enum band_geographical_area {
ALL, NAR, APAC, EMEA, JAPAN, CALA, NA ALL, NAR, APAC, EMEA, JAPAN, CALA, NA
}; };
LIBLTE_API bool lte_cell_isvalid(lte_cell_t *cell); SRSLTE_API bool lte_cell_isvalid(lte_cell_t *cell);
LIBLTE_API void lte_cell_fprint(FILE *stream, SRSLTE_API void lte_cell_fprint(FILE *stream,
lte_cell_t *cell); lte_cell_t *cell);
LIBLTE_API bool lte_cellid_isvalid(uint32_t cell_id); SRSLTE_API bool lte_cellid_isvalid(uint32_t cell_id);
LIBLTE_API bool lte_nofprb_isvalid(uint32_t nof_prb); SRSLTE_API bool lte_nofprb_isvalid(uint32_t nof_prb);
LIBLTE_API bool lte_sfidx_isvalid(uint32_t sf_idx); SRSLTE_API bool lte_sfidx_isvalid(uint32_t sf_idx);
LIBLTE_API bool lte_portid_isvalid(uint32_t port_id); SRSLTE_API bool lte_portid_isvalid(uint32_t port_id);
LIBLTE_API bool lte_N_id_2_isvalid(uint32_t N_id_2); SRSLTE_API bool lte_N_id_2_isvalid(uint32_t N_id_2);
LIBLTE_API bool lte_N_id_1_isvalid(uint32_t N_id_1); SRSLTE_API bool lte_N_id_1_isvalid(uint32_t N_id_1);
LIBLTE_API bool lte_symbol_sz_isvalid(uint32_t symbol_sz); SRSLTE_API bool lte_symbol_sz_isvalid(uint32_t symbol_sz);
LIBLTE_API int lte_symbol_sz(uint32_t nof_prb); SRSLTE_API int lte_symbol_sz(uint32_t nof_prb);
LIBLTE_API int lte_sampling_freq_hz(uint32_t nof_prb); SRSLTE_API int lte_sampling_freq_hz(uint32_t nof_prb);
LIBLTE_API uint32_t lte_re_x_prb(uint32_t ns, SRSLTE_API uint32_t lte_re_x_prb(uint32_t ns,
uint32_t symbol, uint32_t symbol,
uint32_t nof_ports, uint32_t nof_ports,
uint32_t nof_symbols); uint32_t nof_symbols);
LIBLTE_API uint32_t lte_voffset(uint32_t symbol_id, SRSLTE_API uint32_t lte_voffset(uint32_t symbol_id,
uint32_t cell_id, uint32_t cell_id,
uint32_t nof_ports); uint32_t nof_ports);
LIBLTE_API uint32_t lte_N_ta_new_rar(uint32_t ta); SRSLTE_API uint32_t lte_N_ta_new_rar(uint32_t ta);
LIBLTE_API uint32_t lte_N_ta_new(uint32_t N_ta_old, SRSLTE_API uint32_t lte_N_ta_new(uint32_t N_ta_old,
uint32_t ta); uint32_t ta);
LIBLTE_API int lte_cb_size(uint32_t index); SRSLTE_API int lte_cb_size(uint32_t index);
LIBLTE_API bool lte_cb_size_isvalid(uint32_t size); SRSLTE_API bool lte_cb_size_isvalid(uint32_t size);
LIBLTE_API char *lte_cp_string(lte_cp_t cp); SRSLTE_API char *lte_cp_string(lte_cp_t cp);
LIBLTE_API char *lte_mod_string(lte_mod_t mod); SRSLTE_API char *lte_mod_string(lte_mod_t mod);
LIBLTE_API uint32_t lte_mod_bits_x_symbol(lte_mod_t mod); SRSLTE_API uint32_t lte_mod_bits_x_symbol(lte_mod_t mod);
LIBLTE_API int lte_find_cb_index(uint32_t long_cb); SRSLTE_API int lte_find_cb_index(uint32_t long_cb);
LIBLTE_API float lte_band_fd(uint32_t earfcn); SRSLTE_API float lte_band_fd(uint32_t earfcn);
LIBLTE_API int lte_band_get_fd_band(uint32_t band, SRSLTE_API int lte_band_get_fd_band(uint32_t band,
lte_earfcn_t *earfcn, lte_earfcn_t *earfcn,
int earfcn_start, int earfcn_start,
int earfcn_end, int earfcn_end,
uint32_t max_elems); uint32_t max_elems);
LIBLTE_API int lte_band_get_fd_band_all(uint32_t band, SRSLTE_API int lte_band_get_fd_band_all(uint32_t band,
lte_earfcn_t *earfcn, lte_earfcn_t *earfcn,
uint32_t max_nelems); uint32_t max_nelems);
LIBLTE_API int lte_band_get_fd_region(enum band_geographical_area region, SRSLTE_API int lte_band_get_fd_region(enum band_geographical_area region,
lte_earfcn_t *earfcn, lte_earfcn_t *earfcn,
uint32_t max_elems); uint32_t max_elems);
LIBLTE_API int lte_str2mimotype(char *mimo_type_str, SRSLTE_API int lte_str2mimotype(char *mimo_type_str,
lte_mimo_type_t *type); lte_mimo_type_t *type);
LIBLTE_API char *lte_mimotype2str(lte_mimo_type_t type); SRSLTE_API char *lte_mimotype2str(lte_mimo_type_t type);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,49 +29,49 @@
#define LTESEQ_ #define LTESEQ_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t *c; uint8_t *c;
uint32_t len; uint32_t len;
} sequence_t; } sequence_t;
LIBLTE_API int sequence_init(sequence_t *q, uint32_t len); SRSLTE_API int sequence_init(sequence_t *q, uint32_t len);
LIBLTE_API void sequence_free(sequence_t *q); SRSLTE_API void sequence_free(sequence_t *q);
LIBLTE_API int sequence_LTE_pr(sequence_t *q, SRSLTE_API int sequence_LTE_pr(sequence_t *q,
uint32_t len, uint32_t len,
uint32_t seed); uint32_t seed);
LIBLTE_API void sequence_set_LTE_pr(sequence_t *q, SRSLTE_API void sequence_set_LTE_pr(sequence_t *q,
uint32_t seed); uint32_t seed);
LIBLTE_API int sequence_pbch(sequence_t *seq, SRSLTE_API int sequence_pbch(sequence_t *seq,
lte_cp_t cp, lte_cp_t cp,
uint32_t cell_id); uint32_t cell_id);
LIBLTE_API int sequence_pcfich(sequence_t *seq, SRSLTE_API int sequence_pcfich(sequence_t *seq,
uint32_t nslot, uint32_t nslot,
uint32_t cell_id); uint32_t cell_id);
LIBLTE_API int sequence_phich(sequence_t *seq, SRSLTE_API int sequence_phich(sequence_t *seq,
uint32_t nslot, uint32_t nslot,
uint32_t cell_id); uint32_t cell_id);
LIBLTE_API int sequence_pdcch(sequence_t *seq, SRSLTE_API int sequence_pdcch(sequence_t *seq,
uint32_t nslot, uint32_t nslot,
uint32_t cell_id, uint32_t cell_id,
uint32_t len); uint32_t len);
LIBLTE_API int sequence_pdsch(sequence_t *seq, SRSLTE_API int sequence_pdsch(sequence_t *seq,
unsigned short rnti, unsigned short rnti,
int q, int q,
uint32_t nslot, uint32_t nslot,
uint32_t cell_id, uint32_t cell_id,
uint32_t len); uint32_t len);
LIBLTE_API int sequence_pusch(sequence_t *seq, SRSLTE_API int sequence_pusch(sequence_t *seq,
unsigned short rnti, unsigned short rnti,
uint32_t nslot, uint32_t nslot,
uint32_t cell_id, uint32_t cell_id,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -39,15 +39,15 @@
* Only positive timestamps are supported. * Only positive timestamps are supported.
*/ */
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
time_t full_secs; time_t full_secs;
double frac_secs; double frac_secs;
}timestamp_t; }timestamp_t;
LIBLTE_API int timestamp_init(timestamp_t *t, time_t full_secs, double frac_secs); SRSLTE_API int timestamp_init(timestamp_t *t, time_t full_secs, double frac_secs);
LIBLTE_API int timestamp_copy(timestamp_t *dest, timestamp_t *src); SRSLTE_API int timestamp_copy(timestamp_t *dest, timestamp_t *src);
LIBLTE_API int timestamp_add(timestamp_t *t, time_t full_secs, double frac_secs); SRSLTE_API int timestamp_add(timestamp_t *t, time_t full_secs, double frac_secs);
LIBLTE_API int timestamp_sub(timestamp_t *t, time_t full_secs, double frac_secs); SRSLTE_API int timestamp_sub(timestamp_t *t, time_t full_secs, double frac_secs);
LIBLTE_API double timestamp_real(timestamp_t *t); SRSLTE_API double timestamp_real(timestamp_t *t);
#endif // TIMESTAMP_ #endif // TIMESTAMP_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,18 +33,18 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t R; uint32_t R;
uint32_t K; uint32_t K;
uint32_t poly[3]; uint32_t poly[3];
bool tail_biting; bool tail_biting;
}convcoder_t; }convcoder_t;
LIBLTE_API int convcoder_encode(convcoder_t *q, uint8_t *input, uint8_t *output, uint32_t frame_length); SRSLTE_API int convcoder_encode(convcoder_t *q, uint8_t *input, uint8_t *output, uint32_t frame_length);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
convcoder_t obj; convcoder_t obj;
struct convcoder_ctrl_in { struct convcoder_ctrl_in {
int rate; int rate;
@ -61,8 +61,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}convcoder_hl; }convcoder_hl;
LIBLTE_API int convcoder_initialize(convcoder_hl* h); SRSLTE_API int convcoder_initialize(convcoder_hl* h);
LIBLTE_API int convcoder_work(convcoder_hl* hl); SRSLTE_API int convcoder_work(convcoder_hl* hl);
LIBLTE_API int convcoder_stop(convcoder_hl* h); SRSLTE_API int convcoder_stop(convcoder_hl* h);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -32,7 +32,7 @@
#include "srslte/config.h" #include "srslte/config.h"
#include <stdint.h> #include <stdint.h>
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
unsigned long table[256]; unsigned long table[256];
uint8_t byte; uint8_t byte;
int polynom; int polynom;
@ -43,9 +43,9 @@ typedef struct LIBLTE_API {
uint32_t crc_out; uint32_t crc_out;
} crc_t; } crc_t;
LIBLTE_API int crc_init(crc_t *h, uint32_t crc_poly, int crc_order); SRSLTE_API int crc_init(crc_t *h, uint32_t crc_poly, int crc_order);
LIBLTE_API int crc_set_init(crc_t *h, unsigned long crc_init_value); SRSLTE_API int crc_set_init(crc_t *h, unsigned long crc_init_value);
LIBLTE_API void crc_attach(crc_t *h, uint8_t *data, int len); SRSLTE_API void crc_attach(crc_t *h, uint8_t *data, int len);
LIBLTE_API uint32_t crc_checksum(crc_t *h, uint8_t *data, int len); SRSLTE_API uint32_t crc_checksum(crc_t *h, uint8_t *data, int len);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,19 +37,19 @@
#ifndef TX_NULL #ifndef TX_NULL
#define TX_NULL 100 #define TX_NULL 100
#endif #endif
LIBLTE_API int rm_conv_tx(uint8_t *input, SRSLTE_API int rm_conv_tx(uint8_t *input,
uint32_t in_len, uint32_t in_len,
uint8_t *output, uint8_t *output,
uint32_t out_len); uint32_t out_len);
LIBLTE_API int rm_conv_rx(float *input, SRSLTE_API int rm_conv_rx(float *input,
uint32_t in_len, uint32_t in_len,
float *output, float *output,
uint32_t out_len); uint32_t out_len);
/* High-level API */ /* High-level API */
typedef struct typedef struct
LIBLTE_API { SRSLTE_API {
struct rm_conv_init { struct rm_conv_init {
int direction; int direction;
} init; } init;
@ -63,8 +63,8 @@ typedef struct
int out_len; int out_len;
} rm_conv_hl; } rm_conv_hl;
LIBLTE_API int rm_conv_initialize(rm_conv_hl* h); SRSLTE_API int rm_conv_initialize(rm_conv_hl* h);
LIBLTE_API int rm_conv_work(rm_conv_hl* hl); SRSLTE_API int rm_conv_work(rm_conv_hl* hl);
LIBLTE_API int rm_conv_stop(rm_conv_hl* hl); SRSLTE_API int rm_conv_stop(rm_conv_hl* hl);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -41,7 +41,7 @@
#include "srslte/config.h" #include "srslte/config.h"
LIBLTE_API int rm_turbo_tx(uint8_t *w_buff, SRSLTE_API int rm_turbo_tx(uint8_t *w_buff,
uint32_t buff_len, uint32_t buff_len,
uint8_t *input, uint8_t *input,
uint32_t in_len, uint32_t in_len,
@ -49,7 +49,7 @@ LIBLTE_API int rm_turbo_tx(uint8_t *w_buff,
uint32_t out_len, uint32_t out_len,
uint32_t rv_idx); uint32_t rv_idx);
LIBLTE_API int rm_turbo_rx(float *w_buff, SRSLTE_API int rm_turbo_rx(float *w_buff,
uint32_t buff_len, uint32_t buff_len,
float *input, float *input,
uint32_t in_len, uint32_t in_len,
@ -59,7 +59,7 @@ LIBLTE_API int rm_turbo_rx(float *w_buff,
uint32_t nof_filler_bits); uint32_t nof_filler_bits);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
struct rm_turbo_init { struct rm_turbo_init {
int direction; int direction;
@ -75,8 +75,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
} rm_turbo_hl; } rm_turbo_hl;
LIBLTE_API int rm_turbo_initialize(rm_turbo_hl* h); SRSLTE_API int rm_turbo_initialize(rm_turbo_hl* h);
LIBLTE_API int rm_turbo_work(rm_turbo_hl* hl); SRSLTE_API int rm_turbo_work(rm_turbo_hl* hl);
LIBLTE_API int rm_turbo_stop(rm_turbo_hl* hl); SRSLTE_API int rm_turbo_stop(rm_turbo_hl* hl);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,16 +30,16 @@
#include "srslte/config.h" #include "srslte/config.h"
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t *forward; uint32_t *forward;
uint32_t *reverse; uint32_t *reverse;
uint32_t max_long_cb; uint32_t max_long_cb;
} tc_interl_t; } tc_interl_t;
LIBLTE_API int tc_interl_LTE_gen(tc_interl_t *h, uint32_t long_cb); SRSLTE_API int tc_interl_LTE_gen(tc_interl_t *h, uint32_t long_cb);
LIBLTE_API int tc_interl_UMTS_gen(tc_interl_t *h, uint32_t long_cb); SRSLTE_API int tc_interl_UMTS_gen(tc_interl_t *h, uint32_t long_cb);
LIBLTE_API int tc_interl_init(tc_interl_t *h, uint32_t max_long_cb); SRSLTE_API int tc_interl_init(tc_interl_t *h, uint32_t max_long_cb);
LIBLTE_API void tc_interl_free(tc_interl_t *h); SRSLTE_API void tc_interl_free(tc_interl_t *h);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,7 +29,7 @@
#define TURBOCODER_ #define TURBOCODER_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/fec/tc_interl.h" #include "srslte/fec/tc_interl.h"
#define NUMREGS 3 #define NUMREGS 3
@ -40,14 +40,14 @@
#define TX_NULL 100 #define TX_NULL 100
#endif #endif
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t max_long_cb; uint32_t max_long_cb;
tc_interl_t interl; tc_interl_t interl;
} tcod_t; } tcod_t;
LIBLTE_API int tcod_init(tcod_t *h, uint32_t max_long_cb); SRSLTE_API int tcod_init(tcod_t *h, uint32_t max_long_cb);
LIBLTE_API void tcod_free(tcod_t *h); SRSLTE_API void tcod_free(tcod_t *h);
LIBLTE_API int tcod_encode(tcod_t *h, uint8_t *input, uint8_t *output, uint32_t long_cb); SRSLTE_API int tcod_encode(tcod_t *h, uint8_t *input, uint8_t *output, uint32_t long_cb);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,7 +29,7 @@
#define TURBODECODER_ #define TURBODECODER_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/fec/tc_interl.h" #include "srslte/fec/tc_interl.h"
#define RATE 3 #define RATE 3
#define TOTALTAIL 12 #define TOTALTAIL 12
@ -49,12 +49,12 @@
typedef float llr_t; typedef float llr_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
int max_long_cb; int max_long_cb;
llr_t *beta; llr_t *beta;
} map_gen_t; } map_gen_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
int max_long_cb; int max_long_cb;
map_gen_t dec; map_gen_t dec;
@ -68,22 +68,22 @@ typedef struct LIBLTE_API {
tc_interl_t interleaver; tc_interl_t interleaver;
} tdec_t; } tdec_t;
LIBLTE_API int tdec_init(tdec_t * h, SRSLTE_API int tdec_init(tdec_t * h,
uint32_t max_long_cb); uint32_t max_long_cb);
LIBLTE_API void tdec_free(tdec_t * h); SRSLTE_API void tdec_free(tdec_t * h);
LIBLTE_API int tdec_reset(tdec_t * h, uint32_t long_cb); SRSLTE_API int tdec_reset(tdec_t * h, uint32_t long_cb);
LIBLTE_API void tdec_iteration(tdec_t * h, SRSLTE_API void tdec_iteration(tdec_t * h,
llr_t * input, llr_t * input,
uint32_t long_cb); uint32_t long_cb);
LIBLTE_API void tdec_decision(tdec_t * h, SRSLTE_API void tdec_decision(tdec_t * h,
uint8_t *output, uint8_t *output,
uint32_t long_cb); uint32_t long_cb);
LIBLTE_API int tdec_run_all(tdec_t * h, SRSLTE_API int tdec_run_all(tdec_t * h,
llr_t * input, llr_t * input,
uint8_t *output, uint8_t *output,
uint32_t nof_iterations, uint32_t nof_iterations,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -36,7 +36,7 @@ typedef enum {
viterbi_27, viterbi_29, viterbi_37, viterbi_39 viterbi_27, viterbi_29, viterbi_37, viterbi_39
}viterbi_type_t; }viterbi_type_t;
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
void *ptr; void *ptr;
uint32_t R; uint32_t R;
uint32_t K; uint32_t K;
@ -51,30 +51,30 @@ typedef struct LIBLTE_API{
uint8_t *symbols_uc; uint8_t *symbols_uc;
}viterbi_t; }viterbi_t;
LIBLTE_API int viterbi_init(viterbi_t *q, SRSLTE_API int viterbi_init(viterbi_t *q,
viterbi_type_t type, viterbi_type_t type,
uint32_t poly[3], uint32_t poly[3],
uint32_t max_frame_length, uint32_t max_frame_length,
bool tail_bitting); bool tail_bitting);
LIBLTE_API void viterbi_set_gain_quant(viterbi_t *q, SRSLTE_API void viterbi_set_gain_quant(viterbi_t *q,
float gain_quant); float gain_quant);
LIBLTE_API void viterbi_free(viterbi_t *q); SRSLTE_API void viterbi_free(viterbi_t *q);
LIBLTE_API int viterbi_decode_f(viterbi_t *q, SRSLTE_API int viterbi_decode_f(viterbi_t *q,
float *symbols, float *symbols,
uint8_t *data, uint8_t *data,
uint32_t frame_length); uint32_t frame_length);
LIBLTE_API int viterbi_decode_uc(viterbi_t *q, SRSLTE_API int viterbi_decode_uc(viterbi_t *q,
uint8_t *symbols, uint8_t *symbols,
uint8_t *data, uint8_t *data,
uint32_t frame_length); uint32_t frame_length);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
viterbi_t obj; viterbi_t obj;
struct viterbi_init { struct viterbi_init {
int rate; int rate;
@ -91,8 +91,8 @@ typedef struct LIBLTE_API{
int out_len; int out_len;
}viterbi_hl; }viterbi_hl;
LIBLTE_API int viterbi_initialize(viterbi_hl* h); SRSLTE_API int viterbi_initialize(viterbi_hl* h);
LIBLTE_API int viterbi_work(viterbi_hl* hl); SRSLTE_API int viterbi_work(viterbi_hl* hl);
LIBLTE_API int viterbi_stop(viterbi_hl* h); SRSLTE_API int viterbi_stop(viterbi_hl* h);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,13 +30,13 @@
#define DFTPREC_ #define DFTPREC_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/utils/dft.h" #include "srslte/utils/dft.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
/* DFT-based Transform Precoding object */ /* DFT-based Transform Precoding object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t max_prb; uint32_t max_prb;
dft_plan_t dft_plan[MAX_PRB]; dft_plan_t dft_plan[MAX_PRB];
@ -44,20 +44,20 @@ typedef struct LIBLTE_API {
}dft_precoding_t; }dft_precoding_t;
LIBLTE_API int dft_precoding_init(dft_precoding_t *q, SRSLTE_API int dft_precoding_init(dft_precoding_t *q,
uint32_t max_prb); uint32_t max_prb);
LIBLTE_API void dft_precoding_free(dft_precoding_t *q); SRSLTE_API void dft_precoding_free(dft_precoding_t *q);
LIBLTE_API bool dft_precoding_valid_prb(uint32_t nof_prb); SRSLTE_API bool dft_precoding_valid_prb(uint32_t nof_prb);
LIBLTE_API int dft_precoding(dft_precoding_t *q, SRSLTE_API int dft_precoding(dft_precoding_t *q,
cf_t *input, cf_t *input,
cf_t *output, cf_t *output,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t nof_symbols); uint32_t nof_symbols);
LIBLTE_API int dft_predecoding(dft_precoding_t *q, SRSLTE_API int dft_predecoding(dft_precoding_t *q,
cf_t *input, cf_t *input,
cf_t *output, cf_t *output,
uint32_t nof_prb, uint32_t nof_prb,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,7 +38,7 @@
*/ */
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
uint32_t sztime; // Output signal size in the time domain uint32_t sztime; // Output signal size in the time domain
uint32_t szfreq; // Output signal size in the freq domain uint32_t szfreq; // Output signal size in the freq domain
uint32_t ntime; // 2-D Filter size in time domain uint32_t ntime; // 2-D Filter size in time domain
@ -48,33 +48,33 @@ typedef struct LIBLTE_API{
cf_t *output; // Output signal cf_t *output; // Output signal
} filter2d_t; } filter2d_t;
LIBLTE_API int filter2d_init (filter2d_t* q, SRSLTE_API int filter2d_init (filter2d_t* q,
float **taps, float **taps,
uint32_t ntime, uint32_t ntime,
uint32_t nfreq, uint32_t nfreq,
uint32_t sztime, uint32_t sztime,
uint32_t szfreq); uint32_t szfreq);
LIBLTE_API int filter2d_init_ones (filter2d_t* q, SRSLTE_API int filter2d_init_ones (filter2d_t* q,
uint32_t ntime, uint32_t ntime,
uint32_t nfreq, uint32_t nfreq,
uint32_t sztime, uint32_t sztime,
uint32_t szfreq); uint32_t szfreq);
LIBLTE_API void filter2d_free(filter2d_t *q); SRSLTE_API void filter2d_free(filter2d_t *q);
LIBLTE_API void filter2d_step(filter2d_t *q); SRSLTE_API void filter2d_step(filter2d_t *q);
LIBLTE_API void filter2d_reset(filter2d_t *q); SRSLTE_API void filter2d_reset(filter2d_t *q);
LIBLTE_API void filter2d_add(filter2d_t *q, SRSLTE_API void filter2d_add(filter2d_t *q,
cf_t h, cf_t h,
uint32_t time_idx, uint32_t time_idx,
uint32_t freq_idx); uint32_t freq_idx);
LIBLTE_API void filter2d_add_out(filter2d_t *q, cf_t x, int time_idx, int freq_idx); SRSLTE_API void filter2d_add_out(filter2d_t *q, cf_t x, int time_idx, int freq_idx);
LIBLTE_API void filter2d_get_symbol(filter2d_t *q, SRSLTE_API void filter2d_get_symbol(filter2d_t *q,
uint32_t nsymbol, uint32_t nsymbol,
cf_t *output); cf_t *output);
#endif // FILTER2D_ #endif // FILTER2D_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -34,7 +34,7 @@
#include "srslte/config.h" #include "srslte/config.h"
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API{ typedef struct SRSLTE_API{
uint32_t seed; uint32_t seed;
uint32_t *seq_buff; uint32_t *seq_buff;
int seq_buff_nwords; int seq_buff_nwords;
@ -42,16 +42,16 @@ typedef struct LIBLTE_API{
int seq_cache_rp; int seq_cache_rp;
}binsource_t; }binsource_t;
LIBLTE_API void binsource_init(binsource_t* q); SRSLTE_API void binsource_init(binsource_t* q);
LIBLTE_API void binsource_free(binsource_t* q); SRSLTE_API void binsource_free(binsource_t* q);
LIBLTE_API void binsource_seed_set(binsource_t* q, uint32_t seed); SRSLTE_API void binsource_seed_set(binsource_t* q, uint32_t seed);
LIBLTE_API void binsource_seed_time(binsource_t *q); SRSLTE_API void binsource_seed_time(binsource_t *q);
LIBLTE_API int binsource_cache_gen(binsource_t* q, int nbits); SRSLTE_API int binsource_cache_gen(binsource_t* q, int nbits);
LIBLTE_API void binsource_cache_cpy(binsource_t* q, uint8_t *bits, int nbits); SRSLTE_API void binsource_cache_cpy(binsource_t* q, uint8_t *bits, int nbits);
LIBLTE_API int binsource_generate(binsource_t* q, uint8_t *bits, int nbits); SRSLTE_API int binsource_generate(binsource_t* q, uint8_t *bits, int nbits);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
binsource_t obj; binsource_t obj;
struct binsource_init { struct binsource_init {
int cache_seq_nbits; // If non-zero, generates random bits on init int cache_seq_nbits; // If non-zero, generates random bits on init
@ -64,8 +64,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}binsource_hl; }binsource_hl;
LIBLTE_API int binsource_initialize(binsource_hl* h); SRSLTE_API int binsource_initialize(binsource_hl* h);
LIBLTE_API int binsource_work( binsource_hl* hl); SRSLTE_API int binsource_work( binsource_hl* hl);
LIBLTE_API int binsource_stop(binsource_hl* hl); SRSLTE_API int binsource_stop(binsource_hl* hl);
#endif // BINSOURCE_ #endif // BINSOURCE_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,22 +33,22 @@
#include <stdlib.h> #include <stdlib.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/io/format.h" #include "srslte/io/format.h"
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
FILE *f; FILE *f;
data_type_t type; data_type_t type;
}filesink_t; }filesink_t;
LIBLTE_API int filesink_init(filesink_t *q, char *filename, data_type_t type); SRSLTE_API int filesink_init(filesink_t *q, char *filename, data_type_t type);
LIBLTE_API void filesink_free(filesink_t *q); SRSLTE_API void filesink_free(filesink_t *q);
LIBLTE_API int filesink_write(filesink_t *q, void *buffer, int nsamples); SRSLTE_API int filesink_write(filesink_t *q, void *buffer, int nsamples);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
filesink_t obj; filesink_t obj;
struct filesink_init { struct filesink_init {
char *file_name; char *file_name;
@ -59,8 +59,8 @@ typedef struct LIBLTE_API {
int in_len; int in_len;
}filesink_hl; }filesink_hl;
LIBLTE_API int filesink_initialize(filesink_hl* h); SRSLTE_API int filesink_initialize(filesink_hl* h);
LIBLTE_API int filesink_work( filesink_hl* hl); SRSLTE_API int filesink_work( filesink_hl* hl);
LIBLTE_API int filesink_stop(filesink_hl* h); SRSLTE_API int filesink_stop(filesink_hl* h);
#endif // FILESINK_ #endif // FILESINK_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,23 +33,23 @@
#include <stdlib.h> #include <stdlib.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/io/format.h" #include "srslte/io/format.h"
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
FILE *f; FILE *f;
data_type_t type; data_type_t type;
}filesource_t; }filesource_t;
LIBLTE_API int filesource_init(filesource_t *q, char *filename, data_type_t type); SRSLTE_API int filesource_init(filesource_t *q, char *filename, data_type_t type);
LIBLTE_API void filesource_free(filesource_t *q); SRSLTE_API void filesource_free(filesource_t *q);
LIBLTE_API void filesource_seek(filesource_t *q, int pos); SRSLTE_API void filesource_seek(filesource_t *q, int pos);
LIBLTE_API int filesource_read(filesource_t *q, void *buffer, int nsamples); SRSLTE_API int filesource_read(filesource_t *q, void *buffer, int nsamples);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
filesource_t obj; filesource_t obj;
struct filesource_init { struct filesource_init {
char *file_name; char *file_name;
@ -63,8 +63,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}filesource_hl; }filesource_hl;
LIBLTE_API int filesource_initialize(filesource_hl* h); SRSLTE_API int filesource_initialize(filesource_hl* h);
LIBLTE_API int filesource_work( filesource_hl* hl); SRSLTE_API int filesource_work( filesource_hl* hl);
LIBLTE_API int filesource_stop(filesource_hl* h); SRSLTE_API int filesource_stop(filesource_hl* h);
#endif // FILESOURCE_ #endif // FILESOURCE_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -41,29 +41,29 @@
typedef enum {NETSINK_UDP, NETSINK_TCP} netsink_type_t; typedef enum {NETSINK_UDP, NETSINK_TCP} netsink_type_t;
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
int sockfd; int sockfd;
bool connected; bool connected;
netsink_type_t type; netsink_type_t type;
struct sockaddr_in servaddr; struct sockaddr_in servaddr;
}netsink_t; }netsink_t;
LIBLTE_API int netsink_init(netsink_t *q, SRSLTE_API int netsink_init(netsink_t *q,
char *address, char *address,
int port, int port,
netsink_type_t type); netsink_type_t type);
LIBLTE_API void netsink_free(netsink_t *q); SRSLTE_API void netsink_free(netsink_t *q);
LIBLTE_API int netsink_write(netsink_t *q, SRSLTE_API int netsink_write(netsink_t *q,
void *buffer, void *buffer,
int nof_bytes); int nof_bytes);
LIBLTE_API int netsink_set_nonblocking(netsink_t *q); SRSLTE_API int netsink_set_nonblocking(netsink_t *q);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
netsink_t obj; netsink_t obj;
struct netsink_init { struct netsink_init {
char *address; char *address;
@ -75,8 +75,8 @@ typedef struct LIBLTE_API {
int in_len; int in_len;
}netsink_hl; }netsink_hl;
LIBLTE_API int netsink_initialize(netsink_hl* h); SRSLTE_API int netsink_initialize(netsink_hl* h);
LIBLTE_API int netsink_work( netsink_hl* hl); SRSLTE_API int netsink_work( netsink_hl* hl);
LIBLTE_API int netsink_stop(netsink_hl* h); SRSLTE_API int netsink_stop(netsink_hl* h);
#endif // UDPSINK_ #endif // UDPSINK_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -41,7 +41,7 @@
typedef enum {NETSOURCE_UDP, NETSOURCE_TCP} netsource_type_t; typedef enum {NETSOURCE_UDP, NETSOURCE_TCP} netsource_type_t;
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
int sockfd; int sockfd;
int connfd; int connfd;
struct sockaddr_in servaddr; struct sockaddr_in servaddr;
@ -49,25 +49,25 @@ typedef struct LIBLTE_API {
struct sockaddr_in cliaddr; struct sockaddr_in cliaddr;
}netsource_t; }netsource_t;
LIBLTE_API int netsource_init(netsource_t *q, SRSLTE_API int netsource_init(netsource_t *q,
char *address, char *address,
int port, int port,
netsource_type_t type); netsource_type_t type);
LIBLTE_API void netsource_free(netsource_t *q); SRSLTE_API void netsource_free(netsource_t *q);
LIBLTE_API int netsource_set_nonblocking(netsource_t *q); SRSLTE_API int netsource_set_nonblocking(netsource_t *q);
LIBLTE_API int netsource_read(netsource_t *q, SRSLTE_API int netsource_read(netsource_t *q,
void *buffer, void *buffer,
int nof_bytes); int nof_bytes);
LIBLTE_API int netsource_set_timeout(netsource_t *q, SRSLTE_API int netsource_set_timeout(netsource_t *q,
uint32_t microseconds); uint32_t microseconds);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
netsource_t obj; netsource_t obj;
struct netsource_init { struct netsource_init {
char *address; char *address;
@ -81,8 +81,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}netsource_hl; }netsource_hl;
LIBLTE_API int netsource_initialize(netsource_hl* h); SRSLTE_API int netsource_initialize(netsource_hl* h);
LIBLTE_API int netsource_work( netsource_hl* hl); SRSLTE_API int netsource_work( netsource_hl* hl);
LIBLTE_API int netsource_stop(netsource_hl* h); SRSLTE_API int netsource_stop(netsource_hl* h);
#endif // UDPSOURCE_ #endif // UDPSOURCE_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -35,21 +35,21 @@ typedef _Complex float cf_t;
/* Generates the vector of layer-mapped symbols "x" based on the vector of data symbols "d" /* Generates the vector of layer-mapped symbols "x" based on the vector of data symbols "d"
*/ */
LIBLTE_API int layermap_single(cf_t *d, cf_t *x, int nof_symbols); SRSLTE_API int layermap_single(cf_t *d, cf_t *x, int nof_symbols);
LIBLTE_API int layermap_diversity(cf_t *d, cf_t *x[MAX_LAYERS], int nof_layers, int nof_symbols); SRSLTE_API int layermap_diversity(cf_t *d, cf_t *x[MAX_LAYERS], int nof_layers, int nof_symbols);
LIBLTE_API int layermap_multiplex(cf_t *d[MAX_CODEWORDS], cf_t *x[MAX_LAYERS], int nof_cw, int nof_layers, SRSLTE_API int layermap_multiplex(cf_t *d[MAX_CODEWORDS], cf_t *x[MAX_LAYERS], int nof_cw, int nof_layers,
int nof_symbols[MAX_CODEWORDS]); int nof_symbols[MAX_CODEWORDS]);
LIBLTE_API int layermap_type(cf_t *d[MAX_CODEWORDS], cf_t *x[MAX_LAYERS], int nof_cw, int nof_layers, SRSLTE_API int layermap_type(cf_t *d[MAX_CODEWORDS], cf_t *x[MAX_LAYERS], int nof_cw, int nof_layers,
int nof_symbols[MAX_CODEWORDS], lte_mimo_type_t type); int nof_symbols[MAX_CODEWORDS], lte_mimo_type_t type);
/* Generates the vector of data symbols "d" based on the vector of layer-mapped symbols "x" /* Generates the vector of data symbols "d" based on the vector of layer-mapped symbols "x"
*/ */
LIBLTE_API int layerdemap_single(cf_t *x, cf_t *d, int nof_symbols); SRSLTE_API int layerdemap_single(cf_t *x, cf_t *d, int nof_symbols);
LIBLTE_API int layerdemap_diversity(cf_t *x[MAX_LAYERS], cf_t *d, int nof_layers, int nof_layer_symbols); SRSLTE_API int layerdemap_diversity(cf_t *x[MAX_LAYERS], cf_t *d, int nof_layers, int nof_layer_symbols);
LIBLTE_API int layerdemap_multiplex(cf_t *x[MAX_LAYERS], cf_t *d[MAX_CODEWORDS], int nof_layers, int nof_cw, SRSLTE_API int layerdemap_multiplex(cf_t *x[MAX_LAYERS], cf_t *d[MAX_CODEWORDS], int nof_layers, int nof_cw,
int nof_layer_symbols, int nof_symbols[MAX_CODEWORDS]); int nof_layer_symbols, int nof_symbols[MAX_CODEWORDS]);
LIBLTE_API int layerdemap_type(cf_t *x[MAX_LAYERS], cf_t *d[MAX_CODEWORDS], int nof_layers, int nof_cw, SRSLTE_API int layerdemap_type(cf_t *x[MAX_LAYERS], cf_t *d[MAX_CODEWORDS], int nof_layers, int nof_cw,
int nof_layer_symbols, int nof_symbols[MAX_CODEWORDS], lte_mimo_type_t type); int nof_layer_symbols, int nof_symbols[MAX_CODEWORDS], lte_mimo_type_t type);
#endif // LAYERMAP_H_ #endif // LAYERMAP_H_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -50,24 +50,24 @@ typedef struct {
}precoding_t; }precoding_t;
LIBLTE_API int precoding_init(precoding_t *q, SRSLTE_API int precoding_init(precoding_t *q,
uint32_t max_frame_len); uint32_t max_frame_len);
LIBLTE_API void precoding_free(precoding_t *q); SRSLTE_API void precoding_free(precoding_t *q);
/* Generates the vector "y" from the input vector "x" /* Generates the vector "y" from the input vector "x"
*/ */
LIBLTE_API int precoding_single(precoding_t *q, SRSLTE_API int precoding_single(precoding_t *q,
cf_t *x, cf_t *x,
cf_t *y, cf_t *y,
int nof_symbols); int nof_symbols);
LIBLTE_API int precoding_diversity(precoding_t *q, SRSLTE_API int precoding_diversity(precoding_t *q,
cf_t *x[MAX_LAYERS], cf_t *x[MAX_LAYERS],
cf_t *y[MAX_PORTS], cf_t *y[MAX_PORTS],
int nof_ports, int nof_symbols); int nof_ports, int nof_symbols);
LIBLTE_API int precoding_type(precoding_t *q, SRSLTE_API int precoding_type(precoding_t *q,
cf_t *x[MAX_LAYERS], cf_t *x[MAX_LAYERS],
cf_t *y[MAX_PORTS], cf_t *y[MAX_PORTS],
int nof_layers, int nof_layers,
@ -77,14 +77,14 @@ LIBLTE_API int precoding_type(precoding_t *q,
/* Estimates the vector "x" based on the received signal "y" and the channel estimates "h" /* Estimates the vector "x" based on the received signal "y" and the channel estimates "h"
*/ */
LIBLTE_API int predecoding_single(precoding_t *q, SRSLTE_API int predecoding_single(precoding_t *q,
cf_t *y, cf_t *y,
cf_t *h, cf_t *h,
cf_t *x, cf_t *x,
int nof_symbols, int nof_symbols,
float noise_estimate); float noise_estimate);
LIBLTE_API int predecoding_diversity(precoding_t *q, SRSLTE_API int predecoding_diversity(precoding_t *q,
cf_t *y, cf_t *y,
cf_t *h[MAX_PORTS], cf_t *h[MAX_PORTS],
cf_t *x[MAX_LAYERS], cf_t *x[MAX_LAYERS],
@ -92,7 +92,7 @@ LIBLTE_API int predecoding_diversity(precoding_t *q,
int nof_symbols, int nof_symbols,
float noise_estimate); float noise_estimate);
LIBLTE_API int predecoding_type(precoding_t *q, SRSLTE_API int predecoding_type(precoding_t *q,
cf_t *y, cf_t *y,
cf_t *h[MAX_PORTS], cf_t *h[MAX_PORTS],
cf_t *x[MAX_LAYERS], cf_t *x[MAX_LAYERS],

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,19 +37,19 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_mod_t mod; /* In this implementation, mapping table is hard-coded */ lte_mod_t mod; /* In this implementation, mapping table is hard-coded */
}demod_hard_t; }demod_hard_t;
LIBLTE_API void demod_hard_init(demod_hard_t* q); SRSLTE_API void demod_hard_init(demod_hard_t* q);
LIBLTE_API void demod_hard_table_set(demod_hard_t* q, lte_mod_t mod); SRSLTE_API void demod_hard_table_set(demod_hard_t* q, lte_mod_t mod);
LIBLTE_API int demod_hard_demodulate(demod_hard_t* q, cf_t* symbols, uint8_t *bits, uint32_t nsymbols); SRSLTE_API int demod_hard_demodulate(demod_hard_t* q, cf_t* symbols, uint8_t *bits, uint32_t nsymbols);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
demod_hard_t obj; demod_hard_t obj;
struct demod_hard_init { struct demod_hard_init {
lte_mod_t std; // Symbol mapping standard (see modem_table.h) lte_mod_t std; // Symbol mapping standard (see modem_table.h)
@ -62,9 +62,9 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}demod_hard_hl; }demod_hard_hl;
LIBLTE_API int demod_hard_initialize(demod_hard_hl* hl); SRSLTE_API int demod_hard_initialize(demod_hard_hl* hl);
LIBLTE_API int demod_hard_work(demod_hard_hl* hl); SRSLTE_API int demod_hard_work(demod_hard_hl* hl);
LIBLTE_API int demod_hard_stop(demod_hard_hl* hl); SRSLTE_API int demod_hard_stop(demod_hard_hl* hl);
#endif // DEMOD_HARD_ #endif // DEMOD_HARD_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,7 +37,7 @@
enum alg { EXACT, APPROX }; enum alg { EXACT, APPROX };
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
float sigma; // noise power float sigma; // noise power
enum alg alg_type; // soft demapping algorithm (EXACT or APPROX) enum alg alg_type; // soft demapping algorithm (EXACT or APPROX)
modem_table_t *table; // symbol mapping table (see modem_table.h) modem_table_t *table; // symbol mapping table (see modem_table.h)
@ -46,16 +46,16 @@ typedef struct LIBLTE_API {
uint32_t max_symbols; uint32_t max_symbols;
}demod_soft_t; }demod_soft_t;
LIBLTE_API int demod_soft_init(demod_soft_t *q, uint32_t max_symbols); SRSLTE_API int demod_soft_init(demod_soft_t *q, uint32_t max_symbols);
LIBLTE_API void demod_soft_free(demod_soft_t *q); SRSLTE_API void demod_soft_free(demod_soft_t *q);
LIBLTE_API void demod_soft_table_set(demod_soft_t *q, modem_table_t *table); SRSLTE_API void demod_soft_table_set(demod_soft_t *q, modem_table_t *table);
LIBLTE_API void demod_soft_alg_set(demod_soft_t *q, enum alg alg_type); SRSLTE_API void demod_soft_alg_set(demod_soft_t *q, enum alg alg_type);
LIBLTE_API void demod_soft_sigma_set(demod_soft_t *q, float sigma); SRSLTE_API void demod_soft_sigma_set(demod_soft_t *q, float sigma);
LIBLTE_API int demod_soft_demodulate(demod_soft_t *q, const cf_t* symbols, float* llr, int nsymbols); SRSLTE_API int demod_soft_demodulate(demod_soft_t *q, const cf_t* symbols, float* llr, int nsymbols);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
demod_soft_t obj; demod_soft_t obj;
modem_table_t table; modem_table_t table;
@ -76,9 +76,9 @@ typedef struct LIBLTE_API {
}demod_soft_hl; }demod_soft_hl;
LIBLTE_API int demod_soft_initialize(demod_soft_hl* hl); SRSLTE_API int demod_soft_initialize(demod_soft_hl* hl);
LIBLTE_API int demod_soft_work(demod_soft_hl* hl); SRSLTE_API int demod_soft_work(demod_soft_hl* hl);
LIBLTE_API int demod_soft_stop(demod_soft_hl* hl); SRSLTE_API int demod_soft_stop(demod_soft_hl* hl);
#endif // DEMOD_SOFT_ #endif // DEMOD_SOFT_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,10 +37,10 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
LIBLTE_API int mod_modulate(modem_table_t* table, const uint8_t *bits, cf_t* symbols, uint32_t nbits); SRSLTE_API int mod_modulate(modem_table_t* table, const uint8_t *bits, cf_t* symbols, uint32_t nbits);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
modem_table_t obj; modem_table_t obj;
struct mod_init { struct mod_init {
lte_mod_t std; // symbol mapping standard (see modem_table.h) lte_mod_t std; // symbol mapping standard (see modem_table.h)
@ -53,8 +53,8 @@ typedef struct LIBLTE_API {
int out_len; int out_len;
}mod_hl; }mod_hl;
LIBLTE_API int mod_initialize(mod_hl* hl); SRSLTE_API int mod_initialize(mod_hl* hl);
LIBLTE_API int mod_work(mod_hl* hl); SRSLTE_API int mod_work(mod_hl* hl);
LIBLTE_API int mod_stop(mod_hl* hl); SRSLTE_API int mod_stop(mod_hl* hl);
#endif // MOD_ #endif // MOD_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -34,18 +34,18 @@
#include <complex.h> #include <complex.h>
#include <stdint.h> #include <stdint.h>
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/config.h" #include "srslte/config.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t idx[2][6][32]; uint32_t idx[2][6][32];
uint32_t min_idx[2][64][6]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2x(1, 2, 4, and 6 closest constellation points) for each bit, respectively. */ uint32_t min_idx[2][64][6]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2x(1, 2, 4, and 6 closest constellation points) for each bit, respectively. */
uint32_t d_idx[64][7]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2, 3, 5 and 7 indices to constellation points that need to be computed for any recevied symbol modulated as BPSK, QPSK, 16QAM, and 64QAM, respectively. */ uint32_t d_idx[64][7]; /* NEW: for each constellation point zone (2, 4, 16, 64 for BPSK, QPSK, 16QAM, 64QAM) the 2, 3, 5 and 7 indices to constellation points that need to be computed for any recevied symbol modulated as BPSK, QPSK, 16QAM, and 64QAM, respectively. */
}soft_table_t; }soft_table_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
cf_t* symbol_table; // bit-to-symbol mapping cf_t* symbol_table; // bit-to-symbol mapping
soft_table_t soft_table; // symbol-to-bit mapping (used in soft demodulating) soft_table_t soft_table; // symbol-to-bit mapping (used in soft demodulating)
uint32_t nsymbols; // number of modulation symbols uint32_t nsymbols; // number of modulation symbols
@ -53,19 +53,19 @@ typedef struct LIBLTE_API {
}modem_table_t; }modem_table_t;
LIBLTE_API void modem_table_init(modem_table_t* q); SRSLTE_API void modem_table_init(modem_table_t* q);
LIBLTE_API void modem_table_free(modem_table_t* q); SRSLTE_API void modem_table_free(modem_table_t* q);
LIBLTE_API void modem_table_reset(modem_table_t* q); SRSLTE_API void modem_table_reset(modem_table_t* q);
LIBLTE_API int modem_table_set(modem_table_t* q, SRSLTE_API int modem_table_set(modem_table_t* q,
cf_t* table, cf_t* table,
soft_table_t *soft_table, soft_table_t *soft_table,
uint32_t nsymbols, uint32_t nsymbols,
uint32_t nbits_x_symbol); uint32_t nbits_x_symbol);
LIBLTE_API int modem_table_lte(modem_table_t* q, SRSLTE_API int modem_table_lte(modem_table_t* q,
lte_mod_t modulation, lte_mod_t modulation,
bool compute_soft_demod); bool compute_soft_demod);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,7 +31,7 @@
#include <stdint.h> #include <stdint.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
/** /**
* CQI message generation according to 36.212 Sections 5.2.2.6 and 5.2.3.3 * CQI message generation according to 36.212 Sections 5.2.2.6 and 5.2.3.3
@ -43,7 +43,7 @@
CQI reports CQI reports
(transmission mode 1, transmission mode 2, transmission mode 3, transmission mode 7 and (transmission mode 1, transmission mode 2, transmission mode 3, transmission mode 7 and
transmission mode 8 configured without PMI/RI reporting). */ transmission mode 8 configured without PMI/RI reporting). */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t wideband_cqi; // 4-bit width uint8_t wideband_cqi; // 4-bit width
uint32_t subband_diff_cqi; // 2N-bit width uint32_t subband_diff_cqi; // 2N-bit width
} cqi_hl_subband_t; } cqi_hl_subband_t;
@ -52,7 +52,7 @@ typedef struct LIBLTE_API {
reports reports
(transmission mode 1, transmission mode 2, transmission mode 3, transmission mode 7 and (transmission mode 1, transmission mode 2, transmission mode 3, transmission mode 7 and
transmission mode 8 configured without PMI/RI reporting). */ transmission mode 8 configured without PMI/RI reporting). */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t wideband_cqi; // 4-bit width uint8_t wideband_cqi; // 4-bit width
uint8_t subband_diff_cqi; // 2-bit width uint8_t subband_diff_cqi; // 2-bit width
uint32_t position_subband; // L-bit width uint32_t position_subband; // L-bit width
@ -63,31 +63,31 @@ typedef struct LIBLTE_API {
transmission mode 8 configured without PMI/RI reporting). transmission mode 8 configured without PMI/RI reporting).
This is for PUCCH Format 2 reports This is for PUCCH Format 2 reports
*/ */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t wideband_cqi; // 4-bit width uint8_t wideband_cqi; // 4-bit width
} cqi_format2_wideband_t; } cqi_format2_wideband_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t subband_cqi; // 4-bit width uint8_t subband_cqi; // 4-bit width
uint8_t subband_label; // 1- or 2-bit width uint8_t subband_label; // 1- or 2-bit width
} cqi_format2_subband_t; } cqi_format2_subband_t;
LIBLTE_API int cqi_hl_subband_pack(cqi_hl_subband_t *msg, SRSLTE_API int cqi_hl_subband_pack(cqi_hl_subband_t *msg,
uint32_t N, uint32_t N,
uint8_t *buff, uint8_t *buff,
uint32_t buff_len); uint32_t buff_len);
LIBLTE_API int cqi_ue_subband_pack(cqi_ue_subband_t *msg, SRSLTE_API int cqi_ue_subband_pack(cqi_ue_subband_t *msg,
uint32_t L, uint32_t L,
uint8_t *buff, uint8_t *buff,
uint32_t buff_len); uint32_t buff_len);
LIBLTE_API int cqi_format2_wideband_pack(cqi_format2_wideband_t *msg, SRSLTE_API int cqi_format2_wideband_pack(cqi_format2_wideband_t *msg,
uint8_t *buff, uint8_t *buff,
uint32_t buff_len); uint32_t buff_len);
LIBLTE_API int cqi_format2_subband_pack(cqi_format2_subband_t *msg, SRSLTE_API int cqi_format2_subband_pack(cqi_format2_subband_t *msg,
uint8_t *buff, uint8_t *buff,
uint32_t buff_len); uint32_t buff_len);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,8 +31,8 @@
#include <stdint.h> #include <stdint.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/phch/ra.h" #include "srslte/phch/ra.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
@ -50,7 +50,7 @@ typedef enum {
} dci_format_t; } dci_format_t;
// Each type is for a different interface to packing/unpacking functions // Each type is for a different interface to packing/unpacking functions
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
enum { enum {
PUSCH_SCHED, PDSCH_SCHED, MCCH_CHANGE, TPC_COMMAND, RA_PROC_PDCCH PUSCH_SCHED, PDSCH_SCHED, MCCH_CHANGE, TPC_COMMAND, RA_PROC_PDCCH
} type; } type;
@ -61,12 +61,12 @@ typedef enum {
DCI_COMMON = 0, DCI_UE = 1 DCI_COMMON = 0, DCI_UE = 1
} dci_spec_t; } dci_spec_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t L; // Aggregation level uint32_t L; // Aggregation level
uint32_t ncce; // Position of first CCE of the dci uint32_t ncce; // Position of first CCE of the dci
} dci_location_t; } dci_location_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t data[DCI_MAX_BITS]; uint8_t data[DCI_MAX_BITS];
uint32_t nof_bits; uint32_t nof_bits;
} dci_msg_t; } dci_msg_t;
@ -74,63 +74,63 @@ typedef struct LIBLTE_API {
/* Converts a received PDSCH DL scheduling DCI message /* Converts a received PDSCH DL scheduling DCI message
* to ra structures ready to be passed to the harq setup function * to ra structures ready to be passed to the harq setup function
*/ */
LIBLTE_API int dci_msg_to_ra_dl(dci_msg_t *msg, SRSLTE_API int dci_msg_to_ra_dl(dci_msg_t *msg,
uint16_t msg_rnti, uint16_t msg_rnti,
lte_cell_t cell, lte_cell_t cell,
uint32_t cfi, uint32_t cfi,
ra_pdsch_t *ra_dl); ra_pdsch_t *ra_dl);
LIBLTE_API int dci_msg_to_ra_ul(dci_msg_t *msg, SRSLTE_API int dci_msg_to_ra_ul(dci_msg_t *msg,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t n_rb_ho, uint32_t n_rb_ho,
ra_pusch_t *ra_ul); ra_pusch_t *ra_ul);
LIBLTE_API int dci_rar_to_ra_ul(uint32_t rba, SRSLTE_API int dci_rar_to_ra_ul(uint32_t rba,
uint32_t trunc_mcs, uint32_t trunc_mcs,
bool hopping_flag, bool hopping_flag,
uint32_t nof_prb, uint32_t nof_prb,
ra_pusch_t *ra); ra_pusch_t *ra);
LIBLTE_API dci_format_t dci_format_from_string(char *str); SRSLTE_API dci_format_t dci_format_from_string(char *str);
LIBLTE_API char* dci_format_string(dci_format_t format); SRSLTE_API char* dci_format_string(dci_format_t format);
LIBLTE_API int dci_location_set(dci_location_t *c, SRSLTE_API int dci_location_set(dci_location_t *c,
uint32_t L, uint32_t L,
uint32_t nCCE); uint32_t nCCE);
LIBLTE_API bool dci_location_isvalid(dci_location_t *c); SRSLTE_API bool dci_location_isvalid(dci_location_t *c);
LIBLTE_API int dci_msg_get_type(dci_msg_t *msg, SRSLTE_API int dci_msg_get_type(dci_msg_t *msg,
dci_msg_type_t *type, dci_msg_type_t *type,
uint32_t nof_prb, uint32_t nof_prb,
uint16_t msg_rnti); uint16_t msg_rnti);
LIBLTE_API void dci_msg_type_fprint(FILE *f, SRSLTE_API void dci_msg_type_fprint(FILE *f,
dci_msg_type_t type); dci_msg_type_t type);
// For dci_msg_type_t = PUSCH_SCHED // For dci_msg_type_t = PUSCH_SCHED
LIBLTE_API int dci_msg_pack_pusch(ra_pusch_t *data, SRSLTE_API int dci_msg_pack_pusch(ra_pusch_t *data,
dci_msg_t *msg, dci_msg_t *msg,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API int dci_msg_unpack_pusch(dci_msg_t *msg, SRSLTE_API int dci_msg_unpack_pusch(dci_msg_t *msg,
ra_pusch_t *data, ra_pusch_t *data,
uint32_t nof_prb); uint32_t nof_prb);
// For dci_msg_type_t = PDSCH_SCHED // For dci_msg_type_t = PDSCH_SCHED
LIBLTE_API int dci_msg_pack_pdsch(ra_pdsch_t *data, SRSLTE_API int dci_msg_pack_pdsch(ra_pdsch_t *data,
dci_msg_t *msg, dci_msg_t *msg,
dci_format_t format, dci_format_t format,
uint32_t nof_prb, uint32_t nof_prb,
bool crc_is_crnti); bool crc_is_crnti);
LIBLTE_API int dci_msg_unpack_pdsch(dci_msg_t *msg, SRSLTE_API int dci_msg_unpack_pdsch(dci_msg_t *msg,
ra_pdsch_t *data, ra_pdsch_t *data,
uint32_t nof_prb, uint32_t nof_prb,
bool crc_is_crnti); bool crc_is_crnti);
LIBLTE_API uint32_t dci_format_sizeof(dci_format_t format, SRSLTE_API uint32_t dci_format_sizeof(dci_format_t format,
uint32_t nof_prb); uint32_t nof_prb);
#endif // DCI_ #endif // DCI_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,8 +30,8 @@
#define HARQ_ #define HARQ_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/phch/ra.h" #include "srslte/phch/ra.h"
struct cb_segm { struct cb_segm {
@ -43,7 +43,7 @@
uint32_t C2; uint32_t C2;
}; };
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
ra_mcs_t mcs; ra_mcs_t mcs;
uint32_t rv; uint32_t rv;
uint32_t sf_idx; uint32_t sf_idx;
@ -65,26 +65,26 @@ typedef struct LIBLTE_API {
} harq_t; } harq_t;
LIBLTE_API int harq_init(harq_t * q, SRSLTE_API int harq_init(harq_t * q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API int harq_setup_dl(harq_t *p, SRSLTE_API int harq_setup_dl(harq_t *p,
ra_mcs_t mcs, ra_mcs_t mcs,
uint32_t rv, uint32_t rv,
uint32_t sf_idx, uint32_t sf_idx,
ra_dl_alloc_t *prb_alloc); ra_dl_alloc_t *prb_alloc);
LIBLTE_API int harq_setup_ul(harq_t *p, SRSLTE_API int harq_setup_ul(harq_t *p,
ra_mcs_t mcs, ra_mcs_t mcs,
uint32_t rv, uint32_t rv,
uint32_t sf_idx, uint32_t sf_idx,
ra_ul_alloc_t *prb_alloc); ra_ul_alloc_t *prb_alloc);
LIBLTE_API void harq_reset(harq_t *p); SRSLTE_API void harq_reset(harq_t *p);
LIBLTE_API void harq_free(harq_t *p); SRSLTE_API void harq_free(harq_t *p);
LIBLTE_API int codeblock_segmentation(struct cb_segm *s, SRSLTE_API int codeblock_segmentation(struct cb_segm *s,
uint32_t tbs); uint32_t tbs);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,16 +30,16 @@
#define PBCH_ #define PBCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/fec/rm_conv.h" #include "srslte/fec/rm_conv.h"
#include "srslte/phy/fec/convcoder.h" #include "srslte/fec/convcoder.h"
#include "srslte/phy/fec/viterbi.h" #include "srslte/fec/viterbi.h"
#include "srslte/phy/fec/crc.h" #include "srslte/fec/crc.h"
#define BCH_PAYLOAD_LEN 24 #define BCH_PAYLOAD_LEN 24
#define BCH_PAYLOADCRC_LEN (BCH_PAYLOAD_LEN+16) #define BCH_PAYLOADCRC_LEN (BCH_PAYLOAD_LEN+16)
@ -51,7 +51,7 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
/* PBCH object */ /* PBCH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
uint32_t nof_symbols; uint32_t nof_symbols;
@ -81,11 +81,11 @@ typedef struct LIBLTE_API {
} pbch_t; } pbch_t;
LIBLTE_API int pbch_init(pbch_t *q, SRSLTE_API int pbch_init(pbch_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pbch_free(pbch_t *q); SRSLTE_API void pbch_free(pbch_t *q);
LIBLTE_API int pbch_decode(pbch_t *q, SRSLTE_API int pbch_decode(pbch_t *q,
cf_t *slot1_symbols, cf_t *slot1_symbols,
cf_t *ce_slot1[MAX_PORTS], cf_t *ce_slot1[MAX_PORTS],
float noise_estimate, float noise_estimate,
@ -93,21 +93,21 @@ LIBLTE_API int pbch_decode(pbch_t *q,
uint32_t *nof_tx_ports, uint32_t *nof_tx_ports,
uint32_t *sfn_offset); uint32_t *sfn_offset);
LIBLTE_API int pbch_encode(pbch_t *q, SRSLTE_API int pbch_encode(pbch_t *q,
uint8_t bch_payload[BCH_PAYLOAD_LEN], uint8_t bch_payload[BCH_PAYLOAD_LEN],
cf_t *slot1_symbols[MAX_PORTS]); cf_t *slot1_symbols[MAX_PORTS]);
LIBLTE_API void pbch_decode_reset(pbch_t *q); SRSLTE_API void pbch_decode_reset(pbch_t *q);
LIBLTE_API void pbch_mib_unpack(uint8_t *msg, SRSLTE_API void pbch_mib_unpack(uint8_t *msg,
lte_cell_t *cell, lte_cell_t *cell,
uint32_t *sfn); uint32_t *sfn);
LIBLTE_API void pbch_mib_pack(lte_cell_t *cell, SRSLTE_API void pbch_mib_pack(lte_cell_t *cell,
uint32_t sfn, uint32_t sfn,
uint8_t *msg); uint8_t *msg);
LIBLTE_API void pbch_mib_fprint(FILE *stream, SRSLTE_API void pbch_mib_fprint(FILE *stream,
lte_cell_t *cell, lte_cell_t *cell,
uint32_t sfn, uint32_t sfn,
uint32_t cell_id); uint32_t cell_id);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,13 +29,13 @@
#define PCFICH_ #define PCFICH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phch/regs.h"
#define PCFICH_CFI_LEN 32 #define PCFICH_CFI_LEN 32
#define PCFICH_RE PCFICH_CFI_LEN/2 #define PCFICH_RE PCFICH_CFI_LEN/2
@ -43,7 +43,7 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
/* PCFICH object */ /* PCFICH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
int nof_symbols; int nof_symbols;
@ -73,13 +73,13 @@ typedef struct LIBLTE_API {
} pcfich_t; } pcfich_t;
LIBLTE_API int pcfich_init(pcfich_t *q, SRSLTE_API int pcfich_init(pcfich_t *q,
regs_t *regs, regs_t *regs,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pcfich_free(pcfich_t *q); SRSLTE_API void pcfich_free(pcfich_t *q);
LIBLTE_API int pcfich_decode(pcfich_t *q, SRSLTE_API int pcfich_decode(pcfich_t *q,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
float noise_estimate, float noise_estimate,
@ -87,7 +87,7 @@ LIBLTE_API int pcfich_decode(pcfich_t *q,
uint32_t *cfi, uint32_t *cfi,
float *corr_result); float *corr_result);
LIBLTE_API int pcfich_encode(pcfich_t *q, SRSLTE_API int pcfich_encode(pcfich_t *q,
uint32_t cfi, uint32_t cfi,
cf_t *sf_symbols[MAX_PORTS], cf_t *sf_symbols[MAX_PORTS],
uint32_t subframe); uint32_t subframe);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -29,29 +29,29 @@
#define PDCCH_ #define PDCCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/fec/rm_conv.h" #include "srslte/fec/rm_conv.h"
#include "srslte/phy/fec/convcoder.h" #include "srslte/fec/convcoder.h"
#include "srslte/phy/fec/viterbi.h" #include "srslte/fec/viterbi.h"
#include "srslte/phy/fec/crc.h" #include "srslte/fec/crc.h"
#include "srslte/phy/phch/dci.h" #include "srslte/phch/dci.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phch/regs.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef enum LIBLTE_API { typedef enum SRSLTE_API {
SEARCH_UE, SEARCH_COMMON SEARCH_UE, SEARCH_COMMON
} pdcch_search_mode_t; } pdcch_search_mode_t;
/* PDCCH object */ /* PDCCH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
uint32_t nof_regs; uint32_t nof_regs;
uint32_t nof_cce; uint32_t nof_cce;
@ -78,15 +78,15 @@ typedef struct LIBLTE_API {
} pdcch_t; } pdcch_t;
LIBLTE_API int pdcch_init(pdcch_t *q, SRSLTE_API int pdcch_init(pdcch_t *q,
regs_t *regs, regs_t *regs,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pdcch_free(pdcch_t *q); SRSLTE_API void pdcch_free(pdcch_t *q);
/* Encoding function */ /* Encoding function */
LIBLTE_API int pdcch_encode(pdcch_t *q, SRSLTE_API int pdcch_encode(pdcch_t *q,
dci_msg_t *msg, dci_msg_t *msg,
dci_location_t location, dci_location_t location,
uint16_t rnti, uint16_t rnti,
@ -95,7 +95,7 @@ LIBLTE_API int pdcch_encode(pdcch_t *q,
uint32_t cfi); uint32_t cfi);
/* Decoding functions: Extract the LLRs and save them in the pdcch_t object */ /* Decoding functions: Extract the LLRs and save them in the pdcch_t object */
LIBLTE_API int pdcch_extract_llr(pdcch_t *q, SRSLTE_API int pdcch_extract_llr(pdcch_t *q,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
float noise_estimate, float noise_estimate,
@ -103,14 +103,14 @@ LIBLTE_API int pdcch_extract_llr(pdcch_t *q,
uint32_t cfi); uint32_t cfi);
/* Decoding functions: Try to decode a DCI message after calling pdcch_extract_llr */ /* Decoding functions: Try to decode a DCI message after calling pdcch_extract_llr */
LIBLTE_API int pdcch_decode_msg(pdcch_t *q, SRSLTE_API int pdcch_decode_msg(pdcch_t *q,
dci_msg_t *msg, dci_msg_t *msg,
dci_location_t *location, dci_location_t *location,
dci_format_t format, dci_format_t format,
uint16_t *crc_rem); uint16_t *crc_rem);
/* Function for generation of UE-specific search space DCI locations */ /* Function for generation of UE-specific search space DCI locations */
LIBLTE_API uint32_t pdcch_ue_locations(pdcch_t *q, SRSLTE_API uint32_t pdcch_ue_locations(pdcch_t *q,
dci_location_t *locations, dci_location_t *locations,
uint32_t max_locations, uint32_t max_locations,
uint32_t nsubframe, uint32_t nsubframe,
@ -118,7 +118,7 @@ LIBLTE_API uint32_t pdcch_ue_locations(pdcch_t *q,
uint16_t rnti); uint16_t rnti);
/* Function for generation of common search space DCI locations */ /* Function for generation of common search space DCI locations */
LIBLTE_API uint32_t pdcch_common_locations(pdcch_t *q, SRSLTE_API uint32_t pdcch_common_locations(pdcch_t *q,
dci_location_t *locations, dci_location_t *locations,
uint32_t max_locations, uint32_t max_locations,
uint32_t cfi); uint32_t cfi);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,23 +30,23 @@
#define PDSCH_ #define PDSCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/phch/dci.h" #include "srslte/phch/dci.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phch/regs.h"
#include "srslte/phy/phch/sch.h" #include "srslte/phch/sch.h"
#include "srslte/phy/phch/harq.h" #include "srslte/phch/harq.h"
#define TDEC_MAX_ITERATIONS 5 #define TDEC_MAX_ITERATIONS 5
typedef _Complex float cf_t; typedef _Complex float cf_t;
/* PDSCH object */ /* PDSCH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
uint32_t max_re; uint32_t max_re;
@ -71,33 +71,33 @@ typedef struct LIBLTE_API {
}pdsch_t; }pdsch_t;
LIBLTE_API int pdsch_init(pdsch_t *q, SRSLTE_API int pdsch_init(pdsch_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pdsch_free(pdsch_t *q); SRSLTE_API void pdsch_free(pdsch_t *q);
LIBLTE_API int pdsch_set_rnti(pdsch_t *q, SRSLTE_API int pdsch_set_rnti(pdsch_t *q,
uint16_t rnti); uint16_t rnti);
LIBLTE_API int pdsch_encode(pdsch_t *q, SRSLTE_API int pdsch_encode(pdsch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
cf_t *sf_symbols[MAX_PORTS]); cf_t *sf_symbols[MAX_PORTS]);
LIBLTE_API int pdsch_encode_rnti(pdsch_t *q, SRSLTE_API int pdsch_encode_rnti(pdsch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uint16_t rnti, uint16_t rnti,
cf_t *sf_symbols[MAX_PORTS]); cf_t *sf_symbols[MAX_PORTS]);
LIBLTE_API int pdsch_decode(pdsch_t *q, SRSLTE_API int pdsch_decode(pdsch_t *q,
harq_t *harq_process, harq_t *harq_process,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
float noise_estimate, float noise_estimate,
uint8_t *data); uint8_t *data);
LIBLTE_API int pdsch_decode_rnti(pdsch_t *q, SRSLTE_API int pdsch_decode_rnti(pdsch_t *q,
harq_t *harq_process, harq_t *harq_process,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
@ -105,8 +105,8 @@ LIBLTE_API int pdsch_decode_rnti(pdsch_t *q,
uint16_t rnti, uint16_t rnti,
uint8_t *data); uint8_t *data);
LIBLTE_API float pdsch_average_noi(pdsch_t *q); SRSLTE_API float pdsch_average_noi(pdsch_t *q);
LIBLTE_API uint32_t pdsch_last_noi(pdsch_t *q); SRSLTE_API uint32_t pdsch_last_noi(pdsch_t *q);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,12 +30,12 @@
#define PHICH_ #define PHICH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_hard.h" #include "srslte/modem/demod_hard.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "regs.h" #include "regs.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
@ -54,7 +54,7 @@ typedef _Complex float cf_t;
#define PHICH_EXT_NSF 2 #define PHICH_EXT_NSF 2
/* phich object */ /* phich object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
/* handler to REGs resource mapper */ /* handler to REGs resource mapper */
@ -79,13 +79,13 @@ typedef struct LIBLTE_API {
}phich_t; }phich_t;
LIBLTE_API int phich_init(phich_t *q, SRSLTE_API int phich_init(phich_t *q,
regs_t *regs, regs_t *regs,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void phich_free(phich_t *q); SRSLTE_API void phich_free(phich_t *q);
LIBLTE_API int phich_decode(phich_t *q, SRSLTE_API int phich_decode(phich_t *q,
cf_t *slot_symbols, cf_t *slot_symbols,
cf_t *ce[MAX_PORTS], cf_t *ce[MAX_PORTS],
float noise_estimate, float noise_estimate,
@ -95,16 +95,16 @@ LIBLTE_API int phich_decode(phich_t *q,
uint8_t *ack, uint8_t *ack,
uint32_t *distance); uint32_t *distance);
LIBLTE_API int phich_encode(phich_t *q, SRSLTE_API int phich_encode(phich_t *q,
uint8_t ack, uint8_t ack,
uint32_t ngroup, uint32_t ngroup,
uint32_t nseq, uint32_t nseq,
uint32_t nsubframe, uint32_t nsubframe,
cf_t *slot_symbols[MAX_PORTS]); cf_t *slot_symbols[MAX_PORTS]);
LIBLTE_API void phich_reset(phich_t *q, SRSLTE_API void phich_reset(phich_t *q,
cf_t *slot_symbols[MAX_PORTS]); cf_t *slot_symbols[MAX_PORTS]);
LIBLTE_API uint32_t phich_ngroups(phich_t *q); SRSLTE_API uint32_t phich_ngroups(phich_t *q);
#endif // PHICH_ #endif // PHICH_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,7 +33,7 @@
#include <complex.h> #include <complex.h>
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/utils/dft.h" #include "srslte/utils/dft.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
@ -46,7 +46,7 @@ typedef _Complex float cf_t;
* Based on 3GPP TS 36.211 version 10.7.0 Release 10. * Based on 3GPP TS 36.211 version 10.7.0 Release 10.
*/ */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
// Parameters from higher layers (extracted from SIB2) // Parameters from higher layers (extracted from SIB2)
uint32_t f; // preamble format uint32_t f; // preamble format
uint32_t rsi; // rootSequenceIndex uint32_t rsi; // rootSequenceIndex
@ -85,28 +85,28 @@ typedef struct LIBLTE_API {
}prach_t; }prach_t;
LIBLTE_API int prach_init(prach_t *p, SRSLTE_API int prach_init(prach_t *p,
uint32_t N_ifft_ul, uint32_t N_ifft_ul,
uint32_t preamble_format, uint32_t preamble_format,
uint32_t root_seq_index, uint32_t root_seq_index,
bool high_speed_flag, bool high_speed_flag,
uint32_t zero_corr_zone_config); uint32_t zero_corr_zone_config);
LIBLTE_API int prach_gen(prach_t *p, SRSLTE_API int prach_gen(prach_t *p,
uint32_t seq_index, uint32_t seq_index,
uint32_t freq_offset, uint32_t freq_offset,
float beta_prach, float beta_prach,
cf_t *signal); cf_t *signal);
LIBLTE_API int prach_detect(prach_t *p, SRSLTE_API int prach_detect(prach_t *p,
uint32_t freq_offset, uint32_t freq_offset,
cf_t *signal, cf_t *signal,
uint32_t sig_len, uint32_t sig_len,
uint32_t *indices, uint32_t *indices,
uint32_t *ind_len); uint32_t *ind_len);
LIBLTE_API int prach_free(prach_t *p); SRSLTE_API int prach_free(prach_t *p);
LIBLTE_API int prach_print_seqs(prach_t *p); SRSLTE_API int prach_print_seqs(prach_t *p);
#endif // PRACH_ #endif // PRACH_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,16 +30,16 @@
#define PUCCH_ #define PUCCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phch/regs.h"
#include "srslte/phy/phch/sch.h" #include "srslte/phch/sch.h"
#include "srslte/phy/phch/harq.h" #include "srslte/phch/harq.h"
#include "srslte/phy/filter/dft_precoding.h" #include "srslte/filter/dft_precoding.h"
#define TDEC_MAX_ITERATIONS 5 #define TDEC_MAX_ITERATIONS 5
@ -49,7 +49,7 @@ typedef _Complex float cf_t;
#define PUCCH_MAX_BITS 2 #define PUCCH_MAX_BITS 2
#define PUCCH_N_SF_MAX 4 #define PUCCH_N_SF_MAX 4
typedef enum LIBLTE_API { typedef enum SRSLTE_API {
PUCCH_FORMAT_1 = 0, PUCCH_FORMAT_1 = 0,
PUCCH_FORMAT_1A, PUCCH_FORMAT_1A,
PUCCH_FORMAT_1B, PUCCH_FORMAT_1B,
@ -58,7 +58,7 @@ typedef enum LIBLTE_API {
PUCCH_FORMAT_2B, PUCCH_FORMAT_2B,
} pucch_format_t; } pucch_format_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
pucch_format_t format; pucch_format_t format;
float beta_pucch; float beta_pucch;
uint32_t delta_pucch_shift; uint32_t delta_pucch_shift;
@ -67,7 +67,7 @@ typedef struct LIBLTE_API {
} pucch_cfg_t; } pucch_cfg_t;
/* PUSCH object */ /* PUSCH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
pucch_cfg_t pucch_cfg; pucch_cfg_t pucch_cfg;
@ -77,23 +77,23 @@ typedef struct LIBLTE_API {
}pucch_t; }pucch_t;
LIBLTE_API int pucch_init(pucch_t *q, SRSLTE_API int pucch_init(pucch_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pucch_free(pucch_t *q); SRSLTE_API void pucch_free(pucch_t *q);
LIBLTE_API void pucch_set_cfg(pucch_t *q, SRSLTE_API void pucch_set_cfg(pucch_t *q,
pucch_cfg_t *cfg); pucch_cfg_t *cfg);
LIBLTE_API int pucch_set_rnti(pucch_t *q, SRSLTE_API int pucch_set_rnti(pucch_t *q,
uint16_t rnti); uint16_t rnti);
LIBLTE_API int pucch_encode(pucch_t *q, SRSLTE_API int pucch_encode(pucch_t *q,
pucch_cfg_t *cfg, pucch_cfg_t *cfg,
uint8_t bits[PUCCH_MAX_BITS], uint8_t bits[PUCCH_MAX_BITS],
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API float pucch_get_alpha(uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB], SRSLTE_API float pucch_get_alpha(uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB],
pucch_cfg_t *cfg, pucch_cfg_t *cfg,
lte_cp_t cp, lte_cp_t cp,
bool is_drms, bool is_drms,
@ -101,9 +101,9 @@ LIBLTE_API float pucch_get_alpha(uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB
uint32_t l, uint32_t l,
uint32_t *n_oc); uint32_t *n_oc);
LIBLTE_API int generate_n_cs_cell(lte_cell_t cell, SRSLTE_API int generate_n_cs_cell(lte_cell_t cell,
uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB]); uint32_t n_cs_cell[NSLOTS_X_FRAME][CPNORM_NSYMB]);
LIBLTE_API bool pucch_cfg_isvalid(pucch_cfg_t *cfg); SRSLTE_API bool pucch_cfg_isvalid(pucch_cfg_t *cfg);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,16 +30,16 @@
#define PUSCH_ #define PUSCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/mimo/precoding.h" #include "srslte/mimo/precoding.h"
#include "srslte/phy/mimo/layermap.h" #include "srslte/mimo/layermap.h"
#include "srslte/phy/modem/mod.h" #include "srslte/modem/mod.h"
#include "srslte/phy/modem/demod_soft.h" #include "srslte/modem/demod_soft.h"
#include "srslte/phy/scrambling/scrambling.h" #include "srslte/scrambling/scrambling.h"
#include "srslte/phy/phch/regs.h" #include "srslte/phch/regs.h"
#include "srslte/phy/phch/sch.h" #include "srslte/phch/sch.h"
#include "srslte/phy/phch/harq.h" #include "srslte/phch/harq.h"
#include "srslte/phy/filter/dft_precoding.h" #include "srslte/filter/dft_precoding.h"
#define TDEC_MAX_ITERATIONS 5 #define TDEC_MAX_ITERATIONS 5
@ -58,7 +58,7 @@ typedef struct {
/* PUSCH object */ /* PUSCH object */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
pusch_hopping_cfg_t hopping_cfg; pusch_hopping_cfg_t hopping_cfg;
@ -91,50 +91,50 @@ typedef struct LIBLTE_API {
}pusch_t; }pusch_t;
LIBLTE_API int pusch_init(pusch_t *q, SRSLTE_API int pusch_init(pusch_t *q,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void pusch_free(pusch_t *q); SRSLTE_API void pusch_free(pusch_t *q);
LIBLTE_API void pusch_set_hopping_cfg(pusch_t *q, SRSLTE_API void pusch_set_hopping_cfg(pusch_t *q,
pusch_hopping_cfg_t *cfg); pusch_hopping_cfg_t *cfg);
LIBLTE_API int pusch_set_rnti(pusch_t *q, SRSLTE_API int pusch_set_rnti(pusch_t *q,
uint16_t rnti); uint16_t rnti);
LIBLTE_API int pusch_encode(pusch_t *q, SRSLTE_API int pusch_encode(pusch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int pusch_encode_rnti(pusch_t *q, SRSLTE_API int pusch_encode_rnti(pusch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uint16_t rnti, uint16_t rnti,
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int pusch_uci_encode(pusch_t *q, SRSLTE_API int pusch_uci_encode(pusch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uci_data_t uci_data, uci_data_t uci_data,
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int pusch_uci_encode_rnti(pusch_t *q, SRSLTE_API int pusch_uci_encode_rnti(pusch_t *q,
harq_t *harq, harq_t *harq,
uint8_t *data, uint8_t *data,
uci_data_t uci_data, uci_data_t uci_data,
uint16_t rnti, uint16_t rnti,
cf_t *sf_symbols); cf_t *sf_symbols);
LIBLTE_API int pusch_decode(pusch_t *q, SRSLTE_API int pusch_decode(pusch_t *q,
harq_t *harq_process, harq_t *harq_process,
cf_t *sf_symbols, cf_t *sf_symbols,
cf_t *ce, cf_t *ce,
float noise_estimate, float noise_estimate,
uint8_t *data); uint8_t *data);
LIBLTE_API float pusch_average_noi(pusch_t *q); SRSLTE_API float pusch_average_noi(pusch_t *q);
LIBLTE_API uint32_t pusch_last_noi(pusch_t *q); SRSLTE_API uint32_t pusch_last_noi(pusch_t *q);
#endif #endif

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,26 +37,26 @@
* allocation. * allocation.
*/ */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_mod_t mod; lte_mod_t mod;
int tbs; int tbs;
} ra_mcs_t; } ra_mcs_t;
typedef enum LIBLTE_API { typedef enum SRSLTE_API {
alloc_type0 = 0, alloc_type1 = 1, alloc_type2 = 2 alloc_type0 = 0, alloc_type1 = 1, alloc_type2 = 2
} ra_type_t; } ra_type_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t rbg_bitmask; uint32_t rbg_bitmask;
} ra_type0_t; } ra_type0_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t vrb_bitmask; uint32_t vrb_bitmask;
uint32_t rbg_subset; uint32_t rbg_subset;
bool shift; bool shift;
} ra_type1_t; } ra_type1_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t riv; // if L_crb==0, DCI message packer will take this value directly uint32_t riv; // if L_crb==0, DCI message packer will take this value directly
uint32_t L_crb; uint32_t L_crb;
uint32_t RB_start; uint32_t RB_start;
@ -71,25 +71,25 @@ typedef struct LIBLTE_API {
} mode; } mode;
} ra_type2_t; } ra_type2_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
bool prb_idx[MAX_PRB]; bool prb_idx[MAX_PRB];
uint32_t nof_prb; uint32_t nof_prb;
} ra_prb_slot_t; } ra_prb_slot_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
ra_prb_slot_t slot[2]; ra_prb_slot_t slot[2];
uint32_t lstart; uint32_t lstart;
uint32_t re_sf[NSUBFRAMES_X_FRAME]; uint32_t re_sf[NSUBFRAMES_X_FRAME];
} ra_dl_alloc_t; } ra_dl_alloc_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t n_prb[2]; uint32_t n_prb[2];
uint32_t n_prb_tilde[2]; uint32_t n_prb_tilde[2];
uint32_t L_prb; uint32_t L_prb;
uint32_t freq_hopping; uint32_t freq_hopping;
} ra_ul_alloc_t; } ra_ul_alloc_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint16_t rnti; uint16_t rnti;
ra_type_t alloc_type; ra_type_t alloc_type;
union { union {
@ -105,7 +105,7 @@ typedef struct LIBLTE_API {
bool ndi; bool ndi;
} ra_pdsch_t; } ra_pdsch_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
/* 36.213 Table 8.4-2: hop_half is 0 for < 10 Mhz and 10 for > 10 Mhz. /* 36.213 Table 8.4-2: hop_half is 0 for < 10 Mhz and 10 for > 10 Mhz.
* hop_quart is 00 for > 10 Mhz and hop_quart_neg is 01 for > 10 Mhz. * hop_quart is 00 for > 10 Mhz and hop_quart_neg is 01 for > 10 Mhz.
*/ */
@ -129,74 +129,74 @@ typedef struct LIBLTE_API {
} ra_pusch_t; } ra_pusch_t;
LIBLTE_API void ra_prb_fprint(FILE *f, SRSLTE_API void ra_prb_fprint(FILE *f,
ra_prb_slot_t *prb, ra_prb_slot_t *prb,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API int ra_dl_alloc(ra_dl_alloc_t *prb, SRSLTE_API int ra_dl_alloc(ra_dl_alloc_t *prb,
ra_pdsch_t *ra, ra_pdsch_t *ra,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API int ra_ul_alloc(ra_ul_alloc_t *prb, SRSLTE_API int ra_ul_alloc(ra_ul_alloc_t *prb,
ra_pusch_t *ra, ra_pusch_t *ra,
uint32_t n_rb_ho, uint32_t n_rb_ho,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void ra_dl_alloc_re(ra_dl_alloc_t *prb_dist, SRSLTE_API void ra_dl_alloc_re(ra_dl_alloc_t *prb_dist,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t nof_ports, uint32_t nof_ports,
uint32_t nof_ctrl_symbols, uint32_t nof_ctrl_symbols,
lte_cp_t cp); lte_cp_t cp);
LIBLTE_API uint32_t ra_nprb_dl(ra_pdsch_t *ra, SRSLTE_API uint32_t ra_nprb_dl(ra_pdsch_t *ra,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API uint32_t ra_nprb_ul(ra_pusch_t *ra, SRSLTE_API uint32_t ra_nprb_ul(ra_pusch_t *ra,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API int ra_mcs_from_idx_dl(uint32_t mcs_idx, SRSLTE_API int ra_mcs_from_idx_dl(uint32_t mcs_idx,
uint32_t nof_prb, uint32_t nof_prb,
ra_mcs_t *mcs); ra_mcs_t *mcs);
LIBLTE_API int ra_mcs_from_idx_ul(uint32_t mcs_idx, SRSLTE_API int ra_mcs_from_idx_ul(uint32_t mcs_idx,
uint32_t nof_prb, uint32_t nof_prb,
ra_mcs_t *mcs); ra_mcs_t *mcs);
LIBLTE_API int ra_tbs_from_idx_format1c(uint32_t tbs_idx); SRSLTE_API int ra_tbs_from_idx_format1c(uint32_t tbs_idx);
LIBLTE_API int ra_tbs_from_idx(uint32_t tbs_idx, SRSLTE_API int ra_tbs_from_idx(uint32_t tbs_idx,
uint32_t n_prb); uint32_t n_prb);
LIBLTE_API int ra_tbs_to_table_idx(uint32_t tbs, SRSLTE_API int ra_tbs_to_table_idx(uint32_t tbs,
uint32_t n_prb); uint32_t n_prb);
LIBLTE_API uint32_t ra_type0_P(uint32_t nof_prb); SRSLTE_API uint32_t ra_type0_P(uint32_t nof_prb);
LIBLTE_API uint32_t ra_type2_to_riv(uint32_t L_crb, SRSLTE_API uint32_t ra_type2_to_riv(uint32_t L_crb,
uint32_t RB_start, uint32_t RB_start,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void ra_type2_from_riv(uint32_t riv, SRSLTE_API void ra_type2_from_riv(uint32_t riv,
uint32_t *L_crb, uint32_t *L_crb,
uint32_t *RB_start, uint32_t *RB_start,
uint32_t nof_prb, uint32_t nof_prb,
uint32_t nof_vrb); uint32_t nof_vrb);
LIBLTE_API uint32_t ra_type2_n_vrb_dl(uint32_t nof_prb, SRSLTE_API uint32_t ra_type2_n_vrb_dl(uint32_t nof_prb,
bool ngap_is_1); bool ngap_is_1);
LIBLTE_API uint32_t ra_type2_n_rb_step(uint32_t nof_prb); SRSLTE_API uint32_t ra_type2_n_rb_step(uint32_t nof_prb);
LIBLTE_API uint32_t ra_type2_ngap(uint32_t nof_prb, SRSLTE_API uint32_t ra_type2_ngap(uint32_t nof_prb,
bool ngap_is_1); bool ngap_is_1);
LIBLTE_API uint32_t ra_type1_N_rb(uint32_t nof_prb); SRSLTE_API uint32_t ra_type1_N_rb(uint32_t nof_prb);
LIBLTE_API void ra_pdsch_fprint(FILE *f, SRSLTE_API void ra_pdsch_fprint(FILE *f,
ra_pdsch_t *ra, ra_pdsch_t *ra,
uint32_t nof_prb); uint32_t nof_prb);
LIBLTE_API void ra_pusch_fprint(FILE *f, SRSLTE_API void ra_pusch_fprint(FILE *f,
ra_pusch_t *ra, ra_pusch_t *ra,
uint32_t nof_prb); uint32_t nof_prb);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,7 +31,7 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#define REGS_PHICH_NSYM 12 #define REGS_PHICH_NSYM 12
#define REGS_PHICH_REGS_X_GROUP 3 #define REGS_PHICH_REGS_X_GROUP 3
@ -44,19 +44,19 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t k[4]; uint32_t k[4];
uint32_t k0; uint32_t k0;
uint32_t l; uint32_t l;
bool assigned; bool assigned;
}regs_reg_t; }regs_reg_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t nof_regs; uint32_t nof_regs;
regs_reg_t **regs; regs_reg_t **regs;
}regs_ch_t; }regs_ch_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
lte_cell_t cell; lte_cell_t cell;
uint32_t max_ctrl_symbols; uint32_t max_ctrl_symbols;
uint32_t cfi; uint32_t cfi;
@ -75,54 +75,54 @@ typedef struct LIBLTE_API {
regs_reg_t *regs; regs_reg_t *regs;
}regs_t; }regs_t;
LIBLTE_API int regs_init(regs_t *h, SRSLTE_API int regs_init(regs_t *h,
lte_cell_t cell); lte_cell_t cell);
LIBLTE_API void regs_free(regs_t *h); SRSLTE_API void regs_free(regs_t *h);
LIBLTE_API int regs_set_cfi(regs_t *h, SRSLTE_API int regs_set_cfi(regs_t *h,
uint32_t nof_ctrl_symbols); uint32_t nof_ctrl_symbols);
LIBLTE_API uint32_t regs_pcfich_nregs(regs_t *h); SRSLTE_API uint32_t regs_pcfich_nregs(regs_t *h);
LIBLTE_API int regs_pcfich_put(regs_t *h, SRSLTE_API int regs_pcfich_put(regs_t *h,
cf_t pcfich_symbols[REGS_PCFICH_NSYM], cf_t pcfich_symbols[REGS_PCFICH_NSYM],
cf_t *slot_symbols); cf_t *slot_symbols);
LIBLTE_API int regs_pcfich_get(regs_t *h, SRSLTE_API int regs_pcfich_get(regs_t *h,
cf_t *slot_symbols, cf_t *slot_symbols,
cf_t pcfich_symbols[REGS_PCFICH_NSYM]); cf_t pcfich_symbols[REGS_PCFICH_NSYM]);
LIBLTE_API uint32_t regs_phich_nregs(regs_t *h); SRSLTE_API uint32_t regs_phich_nregs(regs_t *h);
LIBLTE_API int regs_phich_add(regs_t *h, SRSLTE_API int regs_phich_add(regs_t *h,
cf_t phich_symbols[REGS_PHICH_NSYM], cf_t phich_symbols[REGS_PHICH_NSYM],
uint32_t ngroup, uint32_t ngroup,
cf_t *slot_symbols); cf_t *slot_symbols);
LIBLTE_API int regs_phich_get(regs_t *h, SRSLTE_API int regs_phich_get(regs_t *h,
cf_t *slot_symbols, cf_t *slot_symbols,
cf_t phich_symbols[REGS_PHICH_NSYM], cf_t phich_symbols[REGS_PHICH_NSYM],
uint32_t ngroup); uint32_t ngroup);
LIBLTE_API uint32_t regs_phich_ngroups(regs_t *h); SRSLTE_API uint32_t regs_phich_ngroups(regs_t *h);
LIBLTE_API int regs_phich_reset(regs_t *h, SRSLTE_API int regs_phich_reset(regs_t *h,
cf_t *slot_symbols); cf_t *slot_symbols);
LIBLTE_API int regs_pdcch_nregs(regs_t *h, uint32_t cfi); SRSLTE_API int regs_pdcch_nregs(regs_t *h, uint32_t cfi);
LIBLTE_API int regs_pdcch_put(regs_t *h, SRSLTE_API int regs_pdcch_put(regs_t *h,
cf_t *pdcch_symbols, cf_t *pdcch_symbols,
cf_t *slot_symbols); cf_t *slot_symbols);
LIBLTE_API int regs_pdcch_put_offset(regs_t *h, SRSLTE_API int regs_pdcch_put_offset(regs_t *h,
cf_t *pdcch_symbols, cf_t *pdcch_symbols,
cf_t *slot_symbols, cf_t *slot_symbols,
uint32_t start_reg, uint32_t start_reg,
uint32_t nof_regs); uint32_t nof_regs);
LIBLTE_API int regs_pdcch_get(regs_t *h, SRSLTE_API int regs_pdcch_get(regs_t *h,
cf_t *slot_symbols, cf_t *slot_symbols,
cf_t *pdcch_symbols); cf_t *pdcch_symbols);
LIBLTE_API int regs_pdcch_get_offset(regs_t *h, SRSLTE_API int regs_pdcch_get_offset(regs_t *h,
cf_t *slot_symbols, cf_t *slot_symbols,
cf_t *pdcch_symbols, cf_t *pdcch_symbols,
uint32_t start_reg, uint32_t start_reg,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,13 +30,13 @@
#define SCH_ #define SCH_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/fec/rm_turbo.h" #include "srslte/fec/rm_turbo.h"
#include "srslte/phy/fec/turbocoder.h" #include "srslte/fec/turbocoder.h"
#include "srslte/phy/fec/turbodecoder.h" #include "srslte/fec/turbodecoder.h"
#include "srslte/phy/fec/crc.h" #include "srslte/fec/crc.h"
#include "srslte/phy/phch/harq.h" #include "srslte/phch/harq.h"
#include "srslte/phy/phch/uci.h" #include "srslte/phch/uci.h"
#define TDEC_MAX_ITERATIONS 5 #define TDEC_MAX_ITERATIONS 5
@ -50,7 +50,7 @@
#endif #endif
/* DL-SCH AND UL-SCH common functions */ /* DL-SCH AND UL-SCH common functions */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t nof_iterations; uint32_t nof_iterations;
float average_nof_iterations; float average_nof_iterations;
@ -69,39 +69,39 @@ typedef struct LIBLTE_API {
} sch_t; } sch_t;
LIBLTE_API int sch_init(sch_t *q); SRSLTE_API int sch_init(sch_t *q);
LIBLTE_API void sch_free(sch_t *q); SRSLTE_API void sch_free(sch_t *q);
LIBLTE_API float sch_average_noi(sch_t *q); SRSLTE_API float sch_average_noi(sch_t *q);
LIBLTE_API uint32_t sch_last_noi(sch_t *q); SRSLTE_API uint32_t sch_last_noi(sch_t *q);
LIBLTE_API int dlsch_encode(sch_t *q, SRSLTE_API int dlsch_encode(sch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uint8_t *e_bits); uint8_t *e_bits);
LIBLTE_API int dlsch_decode(sch_t *q, SRSLTE_API int dlsch_decode(sch_t *q,
harq_t *harq_process, harq_t *harq_process,
float *e_bits, float *e_bits,
uint8_t *data); uint8_t *data);
LIBLTE_API int ulsch_encode(sch_t *q, SRSLTE_API int ulsch_encode(sch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uint8_t *g_bits, uint8_t *g_bits,
uint8_t *q_bits); uint8_t *q_bits);
LIBLTE_API int ulsch_uci_encode(sch_t *q, SRSLTE_API int ulsch_uci_encode(sch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *data, uint8_t *data,
uci_data_t uci_data, uci_data_t uci_data,
uint8_t *g_bits, uint8_t *g_bits,
uint8_t *q_bits); uint8_t *q_bits);
LIBLTE_API int ulsch_decode(sch_t *q, SRSLTE_API int ulsch_decode(sch_t *q,
harq_t *harq_process, harq_t *harq_process,
float *e_bits, float *e_bits,
uint8_t *data); uint8_t *data);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,22 +30,22 @@
#define UCI_ #define UCI_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/phch/harq.h" #include "srslte/phch/harq.h"
#include "srslte/phy/fec/crc.h" #include "srslte/fec/crc.h"
#define MAX_CQI_LEN_PUSCH 512 #define MAX_CQI_LEN_PUSCH 512
#define MAX_CQI_LEN_PUCCH 13 #define MAX_CQI_LEN_PUCCH 13
#define CQI_CODED_PUCCH_B 20 #define CQI_CODED_PUCCH_B 20
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
crc_t crc; crc_t crc;
uint8_t tmp_cqi[MAX_CQI_LEN_PUSCH]; uint8_t tmp_cqi[MAX_CQI_LEN_PUSCH];
uint8_t encoded_cqi[3*MAX_CQI_LEN_PUSCH]; uint8_t encoded_cqi[3*MAX_CQI_LEN_PUSCH];
} uci_cqi_pusch_t; } uci_cqi_pusch_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint8_t *uci_cqi; uint8_t *uci_cqi;
uint32_t uci_cqi_len; uint32_t uci_cqi_len;
float beta_cqi; float beta_cqi;
@ -57,11 +57,11 @@ typedef struct LIBLTE_API {
float beta_ack; float beta_ack;
} uci_data_t; } uci_data_t;
LIBLTE_API int uci_cqi_init(uci_cqi_pusch_t *q); SRSLTE_API int uci_cqi_init(uci_cqi_pusch_t *q);
LIBLTE_API void uci_cqi_free(uci_cqi_pusch_t *q); SRSLTE_API void uci_cqi_free(uci_cqi_pusch_t *q);
LIBLTE_API int uci_encode_cqi_pusch(uci_cqi_pusch_t *q, SRSLTE_API int uci_encode_cqi_pusch(uci_cqi_pusch_t *q,
uint8_t *cqi_data, uint8_t *cqi_data,
uint32_t cqi_len, uint32_t cqi_len,
float beta, float beta,
@ -69,18 +69,18 @@ LIBLTE_API int uci_encode_cqi_pusch(uci_cqi_pusch_t *q,
harq_t *harq_process, harq_t *harq_process,
uint8_t *q_bits); uint8_t *q_bits);
LIBLTE_API int uci_encode_cqi_pucch(uint8_t *cqi_data, SRSLTE_API int uci_encode_cqi_pucch(uint8_t *cqi_data,
uint32_t cqi_len, uint32_t cqi_len,
uint8_t b_bits[CQI_CODED_PUCCH_B]); uint8_t b_bits[CQI_CODED_PUCCH_B]);
LIBLTE_API int uci_encode_ack(uint8_t data, SRSLTE_API int uci_encode_ack(uint8_t data,
uint32_t O_cqi, uint32_t O_cqi,
float beta, float beta,
harq_t *harq_process, harq_t *harq_process,
uint32_t H_prime_total, uint32_t H_prime_total,
uint8_t *q_bits); uint8_t *q_bits);
LIBLTE_API int uci_encode_ri(uint8_t data, SRSLTE_API int uci_encode_ri(uint8_t data,
uint32_t O_cqi, uint32_t O_cqi,
float beta, float beta,
harq_t *harq_process, harq_t *harq_process,

@ -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_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,7 +33,7 @@
typedef _Complex float cf_t; typedef _Complex float cf_t;
LIBLTE_API void decim_c(cf_t *input, cf_t *output, int M, int len); SRSLTE_API void decim_c(cf_t *input, cf_t *output, int M, int len);
LIBLTE_API void decim_f(float *input, float *output, int M, int len); SRSLTE_API void decim_f(float *input, float *output, int M, int len);
#endif // DECIM_H #endif // DECIM_H

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -37,20 +37,20 @@ typedef _Complex float cf_t;
/************* STATIC LINEAR INTERPOLATION FUNCTIONS */ /************* STATIC LINEAR INTERPOLATION FUNCTIONS */
LIBLTE_API cf_t interp_linear_onesample(cf_t input0, SRSLTE_API cf_t interp_linear_onesample(cf_t input0,
cf_t input1); cf_t input1);
LIBLTE_API cf_t interp_linear_onesample_cabs(cf_t input0, SRSLTE_API cf_t interp_linear_onesample_cabs(cf_t input0,
cf_t input1); cf_t input1);
LIBLTE_API void interp_linear_offset_cabs(cf_t *input, SRSLTE_API void interp_linear_offset_cabs(cf_t *input,
cf_t *output, cf_t *output,
uint32_t M, uint32_t M,
uint32_t len, uint32_t len,
uint32_t off_st, uint32_t off_st,
uint32_t off_end); uint32_t off_end);
LIBLTE_API void interp_linear_f(float *input, SRSLTE_API void interp_linear_f(float *input,
float *output, float *output,
uint32_t M, uint32_t M,
uint32_t len); uint32_t len);
@ -64,12 +64,12 @@ typedef struct {
uint32_t vector_len; uint32_t vector_len;
} interp_linvec_t; } interp_linvec_t;
LIBLTE_API int interp_linear_vector_init(interp_linvec_t *q, SRSLTE_API int interp_linear_vector_init(interp_linvec_t *q,
uint32_t vector_len); uint32_t vector_len);
LIBLTE_API void interp_linear_vector_free(interp_linvec_t *q); SRSLTE_API void interp_linear_vector_free(interp_linvec_t *q);
LIBLTE_API void interp_linear_vector(interp_linvec_t *q, SRSLTE_API void interp_linear_vector(interp_linvec_t *q,
cf_t *in0, cf_t *in0,
cf_t *in1, cf_t *in1,
cf_t *between, cf_t *between,
@ -87,13 +87,13 @@ typedef struct {
uint32_t M; uint32_t M;
} interp_lin_t; } interp_lin_t;
LIBLTE_API int interp_linear_init(interp_lin_t *q, SRSLTE_API int interp_linear_init(interp_lin_t *q,
uint32_t vector_len, uint32_t vector_len,
uint32_t M); uint32_t M);
LIBLTE_API void interp_linear_free(interp_lin_t *q); SRSLTE_API void interp_linear_free(interp_lin_t *q);
LIBLTE_API void interp_linear_offset(interp_lin_t *q, SRSLTE_API void interp_linear_offset(interp_lin_t *q,
cf_t *input, cf_t *input,
cf_t *output, cf_t *output,
uint32_t off_st, uint32_t off_st,

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -38,14 +38,14 @@ typedef _Complex float cf_t;
#define RESAMPLE_ARB_N 32 // Polyphase filter rows #define RESAMPLE_ARB_N 32 // Polyphase filter rows
#define RESAMPLE_ARB_M 8 // Polyphase filter columns #define RESAMPLE_ARB_M 8 // Polyphase filter columns
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
float rate; // Resample rate float rate; // Resample rate
float step; // Step increment through filter float step; // Step increment through filter
float acc; // Index into filter float acc; // Index into filter
cf_t reg[RESAMPLE_ARB_M]; // Our window of samples cf_t reg[RESAMPLE_ARB_M]; // Our window of samples
}resample_arb_t; }resample_arb_t;
LIBLTE_API void resample_arb_init(resample_arb_t *q, float rate); SRSLTE_API void resample_arb_init(resample_arb_t *q, float rate);
LIBLTE_API int resample_arb_compute(resample_arb_t *q, cf_t *input, cf_t *output, int n_in); SRSLTE_API int resample_arb_compute(resample_arb_t *q, cf_t *input, cf_t *output, int n_in);
#endif //RESAMPLE_ARB_ #endif //RESAMPLE_ARB_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -30,37 +30,37 @@
#define SCRAMBLING_ #define SCRAMBLING_
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/sequence.h" #include "srslte/common/sequence.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
/* Scrambling has no state */ /* Scrambling has no state */
LIBLTE_API void scrambling_b(sequence_t *s, SRSLTE_API void scrambling_b(sequence_t *s,
uint8_t *data); uint8_t *data);
LIBLTE_API void scrambling_b_offset(sequence_t *s, SRSLTE_API void scrambling_b_offset(sequence_t *s,
uint8_t *data, uint8_t *data,
int offset, int offset,
int len); int len);
LIBLTE_API void scrambling_b_offset_pusch(sequence_t *s, SRSLTE_API void scrambling_b_offset_pusch(sequence_t *s,
uint8_t *data, uint8_t *data,
int offset, int offset,
int len); int len);
LIBLTE_API void scrambling_f(sequence_t *s, SRSLTE_API void scrambling_f(sequence_t *s,
float *data); float *data);
LIBLTE_API void scrambling_f_offset(sequence_t *s, SRSLTE_API void scrambling_f_offset(sequence_t *s,
float *data, float *data,
int offset, int offset,
int len); int len);
LIBLTE_API void scrambling_c(sequence_t *s, SRSLTE_API void scrambling_c(sequence_t *s,
cf_t *data); cf_t *data);
LIBLTE_API void scrambling_c_offset(sequence_t *s, SRSLTE_API void scrambling_c_offset(sequence_t *s,
cf_t *data, cf_t *data,
int offset, int offset,
int len); int len);
@ -76,11 +76,11 @@ LIBLTE_API void scrambling_c_offset(sequence_t *s,
#define SCRAMBLING_PMCH 4 #define SCRAMBLING_PMCH 4
#define SCRAMBLING_PUCCH 5 #define SCRAMBLING_PUCCH 5
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
sequence_t seq[NSUBFRAMES_X_FRAME]; sequence_t seq[NSUBFRAMES_X_FRAME];
}scrambling_t; }scrambling_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
scrambling_t obj; scrambling_t obj;
struct scrambling_init { struct scrambling_init {
int hard; int hard;

@ -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

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -32,7 +32,7 @@
#include <complex.h> #include <complex.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/utils/cexptab.h" #include "srslte/utils/cexptab.h"
typedef _Complex float cf_t; typedef _Complex float cf_t;
@ -41,7 +41,7 @@ typedef _Complex float cf_t;
#define CFO_CEXPTAB_SIZE 4096 #define CFO_CEXPTAB_SIZE 4096
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
float last_freq; float last_freq;
float tol; float tol;
int nsamples; int nsamples;
@ -49,18 +49,18 @@ typedef struct LIBLTE_API {
cf_t *cur_cexp; cf_t *cur_cexp;
}cfo_t; }cfo_t;
LIBLTE_API int cfo_init(cfo_t *h, SRSLTE_API int cfo_init(cfo_t *h,
uint32_t nsamples); uint32_t nsamples);
LIBLTE_API void cfo_free(cfo_t *h); SRSLTE_API void cfo_free(cfo_t *h);
LIBLTE_API int cfo_realloc(cfo_t *h, SRSLTE_API int cfo_realloc(cfo_t *h,
uint32_t samples); uint32_t samples);
LIBLTE_API void cfo_set_tol(cfo_t *h, SRSLTE_API void cfo_set_tol(cfo_t *h,
float tol); float tol);
LIBLTE_API void cfo_correct(cfo_t *h, SRSLTE_API void cfo_correct(cfo_t *h,
cf_t *input, cf_t *input,
cf_t *output, cf_t *output,
float freq); float freq);

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,8 +33,8 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/utils/convolution.h" #include "srslte/utils/convolution.h"
typedef _Complex float cf_t; /* this is only a shortcut */ typedef _Complex float cf_t; /* this is only a shortcut */
@ -65,7 +65,7 @@ typedef _Complex float cf_t; /* this is only a shortcut */
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
dft_plan_t dftp_input; dft_plan_t dftp_input;
@ -90,46 +90,46 @@ typedef struct LIBLTE_API {
typedef enum { PSS_TX, PSS_RX } pss_direction_t; typedef enum { PSS_TX, PSS_RX } pss_direction_t;
/* Basic functionality */ /* Basic functionality */
LIBLTE_API int pss_synch_init_fft(pss_synch_t *q, SRSLTE_API int pss_synch_init_fft(pss_synch_t *q,
uint32_t frame_size, uint32_t frame_size,
uint32_t fft_size); uint32_t fft_size);
LIBLTE_API int pss_synch_init(pss_synch_t *q, SRSLTE_API int pss_synch_init(pss_synch_t *q,
uint32_t frame_size); uint32_t frame_size);
LIBLTE_API void pss_synch_free(pss_synch_t *q); SRSLTE_API void pss_synch_free(pss_synch_t *q);
LIBLTE_API void pss_synch_reset(pss_synch_t *q); SRSLTE_API void pss_synch_reset(pss_synch_t *q);
LIBLTE_API int pss_generate(cf_t *signal, SRSLTE_API int pss_generate(cf_t *signal,
uint32_t N_id_2); uint32_t N_id_2);
LIBLTE_API void pss_put_slot(cf_t *pss_signal, SRSLTE_API void pss_put_slot(cf_t *pss_signal,
cf_t *slot, cf_t *slot,
uint32_t nof_prb, uint32_t nof_prb,
lte_cp_t cp); lte_cp_t cp);
LIBLTE_API void pss_synch_set_ema_alpha(pss_synch_t *q, SRSLTE_API void pss_synch_set_ema_alpha(pss_synch_t *q,
float alpha); float alpha);
LIBLTE_API int pss_synch_set_N_id_2(pss_synch_t *q, SRSLTE_API int pss_synch_set_N_id_2(pss_synch_t *q,
uint32_t N_id_2); uint32_t N_id_2);
LIBLTE_API int pss_synch_find_pss(pss_synch_t *q, SRSLTE_API int pss_synch_find_pss(pss_synch_t *q,
cf_t *input, cf_t *input,
float *corr_peak_value); float *corr_peak_value);
LIBLTE_API int pss_synch_chest(pss_synch_t *q, SRSLTE_API int pss_synch_chest(pss_synch_t *q,
cf_t *input, cf_t *input,
cf_t ce[PSS_LEN]); cf_t ce[PSS_LEN]);
LIBLTE_API float pss_synch_cfo_compute(pss_synch_t* q, SRSLTE_API float pss_synch_cfo_compute(pss_synch_t* q,
cf_t *pss_recv); cf_t *pss_recv);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
pss_synch_t obj; pss_synch_t obj;
struct pss_synch_init { struct pss_synch_init {
int frame_size; // if 0, 2048 int frame_size; // if 0, 2048
@ -149,9 +149,9 @@ typedef struct LIBLTE_API {
#define DEFAULT_FRAME_SIZE 2048 #define DEFAULT_FRAME_SIZE 2048
LIBLTE_API int pss_synch_initialize(pss_synch_hl* h); SRSLTE_API int pss_synch_initialize(pss_synch_hl* h);
LIBLTE_API int pss_synch_work(pss_synch_hl* hl); SRSLTE_API int pss_synch_work(pss_synch_hl* hl);
LIBLTE_API int pss_synch_stop(pss_synch_hl* hl); SRSLTE_API int pss_synch_stop(pss_synch_hl* hl);
#endif // PSS_ #endif // PSS_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,7 +31,7 @@
#include "srslte/config.h" #include "srslte/config.h"
LIBLTE_API float sfo_estimate(int *t0, int len, float period); SRSLTE_API float sfo_estimate(int *t0, int len, float period);
LIBLTE_API float sfo_estimate_period(int *t0, int *t, int len, float period); SRSLTE_API float sfo_estimate_period(int *t0, int *t, int len, float period);
#endif // SFO_ #endif // SFO_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,8 +33,8 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phy/utils/dft.h" #include "srslte/utils/dft.h"
typedef _Complex float cf_t; /* this is only a shortcut */ typedef _Complex float cf_t; /* this is only a shortcut */
@ -60,7 +60,7 @@ struct fc_tables{
/* Low-level API */ /* Low-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
dft_plan_t dftp_input; dft_plan_t dftp_input;
@ -81,27 +81,27 @@ typedef struct LIBLTE_API {
/* Basic functionality */ /* Basic functionality */
LIBLTE_API int sss_synch_init(sss_synch_t *q, SRSLTE_API int sss_synch_init(sss_synch_t *q,
uint32_t fft_size); uint32_t fft_size);
LIBLTE_API int sss_synch_realloc(sss_synch_t *q, SRSLTE_API int sss_synch_realloc(sss_synch_t *q,
uint32_t fft_size); uint32_t fft_size);
LIBLTE_API void sss_synch_free(sss_synch_t *q); SRSLTE_API void sss_synch_free(sss_synch_t *q);
LIBLTE_API void sss_generate(float *signal0, SRSLTE_API void sss_generate(float *signal0,
float *signal5, float *signal5,
uint32_t cell_id); uint32_t cell_id);
LIBLTE_API void sss_put_slot(float *sss, SRSLTE_API void sss_put_slot(float *sss,
cf_t *symbol, cf_t *symbol,
uint32_t nof_prb, uint32_t nof_prb,
lte_cp_t cp); lte_cp_t cp);
LIBLTE_API int sss_synch_set_N_id_2(sss_synch_t *q, SRSLTE_API int sss_synch_set_N_id_2(sss_synch_t *q,
uint32_t N_id_2); uint32_t N_id_2);
LIBLTE_API int sss_synch_m0m1_partial(sss_synch_t *q, SRSLTE_API int sss_synch_m0m1_partial(sss_synch_t *q,
cf_t *input, cf_t *input,
uint32_t M, uint32_t M,
cf_t ce[2*N_SSS], cf_t ce[2*N_SSS],
@ -110,7 +110,7 @@ LIBLTE_API int sss_synch_m0m1_partial(sss_synch_t *q,
uint32_t *m1, uint32_t *m1,
float *m1_value); float *m1_value);
LIBLTE_API int sss_synch_m0m1_diff_coh(sss_synch_t *q, SRSLTE_API int sss_synch_m0m1_diff_coh(sss_synch_t *q,
cf_t *input, cf_t *input,
cf_t ce[2*N_SSS], cf_t ce[2*N_SSS],
uint32_t *m0, uint32_t *m0,
@ -118,7 +118,7 @@ LIBLTE_API int sss_synch_m0m1_diff_coh(sss_synch_t *q,
uint32_t *m1, uint32_t *m1,
float *m1_value); float *m1_value);
LIBLTE_API int sss_synch_m0m1_diff(sss_synch_t *q, SRSLTE_API int sss_synch_m0m1_diff(sss_synch_t *q,
cf_t *input, cf_t *input,
uint32_t *m0, uint32_t *m0,
float *m0_value, float *m0_value,
@ -126,31 +126,31 @@ LIBLTE_API int sss_synch_m0m1_diff(sss_synch_t *q,
float *m1_value); float *m1_value);
LIBLTE_API uint32_t sss_synch_subframe(uint32_t m0, SRSLTE_API uint32_t sss_synch_subframe(uint32_t m0,
uint32_t m1); uint32_t m1);
LIBLTE_API int sss_synch_N_id_1(sss_synch_t *q, SRSLTE_API int sss_synch_N_id_1(sss_synch_t *q,
uint32_t m0, uint32_t m0,
uint32_t m1); uint32_t m1);
LIBLTE_API int sss_synch_frame(sss_synch_t *q, SRSLTE_API int sss_synch_frame(sss_synch_t *q,
cf_t *input, cf_t *input,
uint32_t *subframe_idx, uint32_t *subframe_idx,
uint32_t *N_id_1); uint32_t *N_id_1);
LIBLTE_API void sss_synch_set_threshold(sss_synch_t *q, SRSLTE_API void sss_synch_set_threshold(sss_synch_t *q,
float threshold); float threshold);
LIBLTE_API void sss_synch_set_symbol_sz(sss_synch_t *q, SRSLTE_API void sss_synch_set_symbol_sz(sss_synch_t *q,
uint32_t symbol_sz); uint32_t symbol_sz);
LIBLTE_API void sss_synch_set_subframe_sz(sss_synch_t *q, SRSLTE_API void sss_synch_set_subframe_sz(sss_synch_t *q,
uint32_t subframe_sz); uint32_t subframe_sz);
/* High-level API */ /* High-level API */
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
sss_synch_t obj; sss_synch_t obj;
struct sss_synch_init { struct sss_synch_init {
uint32_t N_id_2; uint32_t N_id_2;
@ -170,9 +170,9 @@ typedef struct LIBLTE_API {
#define DEFAULT_FRAME_SIZE 2048 #define DEFAULT_FRAME_SIZE 2048
LIBLTE_API int sss_synch_initialize(sss_synch_hl* h); SRSLTE_API int sss_synch_initialize(sss_synch_hl* h);
LIBLTE_API int sss_synch_work(sss_synch_hl* hl); SRSLTE_API int sss_synch_work(sss_synch_hl* hl);
LIBLTE_API int sss_synch_stop(sss_synch_hl* hl); SRSLTE_API int sss_synch_stop(sss_synch_hl* hl);
#endif // SSS_ #endif // SSS_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -33,9 +33,9 @@
#include <math.h> #include <math.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/sync/pss.h" #include "srslte/sync/pss.h"
#include "srslte/phy/sync/sss.h" #include "srslte/sync/sss.h"
#include "srslte/phy/sync/cfo.h" #include "srslte/sync/cfo.h"
#define FFT_SIZE_MIN 64 #define FFT_SIZE_MIN 64
#define FFT_SIZE_MAX 2048 #define FFT_SIZE_MAX 2048
@ -54,7 +54,7 @@
typedef enum {SSS_DIFF=0, SSS_PARTIAL_3=2, SSS_FULL=1} sss_alg_t; typedef enum {SSS_DIFF=0, SSS_PARTIAL_3=2, SSS_FULL=1} sss_alg_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
pss_synch_t pss; pss_synch_t pss;
sss_synch_t sss; sss_synch_t sss;
float threshold; float threshold;
@ -82,75 +82,75 @@ typedef struct LIBLTE_API {
}sync_t; }sync_t;
LIBLTE_API int sync_init(sync_t *q, SRSLTE_API int sync_init(sync_t *q,
uint32_t frame_size, uint32_t frame_size,
uint32_t fft_size); uint32_t fft_size);
LIBLTE_API void sync_free(sync_t *q); SRSLTE_API void sync_free(sync_t *q);
LIBLTE_API void sync_reset(sync_t *q); SRSLTE_API void sync_reset(sync_t *q);
/* Finds a correlation peak in the input signal around position find_offset */ /* Finds a correlation peak in the input signal around position find_offset */
LIBLTE_API int sync_find(sync_t *q, SRSLTE_API int sync_find(sync_t *q,
cf_t *input, cf_t *input,
uint32_t find_offset, uint32_t find_offset,
uint32_t *peak_position); uint32_t *peak_position);
/* Estimates the CP length */ /* Estimates the CP length */
LIBLTE_API lte_cp_t sync_detect_cp(sync_t *q, SRSLTE_API lte_cp_t sync_detect_cp(sync_t *q,
cf_t *input, cf_t *input,
uint32_t peak_pos); uint32_t peak_pos);
/* Sets the threshold for peak comparison */ /* Sets the threshold for peak comparison */
LIBLTE_API void sync_set_threshold(sync_t *q, SRSLTE_API void sync_set_threshold(sync_t *q,
float threshold); float threshold);
/* Gets the subframe idx (0 or 5) */ /* Gets the subframe idx (0 or 5) */
LIBLTE_API uint32_t sync_get_sf_idx(sync_t *q); SRSLTE_API uint32_t sync_get_sf_idx(sync_t *q);
/* Gets the last peak value */ /* Gets the last peak value */
LIBLTE_API float sync_get_last_peak_value(sync_t *q); SRSLTE_API float sync_get_last_peak_value(sync_t *q);
/* Gets the mean peak value */ /* Gets the mean peak value */
LIBLTE_API float sync_get_peak_value(sync_t *q); SRSLTE_API float sync_get_peak_value(sync_t *q);
/* Choose SSS detection algorithm */ /* Choose SSS detection algorithm */
LIBLTE_API void sync_set_sss_algorithm(sync_t *q, SRSLTE_API void sync_set_sss_algorithm(sync_t *q,
sss_alg_t alg); sss_alg_t alg);
/* Sets PSS exponential averaging alpha weight */ /* Sets PSS exponential averaging alpha weight */
LIBLTE_API void sync_set_em_alpha(sync_t *q, SRSLTE_API void sync_set_em_alpha(sync_t *q,
float alpha); float alpha);
/* Sets the N_id_2 to search for */ /* Sets the N_id_2 to search for */
LIBLTE_API int sync_set_N_id_2(sync_t *q, SRSLTE_API int sync_set_N_id_2(sync_t *q,
uint32_t N_id_2); uint32_t N_id_2);
/* Gets the Physical CellId from the last call to synch_run() */ /* Gets the Physical CellId from the last call to synch_run() */
LIBLTE_API int sync_get_cell_id(sync_t *q); SRSLTE_API int sync_get_cell_id(sync_t *q);
/* Gets the CFO estimation from the last call to synch_run() */ /* Gets the CFO estimation from the last call to synch_run() */
LIBLTE_API float sync_get_cfo(sync_t *q); SRSLTE_API float sync_get_cfo(sync_t *q);
/* Gets the CP length estimation from the last call to synch_run() */ /* Gets the CP length estimation from the last call to synch_run() */
LIBLTE_API lte_cp_t sync_get_cp(sync_t *q); SRSLTE_API lte_cp_t sync_get_cp(sync_t *q);
/* Sets the CP length estimation (must do it if disabled) */ /* Sets the CP length estimation (must do it if disabled) */
LIBLTE_API void sync_set_cp(sync_t *q, lte_cp_t cp); SRSLTE_API void sync_set_cp(sync_t *q, lte_cp_t cp);
/* Enables/Disables SSS detection */ /* Enables/Disables SSS detection */
LIBLTE_API void sync_sss_en(sync_t *q, SRSLTE_API void sync_sss_en(sync_t *q,
bool enabled); bool enabled);
LIBLTE_API bool sync_sss_detected(sync_t *q); SRSLTE_API bool sync_sss_detected(sync_t *q);
LIBLTE_API bool sync_sss_is_en(sync_t *q); SRSLTE_API bool sync_sss_is_en(sync_t *q);
/* Enables/Disables CP detection */ /* Enables/Disables CP detection */
LIBLTE_API void sync_cp_en(sync_t *q, SRSLTE_API void sync_cp_en(sync_t *q,
bool enabled); bool enabled);
LIBLTE_API void sync_correct_cfo(sync_t *q, SRSLTE_API void sync_correct_cfo(sync_t *q,
bool enabled); bool enabled);
#endif // SYNC_ #endif // SYNC_

@ -2,19 +2,19 @@
* *
* \section COPYRIGHT * \section COPYRIGHT
* *
* Copyright 2013-2014 The libLTE Developers. See the * Copyright 2013-2014 The srsLTE Developers. See the
* COPYRIGHT file at the top-level directory of this distribution. * COPYRIGHT file at the top-level directory of this distribution.
* *
* \section LICENSE * \section LICENSE
* *
* This file is part of the libLTE library. * This file is part of the srsLTE library.
* *
* libLTE is free software: you can redistribute it and/or modify * srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as * it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of * published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. * the License, or (at your option) any later version.
* *
* libLTE is distributed in the hope that it will be useful, * srsLTE is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details. * GNU Lesser General Public License for more details.
@ -31,12 +31,12 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phy/ue/ue_sync.h" #include "srslte/ue/ue_sync.h"
#include "srslte/phy/ue/ue_mib.h" #include "srslte/ue/ue_mib.h"
#include "srslte/phy/sync/cfo.h" #include "srslte/sync/cfo.h"
#include "srslte/phy/ch_estimation/chest_dl.h" #include "srslte/ch_estimation/chest_dl.h"
#include "srslte/phy/phch/pbch.h" #include "srslte/phch/pbch.h"
#include "srslte/phy/common/fft.h" #include "srslte/common/fft.h"
/************************************************************ /************************************************************
* *
@ -62,7 +62,7 @@
#define CS_NOF_PRB 6 #define CS_NOF_PRB 6
#define CS_SAMP_FREQ 1920000.0 #define CS_SAMP_FREQ 1920000.0
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
uint32_t cell_id; uint32_t cell_id;
lte_cp_t cp; lte_cp_t cp;
float peak; float peak;
@ -71,7 +71,7 @@ typedef struct LIBLTE_API {
} ue_cell_search_result_t; } ue_cell_search_result_t;
typedef struct LIBLTE_API { typedef struct SRSLTE_API {
ue_sync_t ue_sync; ue_sync_t ue_sync;
uint32_t max_frames; uint32_t max_frames;
@ -85,29 +85,29 @@ typedef struct LIBLTE_API {
} ue_cell_search_t; } ue_cell_search_t;
LIBLTE_API int ue_cell_search_init(ue_cell_search_t *q, SRSLTE_API int ue_cell_search_init(ue_cell_search_t *q,
int (recv_callback)(void*, void*, uint32_t,timestamp_t*), int (recv_callback)(void*, void*, uint32_t,timestamp_t*),
void *stream_handler); void *stream_handler);
LIBLTE_API int ue_cell_search_init_max(ue_cell_search_t *q, SRSLTE_API int ue_cell_search_init_max(ue_cell_search_t *q,
uint32_t max_frames_total, uint32_t max_frames_total,
int (recv_callback)(void*, void*, uint32_t,timestamp_t*), int (recv_callback)(void*, void*, uint32_t,timestamp_t*),
void *stream_handler); void *stream_handler);
LIBLTE_API void ue_cell_search_free(ue_cell_search_t *q); SRSLTE_API void ue_cell_search_free(ue_cell_search_t *q);
LIBLTE_API int ue_cell_search_scan_N_id_2(ue_cell_search_t *q, SRSLTE_API int ue_cell_search_scan_N_id_2(ue_cell_search_t *q,
uint32_t N_id_2, uint32_t N_id_2,
ue_cell_search_result_t *found_cell); ue_cell_search_result_t *found_cell);
LIBLTE_API int ue_cell_search_scan(ue_cell_search_t * q, SRSLTE_API int ue_cell_search_scan(ue_cell_search_t * q,
ue_cell_search_result_t found_cells[3], ue_cell_search_result_t found_cells[3],
uint32_t *max_N_id_2); uint32_t *max_N_id_2);
LIBLTE_API int ue_cell_search_set_nof_frames_to_scan(ue_cell_search_t *q, SRSLTE_API int ue_cell_search_set_nof_frames_to_scan(ue_cell_search_t *q,
uint32_t nof_frames); uint32_t nof_frames);
LIBLTE_API void ue_cell_search_set_threshold(ue_cell_search_t *q, SRSLTE_API void ue_cell_search_set_threshold(ue_cell_search_t *q,
float threshold); float threshold);

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save