liblte_phy.h 38.9 KB
Newer Older
1 2
/*******************************************************************************

3
    Copyright 2012-2013 Ben Wojtowicz
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program 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 Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

*******************************************************************************

    File: liblte_phy.h

    Description: Contains all the definitions for the LTE Physical Layer
                 library.

    Revision History
    ----------    -------------    --------------------------------------------
    02/26/2012    Ben Wojtowicz    Created file.
Ben Wojtowicz's avatar
Ben Wojtowicz committed
28
    04/21/2012    Ben Wojtowicz    Added Turbo encode/decode and PDSCH decode
29 30 31
    05/28/2012    Ben Wojtowicz    Rearranged to match spec order, added
                                   initial transmit functionality, and fixed
                                   a bug related to PDCCH sizes.
32 33
    06/11/2012    Ben Wojtowicz    Enabled fftw input, output, and plan in
                                   phy_struct.
34 35 36
    10/06/2012    Ben Wojtowicz    Added random access and paging PDCCH
                                   decoding, soft turbo decoding, and PDSCH
                                   decoding per allocation.
37 38 39 40
    11/10/2012    Ben Wojtowicz    Added TBS, MCS, and N_prb calculations for
                                   SI PDSCH messages, added more sample defines,
                                   and re-factored the coarse timing and freq
                                   search to find more than 1 eNB.
41
    12/01/2012    Ben Wojtowicz    Added ability to preconfigure CRS.
42 43
    12/26/2012    Ben Wojtowicz    Started supporting N_sc_rb for normal and
                                   extended CP and fixed several FIXMEs.
44 45 46
    03/03/2013    Ben Wojtowicz    Added support for multiple sampling rates,
                                   pre-permutation of PDCCH encoding, and
                                   integer frequency offset detection.
47
    03/17/2013    Ben Wojtowicz    Moved to single float version of fftw.
48 49
    07/21/2013    Ben Wojtowicz    Added routines for determining TBS, MCS,
                                   N_prb, and N_cce.
50 51 52
    08/26/2013    Ben Wojtowicz    Added PRACH generation and detection support
                                   and changed ambiguous routines/variables to
                                   be non-ambiguous.
53 54
    09/16/2013    Ben Wojtowicz    Implemented routines for determine TBS, MCS,
                                   N_prb, and N_cce.
55 56 57 58 59 60 61 62 63 64 65

*******************************************************************************/

#ifndef __LIBLTE_PHY_H__
#define __LIBLTE_PHY_H__

/*******************************************************************************
                              INCLUDES
*******************************************************************************/

#include "liblte_common.h"
Ben Wojtowicz's avatar
Ben Wojtowicz committed
66
#include "liblte_rrc.h"
67 68 69 70 71 72
#include "fftw3.h"

/*******************************************************************************
                              DEFINES
*******************************************************************************/

73 74 75 76 77 78
// FFT sizes
#define LIBLTE_PHY_FFT_SIZE_1_92MHZ  128
#define LIBLTE_PHY_FFT_SIZE_3_84MHZ  256
#define LIBLTE_PHY_FFT_SIZE_7_68MHZ  512
#define LIBLTE_PHY_FFT_SIZE_15_36MHZ 1024
#define LIBLTE_PHY_FFT_SIZE_30_72MHZ 2048
79 80 81 82 83 84 85 86 87 88

// N_rb_dl
#define LIBLTE_PHY_N_RB_DL_1_4MHZ 6
#define LIBLTE_PHY_N_RB_DL_3MHZ   15
#define LIBLTE_PHY_N_RB_DL_5MHZ   25
#define LIBLTE_PHY_N_RB_DL_10MHZ  50
#define LIBLTE_PHY_N_RB_DL_15MHZ  75
#define LIBLTE_PHY_N_RB_DL_20MHZ  100
#define LIBLTE_PHY_N_RB_DL_MAX    110

89 90 91 92 93 94 95 96 97
// N_rb_ul
#define LIBLTE_PHY_N_RB_UL_1_4MHZ 6
#define LIBLTE_PHY_N_RB_UL_3MHZ   15
#define LIBLTE_PHY_N_RB_UL_5MHZ   25
#define LIBLTE_PHY_N_RB_UL_10MHZ  50
#define LIBLTE_PHY_N_RB_UL_15MHZ  75
#define LIBLTE_PHY_N_RB_UL_20MHZ  100
#define LIBLTE_PHY_N_RB_UL_MAX    110

98 99 100 101 102 103 104 105
// N_sc_rb
#define LIBLTE_PHY_N_SC_RB_NORMAL_CP 12
// FIXME: Add Extended CP

// N_ant
#define LIBLTE_PHY_N_ANT_MAX 4

// Symbol, CP, Slot, Subframe, and Frame timing
106
// Generic
107
#define LIBLTE_PHY_SFN_MAX           1023
108 109
#define LIBLTE_PHY_N_SLOTS_PER_SUBFR 2
#define LIBLTE_PHY_N_SUBFR_PER_FRAME 10
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
// 20MHz and 15MHz bandwidths
#define LIBLTE_PHY_N_SAMPS_PER_SYMB_30_72MHZ  2048
#define LIBLTE_PHY_N_SAMPS_CP_L_0_30_72MHZ    160
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE_30_72MHZ 144
#define LIBLTE_PHY_N_SAMPS_PER_SLOT_30_72MHZ  15360
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR_30_72MHZ (LIBLTE_PHY_N_SAMPS_PER_SLOT_30_72MHZ*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SAMPS_PER_FRAME_30_72MHZ (LIBLTE_PHY_N_SAMPS_PER_SUBFR_30_72MHZ*LIBLTE_PHY_N_SUBFR_PER_FRAME)
// 10MHz bandwidth
#define LIBLTE_PHY_N_SAMPS_PER_SYMB_15_36MHZ  1024
#define LIBLTE_PHY_N_SAMPS_CP_L_0_15_36MHZ    80
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE_15_36MHZ 72
#define LIBLTE_PHY_N_SAMPS_PER_SLOT_15_36MHZ  7680
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR_15_36MHZ (LIBLTE_PHY_N_SAMPS_PER_SLOT_15_36MHZ*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SAMPS_PER_FRAME_15_36MHZ (LIBLTE_PHY_N_SAMPS_PER_SUBFR_15_36MHZ*LIBLTE_PHY_N_SUBFR_PER_FRAME)
// 5MHz bandwidth
#define LIBLTE_PHY_N_SAMPS_PER_SYMB_7_68MHZ  512
#define LIBLTE_PHY_N_SAMPS_CP_L_0_7_68MHZ    40
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE_7_68MHZ 36
#define LIBLTE_PHY_N_SAMPS_PER_SLOT_7_68MHZ  3840
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR_7_68MHZ (LIBLTE_PHY_N_SAMPS_PER_SLOT_7_68MHZ*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SAMPS_PER_FRAME_7_68MHZ (LIBLTE_PHY_N_SAMPS_PER_SUBFR_7_68MHZ*LIBLTE_PHY_N_SUBFR_PER_FRAME)
// 3MHz bandwidth
#define LIBLTE_PHY_N_SAMPS_PER_SYMB_3_84MHZ  256
#define LIBLTE_PHY_N_SAMPS_CP_L_0_3_84MHZ    20
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE_3_84MHZ 18
#define LIBLTE_PHY_N_SAMPS_PER_SLOT_3_84MHZ  1920
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR_3_84MHZ (LIBLTE_PHY_N_SAMPS_PER_SLOT_3_84MHZ*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SAMPS_PER_FRAME_3_84MHZ (LIBLTE_PHY_N_SAMPS_PER_SUBFR_3_84MHZ*LIBLTE_PHY_N_SUBFR_PER_FRAME)
// 1.4MHz bandwidth
#define LIBLTE_PHY_N_SAMPS_PER_SYMB_1_92MHZ  128
#define LIBLTE_PHY_N_SAMPS_CP_L_0_1_92MHZ    10
#define LIBLTE_PHY_N_SAMPS_CP_L_ELSE_1_92MHZ 9
#define LIBLTE_PHY_N_SAMPS_PER_SLOT_1_92MHZ  960
#define LIBLTE_PHY_N_SAMPS_PER_SUBFR_1_92MHZ (LIBLTE_PHY_N_SAMPS_PER_SLOT_1_92MHZ*LIBLTE_PHY_N_SLOTS_PER_SUBFR)
#define LIBLTE_PHY_N_SAMPS_PER_FRAME_1_92MHZ (LIBLTE_PHY_N_SAMPS_PER_SUBFR_1_92MHZ*LIBLTE_PHY_N_SUBFR_PER_FRAME)
145 146 147 148 149

/*******************************************************************************
                              TYPEDEFS
*******************************************************************************/

150 151 152 153 154 155 156 157
typedef enum{
    LIBLTE_PHY_FS_30_72MHZ = 0, // 20MHz and 15MHz bandwidths
    LIBLTE_PHY_FS_15_36MHZ,     // 10MHz bandwidth
    LIBLTE_PHY_FS_7_68MHZ,      // 5MHz bandwidth
    LIBLTE_PHY_FS_3_84MHZ,      // 3MHz bandwidth
    LIBLTE_PHY_FS_1_92MHZ,      // 1.4MHz bandwidth
}LIBLTE_PHY_FS_ENUM;

Ben Wojtowicz's avatar
Ben Wojtowicz committed
158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
typedef enum{
    LIBLTE_PHY_PRE_CODER_TYPE_TX_DIVERSITY = 0,
    LIBLTE_PHY_PRE_CODER_TYPE_SPATIAL_MULTIPLEXING,
}LIBLTE_PHY_PRE_CODER_TYPE_ENUM;

typedef enum{
    LIBLTE_PHY_MODULATION_TYPE_BPSK = 0,
    LIBLTE_PHY_MODULATION_TYPE_QPSK,
    LIBLTE_PHY_MODULATION_TYPE_16QAM,
    LIBLTE_PHY_MODULATION_TYPE_64QAM,
}LIBLTE_PHY_MODULATION_TYPE_ENUM;

typedef enum{
    LIBLTE_PHY_CHAN_TYPE_DLSCH = 0,
    LIBLTE_PHY_CHAN_TYPE_PCH,
}LIBLTE_PHY_CHAN_TYPE_ENUM;

175
typedef struct{
176 177 178 179 180 181 182 183 184 185 186
    // Receive
    float rx_symb_re[16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float rx_symb_im[16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float rx_ce_re[LIBLTE_PHY_N_ANT_MAX][16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float rx_ce_im[LIBLTE_PHY_N_ANT_MAX][16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];

    // Transmit
    float tx_symb_re[LIBLTE_PHY_N_ANT_MAX][16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float tx_symb_im[LIBLTE_PHY_N_ANT_MAX][16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];

    // Common
Ben Wojtowicz's avatar
Ben Wojtowicz committed
187 188
    uint32 num;
}LIBLTE_PHY_SUBFRAME_STRUCT;
189 190 191 192 193 194 195 196 197 198 199 200 201

/*******************************************************************************
                              DECLARATIONS
*******************************************************************************/

/*********************************************************************
    Name: liblte_phy_init

    Description: Initializes the LTE Physical Layer library.

    Document Reference: N/A
*********************************************************************/
// Defines
202 203 204
#define LIBLTE_PHY_INIT_N_ID_CELL_UNKNOWN 0xFFFF
// Enums
// Structs
205
typedef struct{
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234
    // PRACH
    fftwf_complex *prach_dft_in;
    fftwf_complex *prach_dft_out;
    fftwf_complex *prach_fft_in;
    fftwf_complex *prach_fft_out;
    fftwf_plan     prach_dft_plan;
    fftwf_plan     prach_ifft_plan;
    fftwf_plan     prach_fft_plan;
    fftwf_plan     prach_idft_plan;
    float          prach_x_u_v_re[64][839];
    float          prach_x_u_v_im[64][839];
    float          prach_x_u_re[64][839];
    float          prach_x_u_im[64][839];
    float          prach_x_u_fft_re[64][839];
    float          prach_x_u_fft_im[64][839];
    float          prach_x_hat_re[839];
    float          prach_x_hat_im[839];
    uint32         prach_zczc;
    uint32         prach_preamble_format;
    uint32         prach_root_seq_idx;
    uint32         prach_N_x_u;
    uint32         prach_N_zc;
    uint32         prach_T_fft;
    uint32         prach_T_seq;
    uint32         prach_T_cp;
    uint32         prach_delta_f_RA;
    uint32         prach_phi;
    bool           prach_hs_flag;

235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
    // PDSCH
    float  pdsch_y_est_re[5000];
    float  pdsch_y_est_im[5000];
    float  pdsch_c_est_re[LIBLTE_PHY_N_ANT_MAX][5000];
    float  pdsch_c_est_im[LIBLTE_PHY_N_ANT_MAX][5000];
    float  pdsch_y_re[LIBLTE_PHY_N_ANT_MAX][5000];
    float  pdsch_y_im[LIBLTE_PHY_N_ANT_MAX][5000];
    float  pdsch_x_re[10000];
    float  pdsch_x_im[10000];
    float  pdsch_d_re[10000];
    float  pdsch_d_im[10000];
    float  pdsch_descramb_bits[10000];
    uint32 pdsch_c[10000];
    uint8  pdsch_encode_bits[10000];
    uint8  pdsch_scramb_bits[10000];
    int8   pdsch_soft_bits[10000];
251

Ben Wojtowicz's avatar
Ben Wojtowicz committed
252
    // BCH
253 254
    float  bch_y_est_re[240];
    float  bch_y_est_im[240];
255 256 257 258
    float  bch_c_est_re[LIBLTE_PHY_N_ANT_MAX][240];
    float  bch_c_est_im[LIBLTE_PHY_N_ANT_MAX][240];
    float  bch_y_re[LIBLTE_PHY_N_ANT_MAX][240];
    float  bch_y_im[LIBLTE_PHY_N_ANT_MAX][240];
259 260 261 262 263
    float  bch_x_re[480];
    float  bch_x_im[480];
    float  bch_d_re[480];
    float  bch_d_im[480];
    float  bch_descramb_bits[1920];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
264
    float  bch_rx_d_bits[1920];
265
    uint32 bch_c[1920];
266
    uint32 bch_N_bits;
Ben Wojtowicz's avatar
Ben Wojtowicz committed
267 268
    uint8  bch_tx_d_bits[1920];
    uint8  bch_c_bits[40];
269 270
    uint8  bch_encode_bits[1920];
    uint8  bch_scramb_bits[480];
271 272
    int8   bch_soft_bits[480];

Ben Wojtowicz's avatar
Ben Wojtowicz committed
273
    // PDCCH
274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
    // FIXME: Sizes
    float  pdcch_reg_y_est_re[550][4];
    float  pdcch_reg_y_est_im[550][4];
    float  pdcch_reg_c_est_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_reg_c_est_im[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_shift_y_est_re[550][4];
    float  pdcch_shift_y_est_im[550][4];
    float  pdcch_shift_c_est_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_shift_c_est_im[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_perm_y_est_re[550][4];
    float  pdcch_perm_y_est_im[550][4];
    float  pdcch_perm_c_est_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_perm_c_est_im[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_cce_y_est_re[50][576];
    float  pdcch_cce_y_est_im[50][576];
    float  pdcch_cce_c_est_re[LIBLTE_PHY_N_ANT_MAX][50][576];
    float  pdcch_cce_c_est_im[LIBLTE_PHY_N_ANT_MAX][50][576];
    float  pdcch_y_est_re[576];
    float  pdcch_y_est_im[576];
    float  pdcch_c_est_re[LIBLTE_PHY_N_ANT_MAX][576];
    float  pdcch_c_est_im[LIBLTE_PHY_N_ANT_MAX][576];
    float  pdcch_y_re[LIBLTE_PHY_N_ANT_MAX][576];
    float  pdcch_y_im[LIBLTE_PHY_N_ANT_MAX][576];
    float  pdcch_cce_re[LIBLTE_PHY_N_ANT_MAX][50][576];
    float  pdcch_cce_im[LIBLTE_PHY_N_ANT_MAX][50][576];
    float  pdcch_reg_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_reg_im[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_perm_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_perm_im[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_shift_re[LIBLTE_PHY_N_ANT_MAX][550][4];
    float  pdcch_shift_im[LIBLTE_PHY_N_ANT_MAX][550][4];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
305 306 307 308 309 310
    float  pdcch_x_re[576];
    float  pdcch_x_im[576];
    float  pdcch_d_re[576];
    float  pdcch_d_im[576];
    float  pdcch_descramb_bits[576];
    uint32 pdcch_c[1152];
311
    uint32 pdcch_permute_map[550][550];
312 313
    uint16 pdcch_reg_vec[550];
    uint16 pdcch_reg_perm_vec[550];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
314
    uint8  pdcch_dci[100]; // FIXME: This is a guess at worst case
315 316
    uint8  pdcch_encode_bits[576];
    uint8  pdcch_scramb_bits[576];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
317 318
    int8   pdcch_soft_bits[576];

319 320 321
    // CRS & Channel Estimate
    float crs_re[14][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float crs_im[14][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
322 323 324 325
    float dl_ce_crs_re[16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float dl_ce_crs_im[16][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float dl_ce_mag[5][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float dl_ce_ang[5][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
326

327
    // PSS
328 329
    float pss_mod_re_n1[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float pss_mod_im_n1[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
330 331
    float pss_mod_re[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float pss_mod_im[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
332 333
    float pss_mod_re_p1[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float pss_mod_im_p1[3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
334

335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
    // SSS
    float sss_mod_re_0[168][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float sss_mod_im_0[168][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float sss_mod_re_5[168][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float sss_mod_im_5[168][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float sss_re_0[63];
    float sss_im_0[63];
    float sss_re_5[63];
    float sss_im_5[63];
    uint8 sss_x_s_tilda[31];
    uint8 sss_x_c_tilda[31];
    uint8 sss_x_z_tilda[31];
    int8  sss_s_tilda[31];
    int8  sss_c_tilda[31];
    int8  sss_z_tilda[31];
    int8  sss_s0_m0[31];
    int8  sss_s1_m1[31];
    int8  sss_c0[31];
    int8  sss_c1[31];
    int8  sss_z1_m0[31];
    int8  sss_z1_m1[31];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
356

357
    // Timing
358
    float dl_timing_abs_corr[LIBLTE_PHY_N_SAMPS_PER_SLOT_30_72MHZ*2];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
359

360 361 362 363 364
    // CRS Storage
    float  crs_re_storage[20][3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float  crs_im_storage[20][3][LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    uint32 N_id_cell_crs;

365
    // Samples to Symbols & Symbols to Samples
366 367 368 369
    fftwf_complex *dl_s2s_in;
    fftwf_complex *dl_s2s_out;
    fftwf_plan     dl_symbs_to_samps_plan;
    fftwf_plan     dl_samps_to_symbs_plan;
Ben Wojtowicz's avatar
Ben Wojtowicz committed
370

371 372 373 374
    // Viterbi decode
    float vd_path_metric[128][2048];
    float vd_br_metric[128][2];
    float vd_p_metric[128][2];
375 376
    float vd_br_weight[128][2];
    float vd_w_metric[128][2048];
377
    float vd_tb_state[2048];
378
    float vd_tb_weight[2048];
379
    uint8 vd_st_output[128][2][3];
Ben Wojtowicz's avatar
Ben Wojtowicz committed
380 381 382 383 384 385 386 387 388

    // Turbo encode
    uint8 te_z[6144];
    uint8 te_fb1[6144];
    uint8 te_c_prime[6144];
    uint8 te_z_prime[6144];
    uint8 te_x_prime[6144];

    // Turbo decode
389 390 391 392 393 394 395 396 397 398 399 400 401 402
    int8 td_vitdec_in[18432];
    int8 td_in_int[6144];
    int8 td_in_calc_1[6144];
    int8 td_in_calc_2[6144];
    int8 td_in_calc_3[6144];
    int8 td_in_int_1[6144];
    int8 td_int_calc_1[6144];
    int8 td_int_calc_2[6144];
    int8 td_in_act_1[6144];
    int8 td_fb_1[6144];
    int8 td_int_act_1[6144];
    int8 td_int_act_2[6144];
    int8 td_fb_int_1[6144];
    int8 td_fb_int_2[6144];
403

404 405 406 407 408 409
    // Rate Match Turbo
    uint8 rmt_tmp[6144];
    uint8 rmt_sb_mat[32][192];
    uint8 rmt_sb_perm_mat[32][192];
    uint8 rmt_y[6144];
    uint8 rmt_w[18432];
410

411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
    // Rate Unmatch Turbo
    float rut_tmp[6144];
    float rut_sb_mat[32][192];
    float rut_sb_perm_mat[32][192];
    float rut_y[6144];
    float rut_w_dum[18432];
    float rut_w[18432];
    float rut_v[3][6144];

    // Rate Match Conv
    uint8 rmc_tmp[1024];
    uint8 rmc_sb_mat[32][32];
    uint8 rmc_sb_perm_mat[32][32];
    uint8 rmc_w[3*1024];

    // Rate Unatch Conv
    float ruc_tmp[1024];
    float ruc_sb_mat[32][32];
    float ruc_sb_perm_mat[32][32];
    float ruc_w_dum[3*1024];
    float ruc_w[3*1024];
    float ruc_v[3][1024];

    // DLSCH
    // FIXME: Sizes
    float  dlsch_rx_d_bits[75376];
    float  dlsch_rx_e_bits[5][18432];
    uint32 dlsch_N_c_bits[5];
    uint32 dlsch_N_e_bits[5];
    uint8  dlsch_b_bits[30720];
    uint8  dlsch_c_bits[5][6144];
    uint8  dlsch_tx_d_bits[75376];
    uint8  dlsch_tx_e_bits[5][18432];

    // DCI
    float dci_rx_d_bits[576];
    uint8 dci_tx_d_bits[576];
    uint8 dci_c_bits[192];
449 450

    // Generic
451 452 453 454 455 456 457 458 459 460
    float  rx_symb_re[LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    float  rx_symb_im[LIBLTE_PHY_N_RB_DL_20MHZ*LIBLTE_PHY_N_SC_RB_NORMAL_CP];
    uint32 fs;
    uint32 N_samps_per_symb;
    uint32 N_samps_cp_l_0;
    uint32 N_samps_cp_l_else;
    uint32 N_samps_per_slot;
    uint32 N_samps_per_subfr;
    uint32 N_samps_per_frame;
    uint32 N_rb_dl;
461
    uint32 N_rb_ul;
462 463 464
    uint32 N_sc_rb;
    uint32 FFT_pad_size;
    uint32 FFT_size;
465 466
}LIBLTE_PHY_STRUCT;
// Functions
467 468 469 470 471 472
LIBLTE_ERROR_ENUM liblte_phy_init(LIBLTE_PHY_STRUCT  **phy_struct,
                                  LIBLTE_PHY_FS_ENUM   fs,
                                  uint16               N_id_cell,
                                  uint8                N_ant,
                                  uint32               N_rb_dl,
                                  uint32               N_sc_rb,
473 474 475 476 477
                                  float                phich_res,
                                  uint32               prach_root_seq_idx,
                                  uint32               prach_preamble_format,
                                  uint32               prach_zczc,
                                  bool                 prach_hs_flag);
478 479 480 481 482 483 484 485 486 487 488 489 490 491

/*********************************************************************
    Name: liblte_phy_cleanup

    Description: Cleans up the LTE Physical Layer library.

    Document Reference: N/A
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_cleanup(LIBLTE_PHY_STRUCT *phy_struct);

492 493 494 495 496 497 498 499 500 501 502 503 504 505
/*********************************************************************
    Name: liblte_phy_update_n_rb_dl

    Description: Updates N_rb_dl and all associated variables.

    Document Reference: N/A
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_update_n_rb_dl(LIBLTE_PHY_STRUCT *phy_struct,
                                            uint32             N_rb_dl);

506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541
/*********************************************************************
    Name: liblte_phy_generate_prach

    Description: Generates the baseband signal for a PRACH

    Document Reference: 3GPP TS 36.211 v10.1.0 section 5.7.3
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_generate_prach(LIBLTE_PHY_STRUCT *phy_struct,
                                            uint32             preamble_idx,
                                            uint32             freq_offset,
                                            float             *samps_re,
                                            float             *samps_im);

/*********************************************************************
    Name: liblte_phy_detect_prach

    Description: Detects PRACHs from baseband I/Q

    Document Reference: 3GPP TS 36.211 v10.1.0 section 5.7.2 and 5.7.3
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_detect_prach(LIBLTE_PHY_STRUCT *phy_struct,
                                          float             *samps_re,
                                          float             *samps_im,
                                          uint32             freq_offset,
                                          uint32            *N_det_pre,
                                          uint32            *det_pre,
                                          uint32            *det_ta);

542
/*********************************************************************
543
    Name: liblte_phy_pdsch_channel_encode
544

545 546
    Description: Encodes and modulates the Physical Downlink Shared
                 Channel
547

548
    Document Reference: 3GPP TS 36.211 v10.1.0 sections 6.3 and 6.4
549 550
*********************************************************************/
// Defines
551
#define LIBLTE_PHY_PDCCH_MAX_ALLOC 10
552 553
// Enums
// Structs
554
typedef struct{
555
    LIBLTE_MSG_STRUCT               msg;
556 557 558 559 560 561 562 563 564 565 566
    LIBLTE_PHY_PRE_CODER_TYPE_ENUM  pre_coder_type;
    LIBLTE_PHY_MODULATION_TYPE_ENUM mod_type;
    uint32                          tbs;
    uint32                          rv_idx;
    uint32                          N_prb;
    uint32                          prb[LIBLTE_PHY_N_RB_DL_MAX];
    uint32                          N_codewords;
    uint32                          tx_mode;
    uint16                          rnti;
    uint8                           mcs;
}LIBLTE_PHY_ALLOCATION_STRUCT;
567

568 569 570 571 572
typedef struct{
    LIBLTE_PHY_ALLOCATION_STRUCT alloc[LIBLTE_PHY_PDCCH_MAX_ALLOC];
    uint32                       N_symbs;
    uint32                       N_alloc;
}LIBLTE_PHY_PDCCH_STRUCT;
573
// Functions
574 575 576 577 578
LIBLTE_ERROR_ENUM liblte_phy_pdsch_channel_encode(LIBLTE_PHY_STRUCT          *phy_struct,
                                                  LIBLTE_PHY_PDCCH_STRUCT    *pdcch,
                                                  uint32                      N_id_cell,
                                                  uint8                       N_ant,
                                                  LIBLTE_PHY_SUBFRAME_STRUCT *subframe);
579 580

/*********************************************************************
581
    Name: liblte_phy_pdsch_channel_decode
582

583 584
    Description: Demodulates and decodes the Physical Downlink Shared
                 Channel
585

586
    Document Reference: 3GPP TS 36.211 v10.1.0 sections 6.3 and 6.4
587 588 589 590 591
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
592 593 594 595 596 597 598 599
LIBLTE_ERROR_ENUM liblte_phy_pdsch_channel_decode(LIBLTE_PHY_STRUCT            *phy_struct,
                                                  LIBLTE_PHY_SUBFRAME_STRUCT   *subframe,
                                                  LIBLTE_PHY_ALLOCATION_STRUCT *alloc,
                                                  uint32                        N_pdcch_symbs,
                                                  uint32                        N_id_cell,
                                                  uint8                         N_ant,
                                                  uint8                        *out_bits,
                                                  uint32                       *N_out_bits);
600 601

/*********************************************************************
602
    Name: liblte_phy_bch_channel_encode
603

604 605
    Description: Encodes and modulates the Physical Broadcast
                 Channel
606

607
    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.6
608 609 610 611 612
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
613 614 615 616 617 618 619
LIBLTE_ERROR_ENUM liblte_phy_bch_channel_encode(LIBLTE_PHY_STRUCT          *phy_struct,
                                                uint8                      *in_bits,
                                                uint32                      N_in_bits,
                                                uint32                      N_id_cell,
                                                uint8                       N_ant,
                                                LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                                uint32                      sfn);
620 621 622 623 624 625 626

/*********************************************************************
    Name: liblte_phy_bch_channel_decode

    Description: Demodulates and decodes the Physical Broadcast
                 Channel

Ben Wojtowicz's avatar
Ben Wojtowicz committed
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641
    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.6
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_bch_channel_decode(LIBLTE_PHY_STRUCT          *phy_struct,
                                                LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                                uint32                      N_id_cell,
                                                uint8                      *N_ant,
                                                uint8                      *out_bits,
                                                uint32                     *N_out_bits,
                                                uint8                      *offset);

/*********************************************************************
642
    Name: liblte_phy_pdcch_channel_encode
Ben Wojtowicz's avatar
Ben Wojtowicz committed
643

644 645
    Description: Encodes and modulates all of the Physical Downlink
                 Control Channels (PCFICH, PHICH, and PDCCH)
Ben Wojtowicz's avatar
Ben Wojtowicz committed
646 647 648

    Document Reference: 3GPP TS 36.211 v10.1.0 sections 6.7, 6.8, and
                        6.9
649
                        3GPP TS 36.212 v10.1.0 section 5.1.4.2.1
Ben Wojtowicz's avatar
Ben Wojtowicz committed
650 651 652 653 654 655 656 657 658 659 660 661 662
*********************************************************************/
// Defines
// Enums
typedef enum{
    LIBLTE_PHY_DCI_CA_NOT_PRESENT = 0,
    LIBLTE_PHY_DCI_CA_PRESENT,
}LIBLTE_PHY_DCI_CA_PRESENCE_ENUM;
// Structs
typedef struct{
    uint32 cfi;
}LIBLTE_PHY_PCFICH_STRUCT;

typedef struct{
663
    // FIXME: Place holder
Ben Wojtowicz's avatar
Ben Wojtowicz committed
664
}LIBLTE_PHY_PHICH_STRUCT;
665 666 667 668 669 670 671 672 673 674
// Functions
LIBLTE_ERROR_ENUM liblte_phy_pdcch_channel_encode(LIBLTE_PHY_STRUCT              *phy_struct,
                                                  LIBLTE_PHY_PCFICH_STRUCT       *pcfich,
                                                  LIBLTE_PHY_PHICH_STRUCT        *phich,
                                                  LIBLTE_PHY_PDCCH_STRUCT        *pdcch,
                                                  uint32                          N_id_cell,
                                                  uint8                           N_ant,
                                                  float                           phich_res,
                                                  LIBLTE_RRC_PHICH_DURATION_ENUM  phich_dur,
                                                  LIBLTE_PHY_SUBFRAME_STRUCT     *subframe);
Ben Wojtowicz's avatar
Ben Wojtowicz committed
675

676 677
/*********************************************************************
    Name: liblte_phy_pdcch_channel_decode
Ben Wojtowicz's avatar
Ben Wojtowicz committed
678

679 680 681 682 683 684 685 686 687 688
    Description: Demodulates and decodes all of the Physical Downlink
                 Control Channels (PCFICH, PHICH, and PDCCH)

    Document Reference: 3GPP TS 36.211 v10.1.0 sections 6.7, 6.8, and
                        6.9
                        3GPP TS 36.212 v10.1.0 section 5.1.4.2.1
*********************************************************************/
// Defines
// Enums
// Structs
Ben Wojtowicz's avatar
Ben Wojtowicz committed
689 690 691 692 693 694 695 696 697 698 699 700
// Functions
LIBLTE_ERROR_ENUM liblte_phy_pdcch_channel_decode(LIBLTE_PHY_STRUCT              *phy_struct,
                                                  LIBLTE_PHY_SUBFRAME_STRUCT     *subframe,
                                                  uint32                          N_id_cell,
                                                  uint8                           N_ant,
                                                  float                           phich_res,
                                                  LIBLTE_RRC_PHICH_DURATION_ENUM  phich_dur,
                                                  LIBLTE_PHY_PCFICH_STRUCT       *pcfich,
                                                  LIBLTE_PHY_PHICH_STRUCT        *phich,
                                                  LIBLTE_PHY_PDCCH_STRUCT        *pdcch);

/*********************************************************************
701
    Name: liblte_phy_map_crs
Ben Wojtowicz's avatar
Ben Wojtowicz committed
702

703 704
    Description: Maps the Cell Specific Reference Signals to the
                 subframe
Ben Wojtowicz's avatar
Ben Wojtowicz committed
705

706
    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.10.1
707 708 709 710 711
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731
LIBLTE_ERROR_ENUM liblte_phy_map_crs(LIBLTE_PHY_STRUCT          *phy_struct,
                                     LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                     uint32                      N_id_cell,
                                     uint8                       N_ant);

/*********************************************************************
    Name: liblte_phy_map_pss

    Description: Maps the Primary Synchronization Signal to the
                 subframe.

    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.11.1
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_map_pss(LIBLTE_PHY_STRUCT          *phy_struct,
                                     LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                     uint32                      N_id_2,
732
                                     uint8                       N_ant);
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751

/*********************************************************************
    Name: liblte_phy_find_pss_and_fine_timing

    Description: Searches for the Primary Synchronization Signal and
                 determines fine timing.

    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.11.1
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_find_pss_and_fine_timing(LIBLTE_PHY_STRUCT *phy_struct,
                                                      float             *i_samps,
                                                      float             *q_samps,
                                                      uint32            *symb_starts,
                                                      uint32            *N_id_2,
                                                      uint32            *pss_symb,
752 753
                                                      float             *pss_thresh,
                                                      float             *freq_offset);
754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770

/*********************************************************************
    Name: liblte_phy_map_sss

    Description: Maps the Secondary Synchronization Signal to the
                 subframe.

    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.11.2
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_map_sss(LIBLTE_PHY_STRUCT          *phy_struct,
                                     LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                     uint32                      N_id_1,
                                     uint32                      N_id_2,
771
                                     uint8                       N_ant);
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793

/*********************************************************************
    Name: liblte_phy_find_sss

    Description: Searches for the Secondary Synchronization Signal.

    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.11.2
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_find_sss(LIBLTE_PHY_STRUCT *phy_struct,
                                      float             *i_samps,
                                      float             *q_samps,
                                      uint32             N_id_2,
                                      uint32            *symb_starts,
                                      float              pss_thresh,
                                      uint32            *N_id_1,
                                      uint32            *frame_start_idx);

/*********************************************************************
794
    Name: liblte_phy_dl_find_coarse_timing_and_freq_offset
795 796 797

    Description: Finds coarse time syncronization and frequency offset
                 by auto-correlating to find the cyclic prefix on
798
                 reference signal symbols of the downlink
799 800 801 802

    Document Reference: 3GPP TS 36.211 v10.1.0
*********************************************************************/
// Defines
803
#define LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS 5
804 805
// Enums
// Structs
806 807 808 809 810
typedef struct{
    float  freq_offset[LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS];
    uint32 symb_starts[LIBLTE_PHY_N_MAX_ROUGH_CORR_SEARCH_PEAKS][7];
    uint32 n_corr_peaks;
}LIBLTE_PHY_COARSE_TIMING_STRUCT;
811
// Functions
812 813 814 815 816
LIBLTE_ERROR_ENUM liblte_phy_dl_find_coarse_timing_and_freq_offset(LIBLTE_PHY_STRUCT               *phy_struct,
                                                                   float                           *i_samps,
                                                                   float                           *q_samps,
                                                                   uint32                           N_slots,
                                                                   LIBLTE_PHY_COARSE_TIMING_STRUCT *timing_struct);
817 818

/*********************************************************************
819
    Name: liblte_phy_create_dl_subframe
820 821

    Description: Creates the baseband signal for a particular
822
                 downlink subframe
823 824 825 826 827 828 829

    Document Reference: 3GPP TS 36.211 v10.1.0
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
830 831 832 833 834
LIBLTE_ERROR_ENUM liblte_phy_create_dl_subframe(LIBLTE_PHY_STRUCT          *phy_struct,
                                                LIBLTE_PHY_SUBFRAME_STRUCT *subframe,
                                                uint8                       ant,
                                                float                      *i_samps,
                                                float                      *q_samps);
835 836

/*********************************************************************
837
    Name: liblte_phy_get_dl_subframe_and_ce
838 839

    Description: Resolves all symbols and channel estimates for a
840
                 particular downlink subframe
841 842 843 844 845 846 847

    Document Reference: 3GPP TS 36.211 v10.1.0
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
848 849 850 851 852 853 854 855
LIBLTE_ERROR_ENUM liblte_phy_get_dl_subframe_and_ce(LIBLTE_PHY_STRUCT          *phy_struct,
                                                    float                      *i_samps,
                                                    float                      *q_samps,
                                                    uint32                      frame_start_idx,
                                                    uint8                       subfr_num,
                                                    uint32                      N_id_cell,
                                                    uint8                       N_ant,
                                                    LIBLTE_PHY_SUBFRAME_STRUCT *subframe);
856

857
/*********************************************************************
858
    Name: liblte_phy_get_tbs_mcs_and_n_prb_for_dl
859 860 861

    Description: Determines the transport block size, modulation and
                 coding scheme, and the number of PRBs needed to send
862
                 the specified number of DL bits
863 864

    Document Reference: 3GPP TS 36.213 v10.3.0 section 7.1.7
865 866

    NOTES: Currently only supports DCI format 1A
867 868 869 870 871
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
872
LIBLTE_ERROR_ENUM liblte_phy_get_tbs_mcs_and_n_prb_for_dl(uint32  N_bits,
873
                                                          uint32  N_subframe,
874
                                                          uint32  N_rb_dl,
875 876 877 878 879 880 881 882 883 884 885 886 887 888
                                                          uint16  rnti,
                                                          uint32 *tbs,
                                                          uint8  *mcs,
                                                          uint32 *N_prb);

/*********************************************************************
    Name: liblte_phy_get_tbs_and_n_prb_for_dl

    Description: Determines the transport block size and the number of
                 PRBs needed to send the specified number of DL bits
                 according to the specified modulation and coding
                 scheme

    Document Reference: 3GPP TS 36.213 v10.3.0 section 7.1.7
889 890

    NOTES: Currently only supports single layer transport blocks
891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_get_tbs_and_n_prb_for_dl(uint32  N_bits,
                                                      uint32  N_rb_dl,
                                                      uint8   mcs,
                                                      uint32 *tbs,
                                                      uint32 *N_prb);

/*********************************************************************
    Name: liblte_phy_get_tbs_mcs_and_n_prb_for_ul

    Description: Determines the transport block size, modulation and
                 coding scheme, and the number of PRBs needed to send
                 the specified number of UL bits

    Document Reference: 3GPP TS 36.213 v10.3.0 section 7.1.7
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_get_tbs_mcs_and_n_prb_for_ul(uint32  N_bits,
                                                          uint32  N_rb_ul,
917 918 919 920
                                                          uint32 *tbs,
                                                          uint8  *mcs,
                                                          uint32 *N_prb);

921 922 923 924 925 926 927 928 929 930 931 932 933
/*********************************************************************
    Name: liblte_phy_get_n_cce

    Description: Determines the number of control channel elements
                 available in the specified subframe

    Document Reference: 3GPP TS 36.211 v10.1.0 section 6.8.1
*********************************************************************/
// Defines
// Enums
// Structs
// Functions
LIBLTE_ERROR_ENUM liblte_phy_get_n_cce(LIBLTE_PHY_STRUCT *phy_struct,
934 935 936
                                       float              phich_res,
                                       uint32             N_pdcch_symbs,
                                       uint8              N_ant,
937 938
                                       uint32            *N_cce);

939
#endif /* __LIBLTE_PHY_H__ */