Documented all headers, fixed srs_ prefix repetition for modem table

master
Paul Sutton 10 years ago
parent 23f4d7cf8d
commit 13d294fd07

@ -25,7 +25,14 @@
* *
*/ */
/**********************************************************************************************
* File: agc.h
*
* Description: Automatic gain control
* This module is not currently used
*
* Reference:
*********************************************************************************************/
#ifndef AGC_ #ifndef AGC_
#define AGC_ #define AGC_
@ -36,10 +43,6 @@
#include "srslte/config.h" #include "srslte/config.h"
/* Automatic Gain Control
*
*/
#define SRSLTE_AGC_DEFAULT_BW (5e-2) #define SRSLTE_AGC_DEFAULT_BW (5e-2)
typedef struct SRSLTE_API{ typedef struct SRSLTE_API{

@ -25,7 +25,19 @@
* *
*/ */
/**********************************************************************************************
* File: chest_dl.h
*
* Description: 3GPP LTE Downlink channel estimator and equalizer.
* Estimates the channel in the resource elements transmitting references and
* interpolates for the rest of the resource grid.
* The equalizer uses the channel estimates to produce an estimation of the
* transmitted symbol.
* This object depends on the srslte_refsignal_t object for creating the LTE
* CSR signal.
*
* Reference:
*********************************************************************************************/
#ifndef CHEST_DL_ #ifndef CHEST_DL_
#define CHEST_DL_ #define CHEST_DL_
@ -38,15 +50,6 @@
#include "srslte/ch_estimation/refsignal_dl.h" #include "srslte/ch_estimation/refsignal_dl.h"
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
/** 3GPP LTE Downlink channel estimator and equalizer.
* Estimates the channel in the resource elements transmitting references and interpolates for the rest
* of the resource grid.
*
* The equalizer uses the channel estimates to produce an estimation of the transmitted symbol.
*
* This object depends on the srslte_refsignal_t object for creating the LTE CSR signal.
*/
#define SRSLTE_CHEST_MAX_FILTER_FREQ_LEN 10 #define SRSLTE_CHEST_MAX_FILTER_FREQ_LEN 10
#define SRSLTE_CHEST_MAX_FILTER_TIME_LEN 4 #define SRSLTE_CHEST_MAX_FILTER_TIME_LEN 4
@ -110,4 +113,4 @@ SRSLTE_API float srslte_chest_dl_get_rsrq(srslte_chest_dl_t *q);
SRSLTE_API float srslte_chest_dl_get_rsrp(srslte_chest_dl_t *q); SRSLTE_API float srslte_chest_dl_get_rsrp(srslte_chest_dl_t *q);
#endif #endif

@ -25,13 +25,17 @@
* *
*/ */
/**********************************************************************************************
* File: refsignal_dl.h
*
* Description: Object to manage downlink reference signals for channel estimation.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.10
*********************************************************************************************/
#ifndef SRSLTE_REFSIGNAL_DL_ #ifndef SRSLTE_REFSIGNAL_DL_
#define SRSLTE_REFSIGNAL_DL_ #define SRSLTE_REFSIGNAL_DL_
/* Object to manage Downlink reference signals for channel estimation.
*
*/
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"

@ -25,13 +25,17 @@
* *
*/ */
/**********************************************************************************************
* File: refsignal_ul.h
*
* Description: Object to manage uplink reference signals for channel estimation.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.5
*********************************************************************************************/
#ifndef SRSLTE_REFSIGNAL_UL_ #ifndef SRSLTE_REFSIGNAL_UL_
#define SRSLTE_REFSIGNAL_UL_ #define SRSLTE_REFSIGNAL_UL_
/* Object to manage Downlink reference signals for channel estimation.
*
*/
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/phch/pucch.h" #include "srslte/phch/pucch.h"
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"

@ -25,6 +25,13 @@
* *
*/ */
/**********************************************************************************************
* File: ch_awgn.h
*
* Description: Additive white gaussian noise channel object
*
* Reference:
*********************************************************************************************/
#include <complex.h> #include <complex.h>
#include <stdint.h> #include <stdint.h>

@ -25,6 +25,13 @@
* *
*/ */
/**********************************************************************************************
* File: phy_common.h
*
* Description: Common parameters and lookup functions for PHY
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10
*********************************************************************************************/
#ifndef _LTEBASE_ #ifndef _LTEBASE_
#define _LTEBASE_ #define _LTEBASE_

@ -25,6 +25,15 @@
* *
*/ */
/**********************************************************************************************
* File: sequence.h
*
* Description: Pseudo Random Sequence generation. Sequences are defined by a length-31 Gold
* sequence.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.2
*********************************************************************************************/
#ifndef LTESEQ_ #ifndef LTESEQ_
#define LTESEQ_ #define LTESEQ_

@ -25,6 +25,15 @@
* *
*/ */
/**********************************************************************************************
* File: timestamp.h
*
* Description: A simple timestamp struct with separate variables for full and frac seconds.
* Separate variables are used to avoid loss of precision in our frac seconds.
* Only positive timestamps are supported.
*
* Reference:
*********************************************************************************************/
#ifndef TIMESTAMP_ #ifndef TIMESTAMP_
#define TIMESTAMP_ #define TIMESTAMP_
@ -32,13 +41,6 @@
#include <time.h> #include <time.h>
#include "srslte/config.h" #include "srslte/config.h"
/*!
* A simple timestamp struct with separate variables for full and frac seconds.
*
* Separate variables are used to avoid loss of precision in our frac seconds.
* Only positive timestamps are supported.
*/
typedef struct SRSLTE_API{ typedef struct SRSLTE_API{
time_t full_secs; time_t full_secs;
double frac_secs; double frac_secs;

@ -32,18 +32,23 @@
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"
/**********************************************************************************************
/* Generic DFT module. * File: dft.h
* Supports one-dimensional complex and real transforms. Options are set
* using the dft_plan_set_x functions.
* *
* Options (default is false): * Description: Generic DFT module.
* mirror - Rearranges negative and positive frequency bins. Swaps after * Supports one-dimensional complex and real transforms. Options are set
* transform for FORWARD, swaps before transform for BACKWARD. * using the dft_plan_set_x functions.
* db - Provides output in dB (10*log10(x)). *
* norm - Normalizes output (by sqrt(len) for complex, len for real). * Options (default is false):
* dc - Handles insertion and removal of null DC carrier internally. *
*/ * mirror - Rearranges negative and positive frequency bins. Swaps after
* transform for FORWARD, swaps before transform for BACKWARD.
* db - Provides output in dB (10*log10(x)).
* norm - Normalizes output (by sqrt(len) for complex, len for real).
* dc - Handles insertion and removal of null DC carrier internally.
*
* Reference:
*********************************************************************************************/
typedef enum { typedef enum {
SRSLTE_DFT_COMPLEX, SRSLTE_REAL SRSLTE_DFT_COMPLEX, SRSLTE_REAL

@ -25,6 +25,14 @@
* *
*/ */
/**********************************************************************************************
* File: dft_precoding.h
*
* Description: DFT-based transform precoding object.
* Used in generation of uplink SCFDMA signals.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.3.3
*********************************************************************************************/
#ifndef DFTPREC_ #ifndef DFTPREC_
#define DFTPREC_ #define DFTPREC_

@ -29,6 +29,14 @@
#ifndef LTEFFT_ #ifndef LTEFFT_
#define LTEFFT_ #define LTEFFT_
/**********************************************************************************************
* File: ofdm.h
*
* Description: OFDM modulation object.
* Used in generation of downlink OFDM signals.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6
*********************************************************************************************/
#include <strings.h> #include <strings.h>
#include <stdlib.h> #include <stdlib.h>

@ -25,7 +25,15 @@
* *
*/ */
/**********************************************************************************************
* File: convcoder.h
*
* Description: Convolutional encoder.
* LTE uses a tail biting convolutional code with constraint length 7
* and coding rate 1/3.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.1
*********************************************************************************************/
#ifndef CONVCODER_ #ifndef CONVCODER_
#define CONVCODER_ #define CONVCODER_

@ -25,6 +25,15 @@
* *
*/ */
/**********************************************************************************************
* File: convcoder.h
*
* Description: Cyclic Redundancy Check
* LTE requires CRC lengths 8, 16, 24A and 24B, each with it's own generator
* polynomial.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.1
*********************************************************************************************/
#ifndef CRC_ #ifndef CRC_
#define CRC_ #define CRC_

@ -25,6 +25,15 @@
* *
*/ */
/**********************************************************************************************
* File: rm_conv.h
*
* Description: Rate matching for convolutionally coded transport channels and control
* information.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.4.2
*********************************************************************************************/
#ifndef RM_CONV_ #ifndef RM_CONV_
#define RM_CONV_ #define RM_CONV_

@ -25,6 +25,14 @@
* *
*/ */
/**********************************************************************************************
* File: rm_turbo.h
*
* Description: Rate matching for turbo coded transport channels.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.4.1
*********************************************************************************************/
#ifndef RM_TURBO_ #ifndef RM_TURBO_
#define RM_TURBO_ #define RM_TURBO_

@ -25,6 +25,14 @@
* *
*/ */
/**********************************************************************************************
* File: tc_interl.h
*
* Description: Turbo code interleaver.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.2.3
*********************************************************************************************/
#ifndef _TC_INTERL_H #ifndef _TC_INTERL_H
#define _TC_INTERL_H #define _TC_INTERL_H

@ -25,6 +25,17 @@
* *
*/ */
/**********************************************************************************************
* File: turbocoder.h
*
* Description: Turbo coder.
* Parallel Concatenated Convolutional Code (PCCC) with two 8-state constituent
* encoders and one turbo code internal interleaver. The coding rate of turbo
* encoder is 1/3.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.2
*********************************************************************************************/
#ifndef TURBOCODER_ #ifndef TURBOCODER_
#define TURBOCODER_ #define TURBOCODER_

@ -25,6 +25,18 @@
* *
*/ */
/**********************************************************************************************
* File: turbodecoder.h
*
* Description: Turbo Decoder.
* Parallel Concatenated Convolutional Code (PCCC) with two 8-state constituent
* encoders and one turbo code internal interleaver. The coding rate of turbo
* encoder is 1/3.
* MAP_GEN is the MAX-LOG-MAP generic implementation of the decoder.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.1.3.2
*********************************************************************************************/
#ifndef TURBODECODER_ #ifndef TURBODECODER_
#define TURBODECODER_ #define TURBODECODER_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: viterbi.h
*
* Description: Viterbi decoder for convolutionally encoded data.
* Used for decoding of PBCH and PDCCH (type 37 decoder).
*
* Reference:
*****************************************************************************/
#ifndef VITERBI_ #ifndef VITERBI_
#define VITERBI_ #define VITERBI_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: binsource.h
*
* Description: Pseudo-random binary source.
*
* Reference:
*****************************************************************************/
#ifndef BINSOURCE_ #ifndef BINSOURCE_
#define BINSOURCE_ #define BINSOURCE_

@ -25,6 +25,15 @@
* *
*/ */
/******************************************************************************
* File: filesink.h
*
* Description: File sink.
* Supports writing floats, complex floats and complex shorts
* to file in text or binary formats.
*
* Reference:
*****************************************************************************/
#ifndef FILESINK_ #ifndef FILESINK_
#define FILESINK_ #define FILESINK_

@ -25,6 +25,15 @@
* *
*/ */
/******************************************************************************
* File: filesource.h
*
* Description: File source.
* Supports reading floats, complex floats and complex shorts
* from file in text or binary formats.
*
* Reference:
*****************************************************************************/
#ifndef FILESOURCE_ #ifndef FILESOURCE_
#define FILESOURCE_ #define FILESOURCE_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: netsink.h
*
* Description: Network socket sink.
* Supports writing binary data to a TCP or UDP socket.
*
* Reference:
*****************************************************************************/
#ifndef NETSINK_ #ifndef NETSINK_
#define NETSINK_ #define NETSINK_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: netsource.h
*
* Description: Network socket source.
* Supports reading binary data from a TCP or UDP socket.
*
* Reference:
*****************************************************************************/
#ifndef NETSOURCE_ #ifndef NETSOURCE_
#define NETSOURCE_ #define NETSOURCE_

@ -25,6 +25,15 @@
* *
*/ */
/******************************************************************************
* File: layermap.h
*
* Description: MIMO layer mapping and demapping.
* Single antenna, tx diversity and spatial multiplexing are
* supported.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.3.3
*****************************************************************************/
#ifndef LAYERMAP_H_ #ifndef LAYERMAP_H_
#define LAYERMAP_H_ #define LAYERMAP_H_

@ -25,6 +25,15 @@
* *
*/ */
/******************************************************************************
* File: precoding.h
*
* Description: MIMO precoding and deprecoding.
* Single antenna and tx diversity supported.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.3.4
*****************************************************************************/
#ifndef PRECODING_H_ #ifndef PRECODING_H_
#define PRECODING_H_ #define PRECODING_H_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: demod_hard.h
*
* Description: Hard demodulator.
* Supports BPSK, QPSK, 16QAM and 64QAM.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.1
*****************************************************************************/
#ifndef DEMOD_HARD_ #ifndef DEMOD_HARD_
#define DEMOD_HARD_ #define DEMOD_HARD_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: demod_soft.h
*
* Description: Soft demodulator.
* Supports BPSK, QPSK, 16QAM and 64QAM.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.1
*****************************************************************************/
#ifndef DEMOD_SOFT_ #ifndef DEMOD_SOFT_
#define DEMOD_SOFT_ #define DEMOD_SOFT_
@ -43,7 +51,7 @@ typedef enum SRSLTE_API {
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
float sigma; // noise power float sigma; // noise power
srslte_demod_soft_alg_t alg_type; // soft demapping algorithm (SRSLTE_DEMOD_SOFT_ALG_EXACT or SRSLTE_DEMOD_SOFT_ALG_APPROX) srslte_demod_soft_alg_t alg_type; // soft demapping algorithm (SRSLTE_DEMOD_SOFT_ALG_EXACT or SRSLTE_DEMOD_SOFT_ALG_APPROX)
srslte_srslte_modem_table_t *table; // symbol mapping table (see modem_table.h) srslte_modem_table_t *table; // symbol mapping table (see modem_table.h)
uint32_t *zones; uint32_t *zones;
float *dd; float *dd;
uint32_t max_symbols; uint32_t max_symbols;
@ -55,7 +63,7 @@ SRSLTE_API int srslte_demod_soft_init(srslte_demod_soft_t *q,
SRSLTE_API void srslte_demod_soft_free(srslte_demod_soft_t *q); SRSLTE_API void srslte_demod_soft_free(srslte_demod_soft_t *q);
SRSLTE_API void srslte_demod_soft_table_set(srslte_demod_soft_t *q, SRSLTE_API void srslte_demod_soft_table_set(srslte_demod_soft_t *q,
srslte_srslte_modem_table_t *table); srslte_modem_table_t *table);
SRSLTE_API void srslte_demod_soft_alg_set(srslte_demod_soft_t *q, SRSLTE_API void srslte_demod_soft_alg_set(srslte_demod_soft_t *q,
srslte_demod_soft_alg_t alg_type); srslte_demod_soft_alg_t alg_type);
@ -72,7 +80,7 @@ SRSLTE_API int srslte_demod_soft_demodulate(srslte_demod_soft_t *q,
/* High-level API */ /* High-level API */
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_demod_soft_t obj; srslte_demod_soft_t obj;
srslte_srslte_modem_table_t table; srslte_modem_table_t table;
struct srslte_demod_soft_init{ struct srslte_demod_soft_init{
srslte_mod_t std; // symbol mapping standard (see modem_table.h) srslte_mod_t std; // symbol mapping standard (see modem_table.h)

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: mod.h
*
* Description: Modulation.
* Supports BPSK, QPSK, 16QAM and 64QAM.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.1
*****************************************************************************/
#ifndef MOD_ #ifndef MOD_
#define MOD_ #define MOD_
@ -35,14 +43,14 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "modem_table.h" #include "modem_table.h"
SRSLTE_API int srslte_mod_modulate(srslte_srslte_modem_table_t* table, SRSLTE_API int srslte_mod_modulate(srslte_modem_table_t* table,
uint8_t *bits, uint8_t *bits,
cf_t* symbols, cf_t* symbols,
uint32_t nbits); uint32_t nbits);
/* High-level API */ /* High-level API */
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_srslte_modem_table_t obj; srslte_modem_table_t obj;
struct mod_init { struct mod_init {
srslte_mod_t std; // symbol mapping standard (see modem_table.h) srslte_mod_t std; // symbol mapping standard (see modem_table.h)
} init; } init;

@ -25,7 +25,14 @@
* *
*/ */
/******************************************************************************
* File: modem_table.h
*
* Description: Modem tables used for modulation/demodulation.
* Supports BPSK, QPSK, 16QAM and 64QAM.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 7.1
*****************************************************************************/
#ifndef MODEM_TABLE_ #ifndef MODEM_TABLE_
#define MODEM_TABLE_ #define MODEM_TABLE_
@ -49,22 +56,22 @@ typedef struct SRSLTE_API {
srslte_soft_table_t soft_table; // symbol-to-bit mapping (used in soft demodulating) srslte_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
uint32_t nbits_x_symbol; // number of bits per symbol uint32_t nbits_x_symbol; // number of bits per symbol
}srslte_srslte_modem_table_t; }srslte_modem_table_t;
SRSLTE_API void srslte_modem_table_init(srslte_srslte_modem_table_t* q); SRSLTE_API void srslte_modem_table_init(srslte_modem_table_t* q);
SRSLTE_API void srslte_modem_table_free(srslte_srslte_modem_table_t* q); SRSLTE_API void srslte_modem_table_free(srslte_modem_table_t* q);
SRSLTE_API void srslte_modem_table_reset(srslte_srslte_modem_table_t* q); SRSLTE_API void srslte_modem_table_reset(srslte_modem_table_t* q);
SRSLTE_API int srslte_modem_table_set(srslte_srslte_modem_table_t* q, SRSLTE_API int srslte_modem_table_set(srslte_modem_table_t* q,
cf_t* table, cf_t* table,
srslte_soft_table_t *soft_table, srslte_soft_table_t *soft_table,
uint32_t nsymbols, uint32_t nsymbols,
uint32_t nbits_x_symbol); uint32_t nbits_x_symbol);
SRSLTE_API int srslte_modem_table_lte(srslte_srslte_modem_table_t* q, SRSLTE_API int srslte_modem_table_lte(srslte_modem_table_t* q,
srslte_mod_t modulation, srslte_mod_t modulation,
bool compute_soft_demod); bool compute_soft_demod);

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: cqi.h
*
* Description: Channel quality indicator message packing.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.2.2.6, 5.2.3.3
*****************************************************************************/
#ifndef CQI_ #ifndef CQI_
#define CQI_ #define CQI_
@ -33,11 +41,6 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/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
*
*/
/* Table 5.2.2.6.2-1: Fields for channel quality information feedback for higher layer configured subband /* Table 5.2.2.6.2-1: Fields for channel quality information feedback for higher layer configured subband
CQI reports CQI reports

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: dci.h
*
* Description: Downlink control information (DCI)
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.3.3
*****************************************************************************/
#ifndef DCI_ #ifndef DCI_
#define DCI_ #define DCI_
@ -34,13 +42,6 @@
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/phch/ra.h" #include "srslte/phch/ra.h"
/**
* DCI message generation according to the formats, as specified in
* 36.212 Section 5.3.3.1
*
*/
#define DCI_MAX_BITS 57 #define DCI_MAX_BITS 57
typedef enum { typedef enum {

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: harq.h
*
* Description: Hybrid Automatic Repeat Request (HARQ)
*
* Reference:
*****************************************************************************/
#ifndef HARQ_ #ifndef HARQ_
#define HARQ_ #define HARQ_
@ -88,4 +95,4 @@ SRSLTE_API int srslte_harq_codeblock_segmentation(srslte_harq_cbsegm_t *s,
uint32_t tbs); uint32_t tbs);
#endif #endif

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: pbch.h
*
* Description: Physical broadcast channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.6
*****************************************************************************/
#ifndef PBCH_ #ifndef PBCH_
#define PBCH_ #define PBCH_
@ -69,7 +76,7 @@ typedef struct SRSLTE_API {
uint32_t frame_idx; uint32_t frame_idx;
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_soft_t demod; srslte_demod_soft_t demod;
srslte_sequence_t seq; srslte_sequence_t seq;
srslte_viterbi_t decoder; srslte_viterbi_t decoder;

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: pcfich.h
*
* Description: Physical control format indicator channel
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.7
*****************************************************************************/
#ifndef PCFICH_ #ifndef PCFICH_
#define PCFICH_ #define PCFICH_
@ -64,7 +72,7 @@ typedef struct SRSLTE_API {
float data_f[PCFICH_CFI_LEN]; float data_f[PCFICH_CFI_LEN];
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_soft_t demod; srslte_demod_soft_t demod;
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME]; srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
srslte_precoding_t precoding; srslte_precoding_t precoding;

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: pdcch.h
*
* Description: Physical downlink control channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.8
*****************************************************************************/
#ifndef PDCCH_ #ifndef PDCCH_
#define PDCCH_ #define PDCCH_
@ -69,7 +77,7 @@ typedef struct SRSLTE_API {
float *llr; float *llr;
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_soft_t demod; srslte_demod_soft_t demod;
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME]; srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
srslte_viterbi_t decoder; srslte_viterbi_t decoder;

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: pdsch.h
*
* Description: Physical downlink shared channel
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.4
*****************************************************************************/
#ifndef PDSCH_ #ifndef PDSCH_
#define PDSCH_ #define PDSCH_
@ -62,7 +69,7 @@ typedef struct SRSLTE_API {
void *e; void *e;
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod[4]; srslte_modem_table_t mod[4];
srslte_demod_soft_t demod; srslte_demod_soft_t demod;
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME]; srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
srslte_precoding_t precoding; srslte_precoding_t precoding;

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: phich.h
*
* Description: Physical Hybrid ARQ indicator channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.9
*****************************************************************************/
#ifndef PHICH_ #ifndef PHICH_
#define PHICH_ #define PHICH_
@ -76,7 +83,7 @@ typedef struct SRSLTE_API {
uint8_t data[SRSLTE_PHICH_NBITS]; uint8_t data[SRSLTE_PHICH_NBITS];
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_hard_t demod; srslte_demod_hard_t demod;
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME]; srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
srslte_precoding_t precoding; srslte_precoding_t precoding;

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: prach.h
*
* Description: Physical random access channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.7
*****************************************************************************/
#ifndef PRACH_ #ifndef PRACH_
#define PRACH_ #define PRACH_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: pucch.h
*
* Description: Physical uplink control channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.4
*****************************************************************************/
#ifndef PUCCH_ #ifndef PUCCH_
#define PUCCH_ #define PUCCH_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: pusch.h
*
* Description: Physical uplink shared channel.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.3
*****************************************************************************/
#ifndef PUSCH_ #ifndef PUSCH_
#define PUSCH_ #define PUSCH_
@ -81,7 +88,7 @@ typedef struct SRSLTE_API {
void *g; void *g;
/* tx & rx objects */ /* tx & rx objects */
srslte_srslte_modem_table_t mod[4]; srslte_modem_table_t mod[4];
srslte_demod_soft_t demod; srslte_demod_soft_t demod;
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME]; srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
srslte_sequence_t seq_type2_fo; srslte_sequence_t seq_type2_fo;

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: ra.h
*
* Description: Structures and utility functions for DL/UL resource allocation.
*
* Reference: 3GPP TS 36.213 version 10.0.1 Release 10
*****************************************************************************/
#ifndef RB_ALLOC_H_ #ifndef RB_ALLOC_H_
#define RB_ALLOC_H_ #define RB_ALLOC_H_
@ -34,10 +42,6 @@
#include "srslte/config.h" #include "srslte/config.h"
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
/** Structures and utility functions for DL/UL resource
* allocation.
*/
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
srslte_mod_t mod; srslte_mod_t mod;
int tbs; int tbs;

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: regs.h
*
* Description: Resource element mapping functions.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10
*****************************************************************************/
#ifndef _REGS_H_ #ifndef _REGS_H_
#define _REGS_H_ #define _REGS_H_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: sch.h
*
* Description: Common UL and DL shared channel encode/decode functions.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10
*****************************************************************************/
#ifndef SCH_ #ifndef SCH_
#define SCH_ #define SCH_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: uci.h
*
* Description: Uplink control information.
*
* Reference: 3GPP TS 36.212 version 10.0.0 Release 10 Sec. 5.2.3, 5.2.4
*****************************************************************************/
#ifndef UCI_ #ifndef UCI_
#define UCI_ #define UCI_
@ -88,4 +95,4 @@ SRSLTE_API int srslte_uci_encode_ri(uint8_t data,
uint8_t *q_bits); uint8_t *q_bits);
#endif #endif

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: decim.h
*
* Description: Integer linear decimation
*
* Reference:
*****************************************************************************/
#ifndef DECIM_H #ifndef DECIM_H
#define DECIM_H #define DECIM_H

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: interp.h
*
* Description: Linear and vector interpolation
*
* Reference:
*****************************************************************************/
#ifndef INTERP_H #ifndef INTERP_H
#define INTERP_H #define INTERP_H

@ -25,6 +25,16 @@
* *
*/ */
/******************************************************************************
* File: resample_arb.h
*
* Description: Arbitrary rate resampler using a polyphase filter bank
* implementation.
*
* Reference: Multirate Signal Processing for Communication Systems
* fredric j. harris
*****************************************************************************/
#ifndef RESAMPLE_ARB_ #ifndef RESAMPLE_ARB_
#define RESAMPLE_ARB_ #define RESAMPLE_ARB_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: scrambling.h
*
* Description: Generic scrambling functions used by UL and DL channels.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 5.3.1, 6.3.1
*****************************************************************************/
#ifndef SCRAMBLING_ #ifndef SCRAMBLING_
#define SCRAMBLING_ #define SCRAMBLING_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: cfo.h
*
* Description: Carrier frequency offset correction using complex exponentials.
*
* Reference:
*****************************************************************************/
#ifndef CFO_ #ifndef CFO_
#define CFO_ #define CFO_

@ -25,6 +25,23 @@
* *
*/ */
/******************************************************************************
* File: pss.h
*
* Description: Primary synchronization signal (PSS) generation and detection.
*
* The srslte_pss_synch_t object provides functions for fast
* computation of the crosscorrelation between the PSS and received
* signal and CFO estimation. Also, the function srslte_pss_synch_tperiodic()
* is designed to be called periodically every subframe, taking
* care of the correct data alignment with respect to the PSS sequence.
*
* The object is designed to work with signals sampled at 1.92 Mhz
* centered at the carrier frequency. Thus, downsampling is required
* if the signal is sampled at higher frequencies.
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.11.1
*****************************************************************************/
#ifndef PSS_ #ifndef PSS_
#define PSS_ #define PSS_
@ -50,17 +67,6 @@
#define SRSLTE_PSS_RETURN_PSR // If enabled returns peak to side-lobe ratio, otherwise returns absolute peak value #define SRSLTE_PSS_RETURN_PSR // If enabled returns peak to side-lobe ratio, otherwise returns absolute peak value
/**
* The srslte_pss_synch_t object provides functions for fast computation of the crosscorrelation
* between the PSS and received signal and CFO estimation. Also, the function srslte_pss_synch_tperiodic() is designed
* to be called periodically every subframe, taking care of the correct data alignment with respect
* to the PSS sequence.
*
* The object is designed to work with signals sampled at 1.92 Mhz centered at the carrier frequency.
* Thus, downsampling is required if the signal is sampled at higher frequencies.
*
*/
/* Low-level API */ /* Low-level API */
typedef struct SRSLTE_API { typedef struct SRSLTE_API {

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: sfo.h
*
* Description: Sampling frequency offset estimation.
*
* Reference:
*****************************************************************************/
#ifndef SFO_ #ifndef SFO_
#define SFO_ #define SFO_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: sss.h
*
* Description: Secondary synchronization signal (SSS) generation and detection.
*
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.11.2
*****************************************************************************/
#ifndef SSS_ #ifndef SSS_
#define SSS_ #define SSS_

@ -25,6 +25,23 @@
* *
*/ */
/******************************************************************************
* File: sync.h
*
* Description: Time and frequency synchronization using the PSS and SSS signals.
*
* The object is designed to work with signals sampled at 1.92 Mhz
* centered at the carrier frequency. Thus, downsampling is required
* if the signal is sampled at higher frequencies.
*
* Correlation peak is detected comparing the maximum at the output
* of the correlator with a threshold. The comparison accepts two
* modes: absolute value or peak-to-mean ratio, which are configured
* with the functions sync_pss_det_absolute() and sync_pss_det_peakmean().
*
*
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.11.1, 6.11.2
*****************************************************************************/
#ifndef SYNC_ #ifndef SYNC_
#define SYNC_ #define SYNC_
@ -40,18 +57,6 @@
#define SRSLTE_SYNC_FFT_SZ_MIN 64 #define SRSLTE_SYNC_FFT_SZ_MIN 64
#define SRSLTE_SYNC_FFT_SZ_MAX 2048 #define SRSLTE_SYNC_FFT_SZ_MAX 2048
/**
*
* This object performs time and frequency synchronization using the PSS and SSS signals.
*
* The object is designed to work with signals sampled at 1.92 Mhz centered at the carrier frequency.
* Thus, downsampling is required if the signal is sampled at higher frequencies.
*
* Correlation peak is detected comparing the maximum at the output of the correlator with a threshold.
* The comparison accepts two modes: absolute value or peak-to-mean ratio, which are configured with the
* functions sync_pss_det_absolute() and sync_pss_det_peakmean().
*/
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 SRSLTE_API { typedef struct SRSLTE_API {

@ -25,6 +25,22 @@
* *
*/ */
/******************************************************************************
* File: ue_cell_search.h
*
* Description: Wrapper for the ue_sync object.
*
* This object is a wrapper to the ue_sync object. It receives
* several synchronized frames and obtains the most common cell_id
* and cp length.
*
* The I/O stream device sampling frequency must be set to 1.92 MHz
* (SRSLTE_CS_SAMP_FREQ constant) before calling to
* srslte_ue_cellsearch_scan() functions.
*
* Reference:
*****************************************************************************/
#ifndef UE_CELLSEARCH_ #ifndef UE_CELLSEARCH_
#define UE_CELLSEARCH_ #define UE_CELLSEARCH_
@ -38,17 +54,6 @@
#include "srslte/phch/pbch.h" #include "srslte/phch/pbch.h"
#include "srslte/dft/ofdm.h" #include "srslte/dft/ofdm.h"
/************************************************************
*
* This object is a wrapper to the ue_sync object. It receives
* several synchronized frames and obtains the most common cell_id
* and cp length.
*
* The I/O stream device sampling frequency must be set to 1.92 MHz (SRSLTE_CS_SAMP_FREQ constant)
* before calling to srslte_ue_cellsearch_scan() functions.
*
************************************************************/
/** /**
* TODO: Check also peak offset * TODO: Check also peak offset
*/ */

@ -25,17 +25,20 @@
* *
*/ */
/******************************************************************************
* File: ue_dl.h
*
* Description: UE downlink object.
*
* This module is a frontend to all the downlink data and control
* channel processing modules.
*
* Reference:
*****************************************************************************/
#ifndef UEDL_H #ifndef UEDL_H
#define UEDL_H #define UEDL_H
/*******************************************************
*
* This module is a frontend to all the data and control channels processing
* modules.
********************************************************/
#include "srslte/ch_estimation/chest_dl.h" #include "srslte/ch_estimation/chest_dl.h"
#include "srslte/dft/ofdm.h" #include "srslte/dft/ofdm.h"
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
@ -126,4 +129,4 @@ SRSLTE_API void srslte_ue_dl_reset(srslte_ue_dl_t *q);
SRSLTE_API void srslte_ue_dl_set_rnti(srslte_ue_dl_t *q, SRSLTE_API void srslte_ue_dl_set_rnti(srslte_ue_dl_t *q,
uint16_t rnti); uint16_t rnti);
#endif #endif

@ -25,27 +25,28 @@
* *
*/ */
/******************************************************************************
* File: ue_mib.h
*
* Description: This object decodes the MIB from the PBCH of an LTE signal.
*
* The function srslte_ue_mib_decode() shall be called multiple
* times, each passing a number of samples multiple of 19200,
* sampled at 1.92 MHz (that is, 10 ms of samples).
*
* The function uses the sync_t object to find the PSS sequence and
* decode the PBCH to obtain the MIB.
*
* The function returns 0 until the MIB is decoded.
*
* See ue_cell_detect.c for an example.
*
* Reference:
*****************************************************************************/
#ifndef UE_MIB_ #ifndef UE_MIB_
#define UE_MIB_ #define UE_MIB_
/************************************************************
*
* This object decodes the MIB from the PBCH of an LTE signal.
*
* The function srslte_ue_mib_decode() shall be called multiple times,
* each passing a number of samples multiple of 19200, sampled at 1.92 MHz
* (that is, 10 ms of samples).
*
* The function uses the sync_t object to find the PSS sequence and
* decode the PBCH to obtain the MIB.
*
* The function returns 0 until the MIB is decoded.
*
* See ue_cell_detect.c for an example.
*
************************************************************/
#include <stdbool.h> #include <stdbool.h>
#include "srslte/config.h" #include "srslte/config.h"

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: ue_phy.h
*
* Description: Top-level class wrapper for PHY layer.
*
* Reference:
*****************************************************************************/
#include "srslte/srslte.h" #include "srslte/srslte.h"
#include "srslte/utils/queue.h" #include "srslte/utils/queue.h"
@ -158,4 +166,4 @@ private:
}; };
} }
#endif #endif

@ -25,6 +25,28 @@
* *
*/ */
/******************************************************************************
* File: ue_sync.h
*
* Description: This object automatically manages the cell synchronization
* procedure.
*
* The main function is srslte_ue_sync_get_buffer(), which returns
* a pointer to the aligned subframe of samples (before FFT). This
* function should be called regularly, returning every 1 ms.
* It reads from the USRP, aligns the samples to the subframe and
* performs time/freq synch.
*
* It is also possible to read the signal from a file using the
* init function srslte_ue_sync_init_file(). The sampling frequency
* is derived from the number of PRB.
*
* The function returns 1 when the signal is correctly acquired and
* the returned buffer is aligned with the subframe.
*
* Reference:
*****************************************************************************/
#ifndef UE_SYNC_ #ifndef UE_SYNC_
#define UE_SYNC_ #define UE_SYNC_
@ -39,22 +61,6 @@
#include "srslte/common/timestamp.h" #include "srslte/common/timestamp.h"
#include "srslte/io/filesource.h" #include "srslte/io/filesource.h"
/**************************************************************
*
* This object automatically manages the cell synchronization procedure.
*
* The main function is srslte_ue_sync_get_buffer(), which returns a pointer
* to the aligned subframe of samples (before FFT). This function
* should be called regularly, returning every 1 ms. It reads from the
* USRP, aligns the samples to the subframe and performs time/freq synch.
*
* It is also possible to read the signal from a file using the init function
* srslte_ue_sync_init_file(). The sampling frequency is derived from the number of PRB.
*
* The function returns 1 when the signal is correctly acquired and the
* returned buffer is aligned with the subframe.
*
*************************************************************/
typedef enum SRSLTE_API { SF_FIND, SF_TRACK} srslte_ue_sync_state_t; typedef enum SRSLTE_API { SF_FIND, SF_TRACK} srslte_ue_sync_state_t;

@ -25,16 +25,20 @@
* *
*/ */
/******************************************************************************
* File: ue_ul.h
*
* Description: UE uplink object.
*
* This module is a frontend to all the uplink data and control
* channel processing modules.
*
* Reference:
*****************************************************************************/
#ifndef UEUL_H #ifndef UEUL_H
#define UEUL_H #define UEUL_H
/*******************************************************
*
* This module is a frontend to all the data and control channels processing
* modules.
********************************************************/
#include "srslte/common/phy_common.h" #include "srslte/common/phy_common.h"
#include "srslte/ch_estimation/chest_dl.h" #include "srslte/ch_estimation/chest_dl.h"
#include "srslte/dft/ofdm.h" #include "srslte/dft/ofdm.h"
@ -119,4 +123,4 @@ SRSLTE_API void srslte_ue_ul_reset(srslte_ue_ul_t *q);
SRSLTE_API void srslte_ue_ul_set_rnti(srslte_ue_ul_t *q, SRSLTE_API void srslte_ue_ul_set_rnti(srslte_ue_ul_t *q,
uint16_t rnti); uint16_t rnti);
#endif #endif

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: bit.h
*
* Description: Bit-level utilities.
*
* Reference:
*****************************************************************************/
#ifndef BIT_ #ifndef BIT_
#define BIT_ #define BIT_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: cexptab.h
*
* Description: Utility module for generation of complex exponential tables.
*
* Reference:
*****************************************************************************/
#ifndef CEXPTAB_ #ifndef CEXPTAB_
#define CEXPTAB_ #define CEXPTAB_

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: convolution.h
*
* Description: Utility module for fast convolution using FFT.
*
* Reference:
*****************************************************************************/
#ifndef CONVOLUTION_H_ #ifndef CONVOLUTION_H_
#define CONVOLUTION_H_ #define CONVOLUTION_H_

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: debug.h
*
* Description: Debug output utilities.
*
* Reference:
*****************************************************************************/
#ifndef DEBUG_H #ifndef DEBUG_H
#define DEBUG_H #define DEBUG_H

@ -25,6 +25,14 @@
* *
*/ */
/******************************************************************************
* File: queue.h
*
* Description: Queue used at interface of PHY/MAC
*
* Reference:
*****************************************************************************/
#ifndef QUEUE_H #ifndef QUEUE_H
#define QUEUE_H #define QUEUE_H
@ -83,4 +91,4 @@ private:
} }
#endif #endif

@ -25,6 +25,13 @@
* *
*/ */
/******************************************************************************
* File: vector.h
*
* Description: Vector functions using SIMD instructions where possible.
*
* Reference:
*****************************************************************************/
#ifndef VECTOR_ #ifndef VECTOR_
#define VECTOR_ #define VECTOR_

@ -71,7 +71,7 @@ void srslte_demod_soft_free(srslte_demod_soft_t *q) {
bzero((void*)q,sizeof(srslte_demod_soft_t)); bzero((void*)q,sizeof(srslte_demod_soft_t));
} }
void srslte_demod_soft_table_set(srslte_demod_soft_t *q, srslte_srslte_modem_table_t *table) { void srslte_demod_soft_table_set(srslte_demod_soft_t *q, srslte_modem_table_t *table) {
q->table = table; q->table = table;
} }

@ -35,7 +35,7 @@
/** Low-level API */ /** Low-level API */
int srslte_mod_modulate(srslte_srslte_modem_table_t* q, uint8_t *bits, cf_t* symbols, uint32_t nbits) { int srslte_mod_modulate(srslte_modem_table_t* q, uint8_t *bits, cf_t* symbols, uint32_t nbits) {
uint32_t i,j,idx; uint32_t i,j,idx;
uint8_t *b_ptr=(uint8_t*) bits; uint8_t *b_ptr=(uint8_t*) bits;
j=0; j=0;

@ -38,26 +38,26 @@
#include "lte_tables.h" #include "lte_tables.h"
/** Internal functions */ /** Internal functions */
static int table_create(srslte_srslte_modem_table_t* q) { static int table_create(srslte_modem_table_t* q) {
q->symbol_table = malloc(q->nsymbols*sizeof(cf_t)); q->symbol_table = malloc(q->nsymbols*sizeof(cf_t));
return q->symbol_table==NULL; return q->symbol_table==NULL;
} }
void srslte_modem_table_init(srslte_srslte_modem_table_t* q) { void srslte_modem_table_init(srslte_modem_table_t* q) {
bzero((void*)q,sizeof(srslte_srslte_modem_table_t)); bzero((void*)q,sizeof(srslte_modem_table_t));
} }
void srslte_modem_table_free(srslte_srslte_modem_table_t* q) { void srslte_modem_table_free(srslte_modem_table_t* q) {
if (q->symbol_table) { if (q->symbol_table) {
free(q->symbol_table); free(q->symbol_table);
} }
bzero(q, sizeof(srslte_srslte_modem_table_t)); bzero(q, sizeof(srslte_modem_table_t));
} }
void srslte_modem_table_reset(srslte_srslte_modem_table_t* q) { void srslte_modem_table_reset(srslte_modem_table_t* q) {
srslte_modem_table_free(q); srslte_modem_table_free(q);
srslte_modem_table_init(q); srslte_modem_table_init(q);
} }
int srslte_modem_table_set(srslte_srslte_modem_table_t* q, cf_t* table, srslte_soft_table_t *soft_table, uint32_t nsymbols, uint32_t nbits_x_symbol) { int srslte_modem_table_set(srslte_modem_table_t* q, cf_t* table, srslte_soft_table_t *soft_table, uint32_t nsymbols, uint32_t nbits_x_symbol) {
if (q->nsymbols) { if (q->nsymbols) {
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
@ -71,7 +71,7 @@ int srslte_modem_table_set(srslte_srslte_modem_table_t* q, cf_t* table, srslte_s
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }
int srslte_modem_table_lte(srslte_srslte_modem_table_t* q, srslte_mod_t modulation, bool compute_soft_demod) { int srslte_modem_table_lte(srslte_modem_table_t* q, srslte_mod_t modulation, bool compute_soft_demod) {
switch(modulation) { switch(modulation) {
case SRSLTE_MOD_BPSK: case SRSLTE_MOD_BPSK:
q->nbits_x_symbol = 1; q->nbits_x_symbol = 1;

@ -94,7 +94,7 @@ void parse_args(int argc, char **argv) {
int main(int argc, char **argv) { int main(int argc, char **argv) {
int i; int i;
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_hard_t demod_hard; srslte_demod_hard_t demod_hard;
srslte_demod_soft_t demod_soft; srslte_demod_soft_t demod_soft;
uint8_t *input, *output; uint8_t *input, *output;

@ -108,7 +108,7 @@ float mse_threshold() {
int main(int argc, char **argv) { int main(int argc, char **argv) {
int i; int i;
srslte_srslte_modem_table_t mod; srslte_modem_table_t mod;
srslte_demod_soft_t demod_soft; srslte_demod_soft_t demod_soft;
uint8_t *input, *output; uint8_t *input, *output;
cf_t *symbols; cf_t *symbols;

Loading…
Cancel
Save