impl_defs_lte.h 51.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.0  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

/*! \file PHY/impl_defs_lte.h
* \brief LTE Physical channel configuration and variable structure definitions
* \author R. Knopp, F. Kaltenberger
* \date 2011
* \version 0.1
* \company Eurecom
* \email: knopp@eurecom.fr,florian.kaltenberger@eurecom.fr
* \note
* \warning
*/

#ifndef __PHY_IMPLEMENTATION_DEFS_LTE_H__
#define __PHY_IMPLEMENTATION_DEFS_LTE_H__


#include "types.h"
Matthieu Kanj's avatar
Matthieu Kanj committed
38 39 40 41 42

////////////////// NB-IoT testing //////////////////
//#include "impl_defs_lte_NB_IoT.h"
///////////////////////////////////////////////////

43 44 45 46 47 48
//#include "defs.h"

#define LTE_NUMBER_OF_SUBFRAMES_PER_FRAME 10
#define LTE_SLOTS_PER_FRAME  20
#define LTE_CE_FILTER_LENGTH 5
#define LTE_CE_OFFSET LTE_CE_FILTER_LENGTH
49
#define TX_RX_SWITCH_SYMBOL (NUMBER_OF_SYMBOLS_PER_FRAME>>1)
50 51 52 53 54 55 56 57 58 59 60 61
#define PBCH_PDU_SIZE 3 //bytes

#define PRACH_SYMBOL 3 //position of the UL PSS wrt 2nd slot of special subframe

#define NUMBER_OF_FREQUENCY_GROUPS (lte_frame_parms->N_RB_DL)

#define SSS_AMP 1148

#define MAX_NUM_PHICH_GROUPS 56  //110 RBs Ng=2, p.60 36-212, Sec. 6.9

#define MAX_MBSFN_AREA 8

laurent's avatar
laurent committed
62 63 64
#ifdef OCP_FRAMEWORK
#include "enums.h"
#else
65 66 67 68
typedef enum {TDD=1,FDD=0} lte_frame_type_t;

typedef enum {EXTENDED=1,NORMAL=0} lte_prefix_type_t;

69 70
typedef enum {LOCALIZED=0,DISTRIBUTED=1} vrb_t;

Matthieu Kanj's avatar
Matthieu Kanj committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
////////////////////////////////////////// NB-IoT testing ///////////////////////////////////////////////////////////////
typedef struct{
  /// The base sequence of DMRS sequence in a cell for 3 tones transmission; see TS 36.211 [21, 10.1.4.1.2]. If absent, it is given by NB-IoT CellID mod 12. Value 12 is not used.
  uint16_t threeTone_BaseSequence;
  /// Define 3 cyclic shifts for the 3-tone case, see TS 36.211 [21, 10.1.4.1.2].
  uint16_t threeTone_CyclicShift;
  /// The base sequence of DMRS sequence in a cell for 6 tones transmission; see TS 36.211 [21, 10.1.4.1.2]. If absent, it is given by NB-IoT CellID mod 14. Value 14 is not used.
  uint16_t sixTone_BaseSequence;
  /// Define 4 cyclic shifts for the 6-tone case, see TS 36.211 [21, 10.1.4.1.2].
  uint16_t sixTone_CyclicShift;
  /// The base sequence of DMRS sequence in a cell for 12 tones transmission; see TS 36.211 [21, 10.1.4.1.2]. If absent, it is given by NB-IoT CellID mod 30. Value 30 is not used.
  uint16_t twelveTone_BaseSequence;

}DMRS_CONFIGx_t;

/// UL-ReferenceSignalsNPUSCH from 36.331 RRC spec
typedef struct {
  /// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). \vr{[0..1]}
  uint8_t groupHoppingEnabled;
  /// , see TS 36.211 (5.5.1.3). \vr{[0..29]}
  uint8_t groupAssignmentNPUSCH;
  /// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). \vr{[0..7]}
  uint8_t cyclicShift;
  /// nPRS for cyclic shift of DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
  uint8_t nPRS[20];
  /// group hopping sequence for DMRS, 36.211, Section 10.1.4.1.3. Second index corresponds to the four possible subcarrier configurations
  uint8_t grouphop[20][4];
  /// sequence hopping sequence for DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
  uint8_t seqhop[20];
} UL_REFERENCE_SIGNALS_NPUSCHx_t;


/// PUSCH-ConfigCommon from 36.331 RRC spec.
typedef struct {
  /// Number of repetitions for ACK/NACK HARQ response to NPDSCH containing Msg4 per NPRACH resource, see TS 36.213 [23, 16.4.2].
  uint8_t ack_NACK_NumRepetitions_Msg4[3];
  /// SRS SubframeConfiguration. See TS 36.211 [21, table 5.5.3.3-1]. Value sc0 corresponds to value 0, sc1 to value 1 and so on.
  uint8_t srs_SubframeConfig;
  /// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). \vr{[0..98]}
  DMRS_CONFIGx_t dmrs_Config;
  /// Ref signals configuration
  UL_REFERENCE_SIGNALS_NPUSCHx_t ul_ReferenceSignalsNPUSCH;

} NPUSCH_CONFIG_COMMONx;

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

118
/// Enumeration for parameter PHICH-Duration \ref PHICH_CONFIG_COMMON::phich_duration.
119 120 121 122 123
typedef enum {
  normal=0,
  extended=1
} PHICH_DURATION_t;

124
/// Enumeration for parameter Ng \ref PHICH_CONFIG_COMMON::phich_resource.
125 126 127 128 129 130
typedef enum {
  oneSixth=1,
  half=3,
  one=6,
  two=12
} PHICH_RESOURCE_t;
laurent's avatar
laurent committed
131
#endif
132
/// PHICH-Config from 36.331 RRC spec
133
typedef struct {
134
  /// Parameter: PHICH-Duration, see TS 36.211 (Table 6.9.3-1).
135
  PHICH_DURATION_t phich_duration;
136
  /// Parameter: Ng, see TS 36.211 (6.9). \details Value oneSixth corresponds to 1/6, half corresponds to 1/2 and so on.
137 138 139
  PHICH_RESOURCE_t phich_resource;
} PHICH_CONFIG_COMMON;

140
/// PRACH-ConfigInfo from 36.331 RRC spec
141
typedef struct {
142
  /// Parameter: prach-ConfigurationIndex, see TS 36.211 (5.7.1). \vr{[0..63]}
143
  uint8_t prach_ConfigIndex;
144
  /// Parameter: High-speed-flag, see TS 36.211 (5.7.2). \vr{[0..1]} 1 corresponds to Restricted set and 0 to Unrestricted set.
145
  uint8_t highSpeedFlag;
146
  /// Parameter: \f$N_\text{CS}\f$, see TS 36.211 (5.7.2). \vr{[0..15]}\n Refer to table 5.7.2-2 for preamble format 0..3 and to table 5.7.2-3 for preamble format 4.
147
  uint8_t zeroCorrelationZoneConfig;
148
  /// Parameter: prach-FrequencyOffset, see TS 36.211 (5.7.1). \vr{[0..94]}\n For TDD the value range is dependent on the value of \ref prach_ConfigIndex.
149
  uint8_t prach_FreqOffset;
150 151
} PRACH_CONFIG_INFO;

152
/// PRACH-ConfigSIB or PRACH-Config from 36.331 RRC spec
153
typedef struct {
154
  /// Parameter: RACH_ROOT_SEQUENCE, see TS 36.211 (5.7.1). \vr{[0..837]}
155
  uint16_t rootSequenceIndex;
156
  /// prach_Config_enabled=1 means enabled. \vr{[0..1]}
157
  uint8_t prach_Config_enabled;
158
  /// PRACH Configuration Information
159 160 161
  PRACH_CONFIG_INFO prach_ConfigInfo;
} PRACH_CONFIG_COMMON;

162
/// Enumeration for parameter \f$N_\text{ANRep}\f$ \ref PUCCH_CONFIG_DEDICATED::repetitionFactor.
163 164 165 166 167 168
typedef enum {
  n2=0,
  n4,
  n6
} ACKNAKREP_t;

169
/// Enumeration for \ref PUCCH_CONFIG_DEDICATED::tdd_AckNackFeedbackMode.
170 171 172 173 174
typedef enum {
  bundling=0,
  multiplexing
} ANFBmode_t;

175
/// PUCCH-ConfigDedicated from 36.331 RRC spec
176
typedef struct {
177
  /// Flag to indicate ACK NAK repetition activation, see TS 36.213 (10.1). \vr{[0..1]}
178
  uint8_t ackNackRepetition;
179
  /// Parameter: \f$N_\text{ANRep}\f$, see TS 36.213 (10.1).
180
  ACKNAKREP_t repetitionFactor;
181
  /// Parameter: \f$n^{(1)}_\text{PUCCH,ANRep}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
182
  uint16_t n1PUCCH_AN_Rep;
183
  /// Feedback mode, see TS 36.213 (7.3). \details Applied to both PUCCH and PUSCH feedback. For TDD, should always be set to bundling.
184 185 186 187 188
  ANFBmode_t tdd_AckNackFeedbackMode;
} PUCCH_CONFIG_DEDICATED;

/// PUCCH-ConfigCommon from 36.331 RRC spec
typedef struct {
189
  /// Parameter: \f$\Delta^\text{PUCCH}_\text{shift}\f$, see TS 36.211 (5.4.1). \vr{[1..3]} \note the specification sais it is an enumerated value.
190
  uint8_t deltaPUCCH_Shift;
191
  /// Parameter: \f$N^{(2)}_\text{RB}\f$, see TS 36.211 (5.4). \vr{[0..98]}
192
  uint8_t nRB_CQI;
193
  /// Parameter: \f$N^{(1)}_\text{CS}\f$, see TS 36.211 (5.4). \vr{[0..7]}
194
  uint8_t nCS_AN;
195
  /// Parameter: \f$N^{(1)}_\text{PUCCH}\f$ see TS 36.213 (10.1). \vr{[0..2047]}
196
  uint16_t n1PUCCH_AN;
fnabet's avatar
fnabet committed
197 198 199 200 201

  /// group hopping sequence for DRS \note not part of offical UL-PUCCH_CONFIG_COMMON ASN1 specification.
  uint8_t grouphop[20];
  /// sequence hopping sequence for DRS \note not part of offical UL-PUCCH_CONFIG_COMMON ASN1 specification.
  uint8_t seqhop[20];
202 203 204 205
} PUCCH_CONFIG_COMMON;

/// UL-ReferenceSignalsPUSCH from 36.331 RRC spec
typedef struct {
206
  /// Parameter: Group-hopping-enabled, see TS 36.211 (5.5.1.3). \vr{[0..1]}
207
  uint8_t groupHoppingEnabled;
208
  /// Parameter: \f$\Delta SS\f$, see TS 36.211 (5.5.1.3). \vr{[0..29]}
209
  uint8_t groupAssignmentPUSCH;
210
  /// Parameter: Sequence-hopping-enabled, see TS 36.211 (5.5.1.4). \vr{[0..1]}
211
  uint8_t sequenceHoppingEnabled;
212
  /// Parameter: cyclicShift, see TS 36.211 (Table 5.5.2.1.1-2). \vr{[0..7]}
213
  uint8_t cyclicShift;
214
  /// nPRS for cyclic shift of DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
215
  uint8_t nPRS[20];
216
  /// group hopping sequence for DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
217
  uint8_t grouphop[20];
218
  /// sequence hopping sequence for DRS \note not part of offical UL-ReferenceSignalsPUSCH ASN1 specification.
219
  uint8_t seqhop[20];
220
} UL_REFERENCE_SIGNALS_PUSCH_t;
221

222
/// Enumeration for parameter Hopping-mode \ref PUSCH_CONFIG_COMMON::hoppingMode.
laurent's avatar
laurent committed
223
#ifndef OCP_FRAMEWORK
224
typedef enum {
225
  interSubFrame=0,
226 227
  intraAndInterSubFrame=1
} PUSCH_HOPPING_t;
laurent's avatar
laurent committed
228
#endif
229

230
/// PUSCH-ConfigCommon from 36.331 RRC spec.
231
typedef struct {
232
  /// Parameter: \f$N_{sb}\f$, see TS 36.211 (5.3.4). \vr{[1..4]}
233
  uint8_t n_SB;
234
  /// Parameter: Hopping-mode, see TS 36.211 (5.3.4).
235
  PUSCH_HOPPING_t hoppingMode;
236
  /// Parameter: \f$N^{HO}_{RB}\f$, see TS 36.211 (5.3.4). \vr{[0..98]}
237
  uint8_t pusch_HoppingOffset;
238
  /// See TS 36.213 (8.6.1). \vr{[0..1]} 1 indicates 64QAM is allowed, 0 not allowed.
239
  uint8_t enable64QAM;
240 241 242 243
  /// Ref signals configuration
  UL_REFERENCE_SIGNALS_PUSCH_t ul_ReferenceSignalsPUSCH;
} PUSCH_CONFIG_COMMON;

244
/// UE specific PUSCH configuration.
245
typedef struct {
246
  /// Parameter: \f$I^\text{HARQ-ACK}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-1). \vr{[0..15]}
247
  uint16_t betaOffset_ACK_Index;
248
  /// Parameter: \f$I^{RI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-2). \vr{[0..15]}
249
  uint16_t betaOffset_RI_Index;
250
  /// Parameter: \f$I^{CQI}_\text{offset}\f$, see TS 36.213 (Table 8.6.3-3). \vr{[0..15]}
251
  uint16_t betaOffset_CQI_Index;
252 253
} PUSCH_CONFIG_DEDICATED;

254
/// lola CBA information
255
typedef struct {
256
  ///
257
  uint16_t betaOffset_CA_Index;
258
  ///
259
  uint16_t cShift;
260 261 262 263
} PUSCH_CA_CONFIG_DEDICATED;

/// PDSCH-ConfigCommon from 36.331 RRC spec
typedef struct {
264
  /// Parameter: Reference-signal power, see TS 36.213 (5.2). \vr{[-60..50]}\n Provides the downlink reference-signal EPRE. The actual value in dBm.
265
  int8_t referenceSignalPower;
266
  /// Parameter: \f$P_B\f$, see TS 36.213 (Table 5.2-1). \vr{[0..3]}
267
  uint8_t p_b;
268 269
} PDSCH_CONFIG_COMMON;

270
/// Enumeration for Parameter \f$P_A\f$ \ref PDSCH_CONFIG_DEDICATED::p_a.
271
typedef enum {
272 273 274 275 276 277 278 279
  dBm6=0, ///< (dB-6) corresponds to -6 dB
  dBm477, ///< (dB-4dot77) corresponds to -4.77 dB
  dBm3,   ///< (dB-3) corresponds to -3 dB
  dBm177, ///< (dB-1dot77) corresponds to -1.77 dB
  dB0,    ///< corresponds to 0 dB
  dB1,    ///< corresponds to 1 dB
  dB2,    ///< corresponds to 2 dB
  dB3     ///< corresponds to 3 dB
280 281
} PA_t;

282
/// PDSCH-ConfigDedicated from 36.331 RRC spec
283
typedef struct {
284 285
  /// Parameter: \f$P_A\f$, see TS 36.213 (5.2).
  PA_t p_a;
286 287 288 289
} PDSCH_CONFIG_DEDICATED;

/// SoundingRS-UL-ConfigCommon Information Element from 36.331 RRC spec
typedef struct {
290
  /// enabled flag=1 means SRS is enabled. \vr{[0..1]}
291
  uint8_t enabled_flag;
292
  /// Parameter: SRS Bandwidth Configuration, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). \vr{[0..7]}\n Actual configuration depends on UL bandwidth. \note the specification sais it is an enumerated value.
293
  uint8_t srs_BandwidthConfig;
294
  /// Parameter: SRS SubframeConfiguration, see TS 36.211 (table 5.5.3.3-1 for FDD, table 5.5.3.3-2 for TDD). \vr{[0..15]} \note the specification sais it is an enumerated value.
295
  uint8_t srs_SubframeConfig;
296
  /// Parameter: Simultaneous-AN-and-SRS, see TS 36.213 (8.2). \vr{[0..1]}
297
  uint8_t ackNackSRS_SimultaneousTransmission;
298
  /// Parameter: srsMaxUpPts, see TS 36.211 (5.5.3.2). \details If this field is present, reconfiguration of \f$m^\text{max}_\text{SRS,0}\f$ applies for UpPts, otherwise reconfiguration does not apply.
299
  uint8_t srs_MaxUpPts;
300 301
} SOUNDINGRS_UL_CONFIG_COMMON;

302
/// \note UNUSED
303 304 305 306 307 308 309 310 311 312 313
typedef enum {
  ulpc_al0=0,
  ulpc_al04=1,
  ulpc_al05=2,
  ulpc_al06=3,
  ulpc_al07=4,
  ulpc_al08=5,
  ulpc_al09=6,
  ulpc_al11=7
} UL_POWER_CONTROL_COMMON_alpha_t;

314
/// Enumeration for \ref deltaFList_PUCCH_t::deltaF_PUCCH_Format1.
315
typedef enum {
316 317 318
  deltaF_PUCCH_Format1_deltaF_2  = 0,
  deltaF_PUCCH_Format1_deltaF0   = 1,
  deltaF_PUCCH_Format1_deltaF2   = 2
319
} deltaF_PUCCH_Format1_t;
320 321

/// Enumeration for \ref deltaFList_PUCCH_t::deltaF_PUCCH_Format1b.
322
typedef enum {
323 324 325
  deltaF_PUCCH_Format1b_deltaF1  = 0,
  deltaF_PUCCH_Format1b_deltaF3  = 1,
  deltaF_PUCCH_Format1b_deltaF5  = 2
326
} deltaF_PUCCH_Format1b_t;
327 328

/// Enumeration for \ref deltaFList_PUCCH_t::deltaF_PUCCH_Format2.
329
typedef enum {
330 331 332 333
  deltaF_PUCCH_Format2_deltaF_2  = 0,
  deltaF_PUCCH_Format2_deltaF0   = 1,
  deltaF_PUCCH_Format2_deltaF1   = 2,
  deltaF_PUCCH_Format2_deltaF2   = 3
334
} deltaF_PUCCH_Format2_t;
335 336

/// Enumeration for \ref deltaFList_PUCCH_t::deltaF_PUCCH_Format2a.
337
typedef enum {
338 339 340
  deltaF_PUCCH_Format2a_deltaF_2 = 0,
  deltaF_PUCCH_Format2a_deltaF0  = 1,
  deltaF_PUCCH_Format2a_deltaF2  = 2
341
} deltaF_PUCCH_Format2a_t;
342 343

/// Enumeration for \ref deltaFList_PUCCH_t::deltaF_PUCCH_Format2b.
344
typedef enum {
345 346 347
  deltaF_PUCCH_Format2b_deltaF_2 = 0,
  deltaF_PUCCH_Format2b_deltaF0  = 1,
  deltaF_PUCCH_Format2b_deltaF2  = 2
348 349
} deltaF_PUCCH_Format2b_t;

350
/// DeltaFList-PUCCH from 36.331 RRC spec
351
typedef struct {
352 353 354 355 356
  deltaF_PUCCH_Format1_t   deltaF_PUCCH_Format1;
  deltaF_PUCCH_Format1b_t  deltaF_PUCCH_Format1b;
  deltaF_PUCCH_Format2_t   deltaF_PUCCH_Format2;
  deltaF_PUCCH_Format2a_t  deltaF_PUCCH_Format2a;
  deltaF_PUCCH_Format2b_t  deltaF_PUCCH_Format2b;
357 358 359 360
} deltaFList_PUCCH_t;

/// SoundingRS-UL-ConfigDedicated Information Element from 36.331 RRC spec
typedef struct {
361
  /// Parameter: \f$B_\text{SRS}\f$, see TS 36.211 (table 5.5.3.2-1, 5.5.3.2-2, 5.5.3.2-3 and 5.5.3.2-4). \vr{[0..3]} \note the specification sais it is an enumerated value.
362
  uint8_t srs_Bandwidth;
363
  /// Parameter: SRS hopping bandwidth \f$b_\text{hop}\in\{0,1,2,3\}\f$, see TS 36.211 (5.5.3.2) \vr{[0..3]} \note the specification sais it is an enumerated value.
364
  uint8_t srs_HoppingBandwidth;
365
  /// Parameter: \f$n_\text{RRC}\f$, see TS 36.211 (5.5.3.2). \vr{[0..23]}
366
  uint8_t freqDomainPosition;
367
  /// Parameter: Duration, see TS 36.213 (8.2). \vr{[0..1]} 0 corresponds to "single" and 1 to "indefinite".
368
  uint8_t duration;
369
  /// Parameter: \f$k_\text{TC}\in\{0,1\}\f$, see TS 36.211 (5.5.3.2). \vr{[0..1]}
370
  uint8_t transmissionComb;
371
  /// Parameter: \f$I_\text{SRS}\f$, see TS 36.213 (table 8.2-1). \vr{[0..1023]}
372
  uint16_t srs_ConfigIndex;
373
  /// Parameter: \f$n^\text{CS}_\text{SRS}\f$. See TS 36.211 (5.5.3.1). \vr{[0..7]} \note the specification sais it is an enumerated value.
374
  uint8_t cyclicShift;
375
  // Parameter: internal implementation: UE SRS configured
fnabet's avatar
fnabet committed
376
  uint8_t srsConfigDedicatedSetup;
hbilel's avatar
hbilel committed
377 378 379 380
  // Parameter: cell srs subframe for internal implementation
  uint8_t srsCellSubframe;
  // Parameter: ue srs subframe for internal implementation
  uint8_t srsUeSubframe;
381 382
} SOUNDINGRS_UL_CONFIG_DEDICATED;

383
/// UplinkPowerControlDedicated Information Element from 36.331 RRC spec
384
typedef struct {
385
  /// Parameter: \f$P_\text{0\_UE\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dB. \vr{[-8..7]}\n This field is applicable for non-persistent scheduling, only.
386
  int8_t p0_UE_PUSCH;
387
  /// Parameter: Ks, see TS 36.213 (5.1.1.1). \vr{[0..1]}\n en0 corresponds to value 0 corresponding to state “disabled”. en1 corresponds to value 1.25 corresponding to “enabled”. \note the specification sais it is an enumerated value. \warning the enumeration values do not correspond to the given values in the specification (en1 should be 1.25).
388
  uint8_t deltaMCS_Enabled;
389
  /// Parameter: Accumulation-enabled, see TS 36.213 (5.1.1.1). \vr{[0..1]} 1 corresponds to "enabled" whereas 0 corresponds to "disabled".
390
  uint8_t accumulationEnabled;
391
  /// Parameter: \f$P_\text{0\_UE\_PUCCH}(1)\f$, see TS 36.213 (5.1.2.1), unit dB. \vr{[-8..7]}
392
  int8_t p0_UE_PUCCH;
393
  /// Parameter: \f$P_\text{SRS\_OFFSET}\f$, see TS 36.213 (5.1.3.1). \vr{[0..15]}\n For Ks=1.25 (\ref deltaMCS_Enabled), the actual parameter value is pSRS_Offset value - 3. For Ks=0, the actual parameter value is -10.5 + 1.5*pSRS_Offset value.
394
  int8_t pSRS_Offset;
395
  /// Specifies the filtering coefficient for RSRP measurements used to calculate path loss, as specified in TS 36.213 (5.1.1.1).\details The same filtering mechanism applies as for quantityConfig described in 5.5.3.2. \note the specification sais it is an enumerated value.
396
  uint8_t filterCoefficient;
397 398
} UL_POWER_CONTROL_DEDICATED;

laurent's avatar
laurent committed
399
#ifndef OCP_FRAMEWORK
400
/// Enumeration for parameter \f$\alpha\f$ \ref UL_POWER_CONTROL_CONFIG_COMMON::alpha.
401 402 403 404 405 406 407 408 409 410
typedef enum {
  al0=0,
  al04=1,
  al05=2,
  al06=3,
  al07=4,
  al08=5,
  al09=6,
  al1=7
} PUSCH_alpha_t;
laurent's avatar
laurent committed
411
#endif
412

413
/// \note UNUSED
414 415 416 417 418 419
typedef enum {
  deltaFm2=0,
  deltaF0,
  deltaF1,
  deltaF2,
  deltaF3,
420
  deltaF5
421 422
} deltaF_PUCCH_t;

423
/// UplinkPowerControlCommon Information Element from 36.331 RRC spec \note this structure does not currently make use of \ref deltaFList_PUCCH_t.
424
typedef struct {
425
  /// Parameter: \f$P_\text{0\_NOMINAL\_PUSCH}(1)\f$, see TS 36.213 (5.1.1.1), unit dBm. \vr{[-126..24]}\n This field is applicable for non-persistent scheduling, only.
426
  int8_t p0_NominalPUSCH;
427
  /// Parameter: \f$\alpha\f$, see TS 36.213 (5.1.1.1) \warning the enumeration values do not correspond to the given values in the specification (al04 should be 0.4, ...)!
428
  PUSCH_alpha_t alpha;
429
  /// Parameter: \f$P_\text{0\_NOMINAL\_PUCCH}\f$ See TS 36.213 (5.1.2.1), unit dBm. \vr{[-127..-96]}
430
  int8_t p0_NominalPUCCH;
431
  /// Parameter: \f$\Delta_\text{PREAMBLE\_Msg3}\f$ see TS 36.213 (5.1.1.1). \vr{[-1..6]}\n Actual value = IE value * 2 [dB].
432
  int8_t deltaPreambleMsg3;
433
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
434
  long deltaF_PUCCH_Format1;
435
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1a, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
436
  long deltaF_PUCCH_Format1a;
437
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 1b, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
438
  long deltaF_PUCCH_Format1b;
439
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2, see TS 36.213 (5.1.2). \vr{[0..3]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
440
  long deltaF_PUCCH_Format2;
441
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2a, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
442
  long deltaF_PUCCH_Format2a;
443
  /// Parameter: \f$\Delta_\text{F\_PUCCH}(F)\f$ for the PUCCH format 2b, see TS 36.213 (5.1.2). \vr{[0..2]} \warning check value range, why is this a long? \note the specification sais it is an enumerated value.
444 445 446
  long deltaF_PUCCH_Format2b;
} UL_POWER_CONTROL_CONFIG_COMMON;

447
/// Union for \ref TPC_PDCCH_CONFIG::tpc_Index.
448
typedef union {
449 450 451 452
  /// Index of N when DCI format 3 is used. See TS 36.212 (5.3.3.1.6). \vr{[1..15]}
  uint8_t indexOfFormat3;
  /// Index of M when DCI format 3A is used. See TS 36.212 (5.3.3.1.7). \vr{[1..31]}
  uint8_t indexOfFormat3A;
453 454
} TPC_INDEX_t;

455
/// TPC-PDCCH-Config Information Element from 36.331 RRC spec
456
typedef struct {
457
  /// RNTI for power control using DCI format 3/3A, see TS 36.212. \vr{[0..65535]}
458
  uint16_t rnti;
459
  /// Index of N or M, see TS 36.212 (5.3.3.1.6 and 5.3.3.1.7), where N or M is dependent on the used DCI format (i.e. format 3 or 3a).
460 461 462
  TPC_INDEX_t tpc_Index;
} TPC_PDCCH_CONFIG;

463
/// Enumeration for parameter SR transmission \ref SCHEDULING_REQUEST_CONFIG::dsr_TransMax.
464 465 466 467 468 469 470 471
typedef enum {
  sr_n4=0,
  sr_n8=1,
  sr_n16=2,
  sr_n32=3,
  sr_n64=4
} DSR_TRANSMAX_t;

472
/// SchedulingRequestConfig Information Element from 36.331 RRC spec
473
typedef struct {
474
  /// Parameter: \f$n^{(1)}_\text{PUCCH,SRI}\f$, see TS 36.213 (10.1). \vr{[0..2047]}
475
  uint16_t sr_PUCCH_ResourceIndex;
476
  /// Parameter: \f$I_\text{SR}\f$, see TS 36.213 (10.1). \vr{[0..155]}
477
  uint8_t sr_ConfigIndex;
478
  /// Parameter for SR transmission in TS 36.321 (5.4.4). \details The value n4 corresponds to 4 transmissions, n8 corresponds to 8 transmissions and so on.
479 480 481
  DSR_TRANSMAX_t dsr_TransMax;
} SCHEDULING_REQUEST_CONFIG;

482
/// CQI-ReportPeriodic
483
typedef struct {
Raymond Knopp's avatar
Raymond Knopp committed
484 485
  /// Parameter: \f$n^{(2)}_\text{PUCCH}\f$, see TS 36.213 (7.2). \vr{[0..1185]}, -1 indicates inactivity
  int16_t cqi_PUCCH_ResourceIndex;
486
  /// Parameter: CQI/PMI Periodicity and Offset Configuration Index \f$I_\text{CQI/PMI}\f$, see TS 36.213 (tables 7.2.2-1A and 7.2.2-1C). \vr{[0..1023]}
Raymond Knopp's avatar
Raymond Knopp committed
487
  int16_t cqi_PMI_ConfigIndex;
488
  /// Parameter: K, see 36.213 (4.2.2). \vr{[1..4]}
489
  uint8_t K;
Raymond Knopp's avatar
Raymond Knopp committed
490 491
  /// Parameter: RI Config Index \f$I_\text{RI}\f$, see TS 36.213 (7.2.2-1B). \vr{[0..1023]}, -1 indicates inactivity
  int16_t ri_ConfigIndex;
492
  /// Parameter: Simultaneous-AN-and-CQI, see TS 36.213 (10.1). \vr{[0..1]} 1 indicates that simultaneous transmission of ACK/NACK and CQI is allowed.
493
  uint8_t simultaneousAckNackAndCQI;
Raymond Knopp's avatar
Raymond Knopp committed
494 495 496 497
  /// parameter computed from Tables 7.2.2-1A and 7.2.2-1C
  uint16_t Npd;
  /// parameter computed from Tables 7.2.2-1A and 7.2.2-1C
  uint16_t N_OFFSET_CQI;
498 499
} CQI_REPORTPERIODIC;

500 501 502 503 504 505 506 507 508 509
/// Enumeration for parameter reporting mode \ref CQI_REPORT_CONFIG::cqi_ReportModeAperiodic.
typedef enum {
  rm12=0,
  rm20=1,
  rm22=2,
  rm30=3,
  rm31=4
} CQI_REPORTMODEAPERIODIC;

/// CQI-ReportConfig Information Element from 36.331 RRC spec
510
typedef struct {
511
  /// Parameter: reporting mode. Value rm12 corresponds to Mode 1-2, rm20 corresponds to Mode 2-0, rm22 corresponds to Mode 2-2 etc. PUSCH reporting modes are described in TS 36.213 [23, 7.2.1].
512
  CQI_REPORTMODEAPERIODIC cqi_ReportModeAperiodic;
513
  /// Parameter: \f$\Delta_\text{offset}\f$, see TS 36.213 (7.2.3). \vr{[-1..6]}\n Actual value = IE value * 2 [dB].
514
  int8_t nomPDSCH_RS_EPRE_Offset;
515 516 517
  CQI_REPORTPERIODIC CQI_ReportPeriodic;
} CQI_REPORT_CONFIG;

518
/// MBSFN-SubframeConfig Information Element from 36.331 RRC spec \note deviates from specification.
519
typedef struct {
520
  /// MBSFN subframe occurance. \details Radio-frames that contain MBSFN subframes occur when equation SFN mod radioFrameAllocationPeriod = radioFrameAllocationOffset is satisfied. When fourFrames is used for subframeAllocation, the equation defines the first radio frame referred to in the description below. Values n1 and n2 are not applicable when fourFrames is used. \note the specification sais it is an enumerated value {n1, n2, n4, n8, n16, n32}.
521
  int radioframeAllocationPeriod;
522
  /// MBSFN subframe occurance. \vr{[0..7]}\n Radio-frames that contain MBSFN subframes occur when equation SFN mod radioFrameAllocationPeriod = radioFrameAllocationOffset is satisfied. When fourFrames is used for subframeAllocation, the equation defines the first radio frame referred to in the description below. Values n1 and n2 are not applicable when fourFrames is used.
523
  int radioframeAllocationOffset;
524
  /// oneFrame or fourFrames. \vr{[0..1]}
525
  int fourFrames_flag;
526 527 528 529 530
  /// Subframe configuration. \vr{[0..63]} (\ref fourFrames_flag == 0) or \vr{[0..16777215]} (\ref fourFrames_flag == 1)
  /// \par fourFrames_flag == 0
  /// "1" denotes that the corresponding subframe is allocated for MBSFN. The following mapping applies:\n FDD: The first/leftmost bit defines the MBSFN allocation for subframe #1, the second bit for #2, third bit for #3 , fourth bit for #6, fifth bit for #7, sixth bit for #8.\n TDD: The first/leftmost bit defines the allocation for subframe #3, the second bit for #4, third bit for #7, fourth bit for #8, fifth bit for #9. Uplink subframes are not allocated. The last bit is not used.
  /// \par fourFrames_flag == 1
  /// A bit-map indicating MBSFN subframe allocation in four consecutive radio frames, "1" denotes that the corresponding subframe is allocated for MBSFN. The bitmap is interpreted as follows:\n FDD: Starting from the first radioframe and from the first/leftmost bit in the bitmap, the allocation applies to subframes #1, #2, #3 , #6, #7, and #8 in the sequence of the four radio-frames.\n TDD: Starting from the first radioframe and from the first/leftmost bit in the bitmap, the allocation applies to subframes #3, #4, #7, #8, and #9 in the sequence of the four radio-frames. The last four bits are not used. Uplink subframes are not allocated.
531 532 533 534 535
  int mbsfn_SubframeConfig;
} MBSFN_config_t;

typedef struct {
  /// Number of resource blocks (RB) in DL
536
  uint8_t N_RB_DL;
537
  /// Number of resource blocks (RB) in UL
538
  uint8_t N_RB_UL;
539 540 541
  ///  total Number of Resource Block Groups: this is ceil(N_PRB/P)
  uint8_t N_RBG;
  /// Total Number of Resource Block Groups SubSets: this is P
542
  uint8_t N_RBGS;
543
  /// Cell ID
544
  uint16_t Nid_cell;
545
  /// MBSFN Area ID
546
  uint16_t Nid_cell_mbsfn;
547 548 549
  /// Cyclic Prefix for DL (0=Normal CP, 1=Extended CP)
  lte_prefix_type_t Ncp;
  /// Cyclic Prefix for UL (0=Normal CP, 1=Extended CP)
550
  lte_prefix_type_t Ncp_UL;
551
  /// shift of pilot position in one RB
552
  uint8_t nushift;
553 554 555
  /// Frame type (0 FDD, 1 TDD)
  lte_frame_type_t frame_type;
  /// TDD subframe assignment (0-7) (default = 3) (254=RX only, 255=TX only)
556
  uint8_t tdd_config;
557
  /// TDD S-subframe configuration (0-9)
558
  uint8_t tdd_config_S;
559 560
  /// srs extra symbol flag for TDD
  uint8_t srsX;
561
  /// indicates if node is a UE (NODE=2) or eNB (PRIMARY_CH=0).
562
  uint8_t node_id;
563
  /// Frequency index of CBMIMO1 card
564
  uint8_t freq_idx;
565
  /// RX Frequency for ExpressMIMO/LIME
566
  uint32_t carrier_freq[4];
567
  /// TX Frequency for ExpressMIMO/LIME
568
  uint32_t carrier_freqtx[4];
569
  /// RX gain for ExpressMIMO/LIME
570
  uint32_t rxgain[4];
571
  /// TX gain for ExpressMIMO/LIME
572
  uint32_t txgain[4];
573
  /// RF mode for ExpressMIMO/LIME
574
  uint32_t rfmode[4];
575
  /// RF RX DC Calibration for ExpressMIMO/LIME
576
  uint32_t rxdc[4];
577
  /// RF TX DC Calibration for ExpressMIMO/LIME
578
  uint32_t rflocal[4];
579
  /// RF VCO calibration for ExpressMIMO/LIME
580
  uint32_t rfvcolocal[4];
581
  /// Turns on second TX of CBMIMO1 card
582
  uint8_t dual_tx;
583
  /// flag to indicate SISO transmission
584
  uint8_t mode1_flag;
585 586
  /// Indicator that 20 MHz channel uses 3/4 sampling frequency
  uint8_t threequarter_fs;
587
  /// Size of FFT
588
  uint16_t ofdm_symbol_size;
589
  /// Number of prefix samples in all but first symbol of slot
590
  uint16_t nb_prefix_samples;
591
  /// Number of prefix samples in first symbol of slot
592
  uint16_t nb_prefix_samples0;
593
  /// Carrier offset in FFT buffer for first RE in PRB0
594
  uint16_t first_carrier_offset;
595
  /// Number of samples in a subframe
596
  uint32_t samples_per_tti;
597
  /// Number of OFDM/SC-FDMA symbols in one subframe (to be modified to account for potential different in UL/DL)
598
  uint16_t symbols_per_tti;
599 600 601 602
  /// Number of OFDM symbols in DL portion of S-subframe
  uint16_t dl_symbols_in_S_subframe;
  /// Number of SC-FDMA symbols in UL portion of S-subframe
  uint16_t ul_symbols_in_S_subframe;
Xiwen JIANG's avatar
Xiwen JIANG committed
603
  /// Number of Physical transmit antennas in node
604
  uint8_t nb_antennas_tx;
605
  /// Number of Receive antennas in node
606
  uint8_t nb_antennas_rx;
607
  /// Number of common transmit antenna ports in eNodeB (1 or 2)
Xiwen JIANG's avatar
Xiwen JIANG committed
608
  uint8_t nb_antenna_ports_eNB;
609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624
  /// PRACH_CONFIG
  PRACH_CONFIG_COMMON prach_config_common;
  /// PUCCH Config Common (from 36-331 RRC spec)
  PUCCH_CONFIG_COMMON pucch_config_common;
  /// PDSCH Config Common (from 36-331 RRC spec)
  PDSCH_CONFIG_COMMON pdsch_config_common;
  /// PUSCH Config Common (from 36-331 RRC spec)
  PUSCH_CONFIG_COMMON pusch_config_common;
  /// PHICH Config (from 36-331 RRC spec)
  PHICH_CONFIG_COMMON phich_config_common;
  /// SRS Config (from 36-331 RRC spec)
  SOUNDINGRS_UL_CONFIG_COMMON soundingrs_ul_config_common;
  /// UL Power Control (from 36-331 RRC spec)
  UL_POWER_CONTROL_CONFIG_COMMON ul_power_control_config_common;
  /// Number of MBSFN Configurations
  int num_MBSFN_config;
625
  /// Array of MBSFN Configurations (max 8 (maxMBSFN-Allocations) elements as per 36.331)
626 627
  MBSFN_config_t MBSFN_config[8];
  /// Maximum Number of Retransmissions of RRCConnectionRequest (from 36-331 RRC Spec)
628
  uint8_t maxHARQ_Msg3Tx;
629
  /// Size of SI windows used for repetition of one SI message (in frames)
630
  uint8_t SIwindowsize;
631
  /// Period of SI windows used for repetition of one SI message (in frames)
632
  uint16_t SIPeriod;
633
  /// REGs assigned to PCFICH
634
  uint16_t pcfich_reg[4];
635
  /// Index of first REG assigned to PCFICH
636
  uint8_t pcfich_first_reg_idx;
637
  /// REGs assigned to PHICH
638
  uint16_t phich_reg[MAX_NUM_PHICH_GROUPS][3];
639 640 641

  struct MBSFN_SubframeConfig *mbsfn_SubframeConfig[MAX_MBSFN_AREA];

Matthieu Kanj's avatar
Matthieu Kanj committed
642 643 644 645 646
  ////////////////////////// NB-IoT testing //////////////////////////////
  uint8_t subcarrier_spacing;

  NPUSCH_CONFIG_COMMONx npusch_config_common;
  ///////////////////////////////////////////////////////////////////// 
Nick Ho's avatar
Nick Ho committed
647

648 649 650
} LTE_DL_FRAME_PARMS;

typedef enum {
651
  /// TM1
652
  SISO=0,
653
  /// TM2
654
  ALAMOUTI=1,
655
  /// TM3
656
  LARGE_CDD=2,
657
  /// the next 6 entries are for TM5
658 659 660 661 662 663
  UNIFORM_PRECODING11=3,
  UNIFORM_PRECODING1m1=4,
  UNIFORM_PRECODING1j=5,
  UNIFORM_PRECODING1mj=6,
  PUSCH_PRECODING0=7,
  PUSCH_PRECODING1=8,
664
  /// the next 3 entries are for TM4
665 666
  DUALSTREAM_UNIFORM_PRECODING1=9,
  DUALSTREAM_UNIFORM_PRECODINGj=10,
Raymond Knopp's avatar
 
Raymond Knopp committed
667
  DUALSTREAM_PUSCH_PRECODING=11,
668 669 670
  TM7=12,
  TM8=13,
  TM9_10=14
671 672
} MIMO_mode_t;

673 674 675 676 677 678 679 680 681
typedef enum {
  /// MRT
  MRT=0,
  /// ZF
  ZF=1,
  /// MMSE
  MMSE=2
} PRECODE_TYPE_t;

682
typedef struct {
683 684 685 686 687
  /// \brief Holds the transmit data in time domain.
  /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: tx antenna [0..nb_antennas_tx[
  /// - third index:
688
  int32_t **txdata[3];
689
  /// \brief holds the transmit data in the frequency domain.
Xiwen JIANG's avatar
Xiwen JIANG committed
690
  /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
691
  /// - first index: eNB id [0..2] (hard coded)
Xiwen JIANG's avatar
Xiwen JIANG committed
692
  /// - second index: tx antenna [0..14[ where 14 is the total supported antenna ports.
693
  /// - third index: sample [0..]
694
  int32_t **txdataF[3];
Xiwen JIANG's avatar
Xiwen JIANG committed
695 696 697 698 699
  /// \brief holds the transmit data after beamforming in the frequency domain.
  /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER. //?
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: tx antenna [0..nb_antennas_tx[
  /// - third index: sample [0..]
700
  int32_t **txdataF_BF[3];
701 702
  /// \brief Holds the received data in time domain.
  /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
703
  /// - first index: sector id [0..2] (hard coded)
704 705
  /// - second index: rx antenna [0..nb_antennas_rx[
  /// - third index: sample [0..]
706
  int32_t **rxdata[3];
707
  /// \brief Holds the last subframe of received data in time domain after removal of 7.5kHz frequency offset.
708
  /// - first index: secotr id [0..2] (hard coded)
709 710
  /// - second index: rx antenna [0..nb_antennas_rx[
  /// - third index: sample [0..samples_per_tti[
711
  int32_t **rxdata_7_5kHz[3];
712
  /// \brief Holds the received data in the frequency domain.
713
  /// - first index: sector id [0..2] (hard coded)
714 715
  /// - second index: rx antenna [0..nb_antennas_rx[
  /// - third index: ? [0..2*ofdm_symbol_size*frame_parms->symbols_per_tti[
716
  int32_t **rxdataF[3];
717
  /// \brief Holds output of the sync correlator.
718
  /// - first index: sector id [0..2] (hard coded)
719
  /// - second index: sample [0..samples_per_tti*10[
720
  uint32_t *sync_corr[3];
Xiwen JIANG's avatar
Xiwen JIANG committed
721
  /// \brief Holds the beamforming weights
722
  /// - first index: eNB id [0..2] (hard coded)
723
  /// - second index: eNB antenna port index (hard coded)
724 725 726
  /// - third index: tx antenna [0..nb_antennas_tx[
  /// - fourth index: sample [0..]
  int32_t **beam_weights[3][15];
727 728
  /// \brief Holds the tdd reciprocity calibration coefficients
  /// - first index: eNB id [0..2] (hard coded)
729 730
  /// - second index: tx antenna [0..nb_antennas_tx[
  /// - third index: frequency [0..]
731
  int32_t **tdd_calib_coeffs[3];
732 733
} LTE_eNB_COMMON;

734
typedef struct {
735
  /// \brief Hold the channel estimates in frequency domain based on SRS.
736
  /// - first index: sector id [0..2] (hard coded)
737 738
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..ofdm_symbol_size[
739
  int32_t **srs_ch_estimates[3];
740
  /// \brief Hold the channel estimates in time domain based on SRS.
741
  /// - first index: sector id [0..2] (hard coded)
742 743
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..2*ofdm_symbol_size[
744
  int32_t **srs_ch_estimates_time[3];
745 746
  /// \brief Holds the SRS for channel estimation at the RX.
  /// - first index: ? [0..ofdm_symbol_size[
747
  int32_t *srs;
748 749
} LTE_eNB_SRS;

750
typedef struct {
751
  /// \brief Holds the received data in the frequency domain for the allocated RBs in repeated format.
752
  /// - first index: sector id [0..2] (hard coded)
753 754 755 756
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..2*ofdm_symbol_size[
  /// - third index (definition from phy_init_lte_eNB()): ? [0..24*N_RB_UL*frame_parms->symbols_per_tti[
  /// \warning inconsistent third index definition
757
  int32_t **rxdataF_ext[3];
758
  /// \brief Holds the received data in the frequency domain for the allocated RBs in normal format.
759
  /// - first index: sector id [0..2] (hard coded)
760 761
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index (definition from phy_init_lte_eNB()): ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
762
  int32_t **rxdataF_ext2[3];
763
  /// \brief Hold the channel estimates in time domain based on DRS.
764
  /// - first index: sector id [0..2] (hard coded)
765 766
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..4*ofdm_symbol_size[
767
  int32_t **drs_ch_estimates_time[3];
768
  /// \brief Hold the channel estimates in frequency domain based on DRS.
769
  /// - first index: sector id [0..2] (hard coded)
770 771
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
772
  int32_t **drs_ch_estimates[3];
773
  /// \brief Hold the channel estimates for UE0 in case of Distributed Alamouti Scheme.
774
  /// - first index: sector id [0..2] (hard coded)
775 776
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
777
  int32_t **drs_ch_estimates_0[3];
778
  /// \brief Hold the channel estimates for UE1 in case of Distributed Almouti Scheme.
779
  /// - first index: sector id [0..2] (hard coded)
780 781
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
782
  int32_t **drs_ch_estimates_1[3];
783
  /// \brief Holds the compensated signal.
784
  /// - first index: sector id [0..2] (hard coded)
785 786
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
787
  int32_t **rxdataF_comp[3];
788
  /// \brief Hold the compensated data (y)*(h0*) in case of Distributed Alamouti Scheme.
789
  /// - first index: sector id [0..2] (hard coded)
790 791
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
792
  int32_t **rxdataF_comp_0[3];
793
  /// \brief Hold the compensated data (y*)*(h1) in case of Distributed Alamouti Scheme.
794
  /// - first index: sector id [0..2] (hard coded)
795 796
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
797
  int32_t **rxdataF_comp_1[3];
798
  /// \brief ?.
799
  /// - first index: sector id [0..2] (hard coded)
800 801
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
802
  int32_t **ul_ch_mag[3];
803 804 805 806
  /// \brief ?.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
807
  int32_t **ul_ch_magb[3];
808 809 810 811
  /// \brief Hold the channel mag for UE0 in case of Distributed Alamouti Scheme.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
812
  int32_t **ul_ch_mag_0[3];
813 814 815 816
  /// \brief Hold the channel magb for UE0 in case of Distributed Alamouti Scheme.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
817
  int32_t **ul_ch_magb_0[3];
818 819 820 821
  /// \brief Hold the channel mag for UE1 in case of Distributed Alamouti Scheme.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
822
  int32_t **ul_ch_mag_1[3];
823 824 825 826
  /// \brief Hold the channel magb for UE1 in case of Distributed Alamouti Scheme.
  /// - first index: eNB id [0..2] (hard coded)
  /// - second index: rx antenna id [0..nb_antennas_rx[
  /// - third index: ? [0..12*N_RB_UL*frame_parms->symbols_per_tti[
827
  int32_t **ul_ch_magb_1[3];
828 829 830 831 832 833
  /// measured RX power based on DRS
  int ulsch_power[2];
  /// measured RX power based on DRS for UE0 in case of Distributed Alamouti Scheme
  int ulsch_power_0[2];
  /// measured RX power based on DRS for UE0 in case of Distributed Alamouti Scheme
  int ulsch_power_1[2];
834 835
  /// \brief llr values.
  /// - first index: ? [0..1179743] (hard coded)
836
  int16_t *llr;
837 838 839 840 841 842
#ifdef LOCALIZATION
  /// number of active subcarrier for a specific UE
  int32_t active_subcarrier;
  /// subcarrier power in dBm
  int32_t *subcarrier_power;
#endif
843 844
} LTE_eNB_PUSCH;

845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864
typedef struct {

	  /// \brief Holds the received data in the frequency domain.
	  /// - first index: rx antenna [0..nb_antennas_rx[
	  /// - second index: symbol [0..28*ofdm_symbol_size[
	  int32_t **rxdataF;

	  /// \brief Hold the channel estimates in frequency domain.
	  /// - first index: eNB id [0..6] (hard coded)
	  /// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
	  /// - third index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
	  int32_t **dl_ch_estimates[7];

	  /// \brief Hold the channel estimates in time domain (used for tracking).
	  /// - first index: eNB id [0..6] (hard coded)
	  /// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
	  /// - third index: samples? [0..2*ofdm_symbol_size[
	  int32_t **dl_ch_estimates_time[7];
}LTE_UE_COMMON_PER_THREAD;

865
typedef struct {
866 867 868 869
  /// \brief Holds the transmit data in time domain.
  /// For IFFT_FPGA this points to the same memory as PHY_vars->tx_vars[a].TX_DMA_BUFFER.
  /// - first index: tx antenna [0..nb_antennas_tx[
  /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES[
870
  int32_t **txdata;
871 872 873 874
  /// \brief Holds the transmit data in the frequency domain.
  /// For IFFT_FPGA this points to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
  /// - first index: tx antenna [0..nb_antennas_tx[
  /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES_NO_PREFIX[
875
  int32_t **txdataF;
876

877 878 879 880
  /// \brief Holds the received data in time domain.
  /// Should point to the same memory as PHY_vars->rx_vars[a].RX_DMA_BUFFER.
  /// - first index: rx antenna [0..nb_antennas_rx[
  /// - second index: sample [0..FRAME_LENGTH_COMPLEX_SAMPLES+2048[
881
  int32_t **rxdata;
882 883 884

  LTE_UE_COMMON_PER_THREAD common_vars_rx_data_per_thread[2];

885
  /// holds output of the sync correlator
886
  int32_t *sync_corr;
887
  /// estimated frequency offset (in radians) for all subcarriers
888
  int32_t freq_offset;
889
  /// eNb_id user is synched to
890
  int32_t eNb_id;
891 892 893
} LTE_UE_COMMON;

typedef struct {
894 895 896
  /// \brief Received frequency-domain signal after extraction.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
897
  int32_t **rxdataF_ext;
898 899 900 901
  /// \brief Received frequency-domain ue specific pilots.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..12*N_RB_DL[
  int32_t **rxdataF_uespec_pilots;
902 903 904
  /// \brief Received frequency-domain signal after extraction and channel compensation.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
905
  int32_t **rxdataF_comp0;
906 907 908 909
  /// \brief Received frequency-domain signal after extraction and channel compensation for the second stream. For the SIC receiver we need to store the history of this for each harq process and round
  /// - first index: ? [0..7] (hard coded) accessed via \c harq_pid
  /// - second index: ? [0..7] (hard coded) accessed via \c round
  /// - third index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
910
  /// - fourth index: ? [0..168*N_RB_DL[
911
  int32_t **rxdataF_comp1[8][8];
912 913 914
  /// \brief Downlink channel estimates extracted in PRBS.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
915
  int32_t **dl_ch_estimates_ext;
916 917 918 919 920 921
  /// \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS. For the SIC receiver we need to store the history of this for each harq process and round
  /// - first index: ? [0..7] (hard coded) accessed via \c harq_pid
  /// - second index: ? [0..7] (hard coded) accessed via \c round
  /// - third index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - fourth index: ? [0..168*N_RB_DL[
  int32_t **dl_ch_rho_ext[8][8];
922 923 924 925 926 927 928 929
  /// \brief Downlink beamforming channel estimates in frequency domain.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: samples? [0..symbols_per_tti*(ofdm_symbol_size+LTE_CE_FILTER_LENGTH)[
  int32_t **dl_bf_ch_estimates;
  /// \brief Downlink beamforming channel estimates.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
  int32_t **dl_bf_ch_estimates_ext;
930 931 932 933
  /// \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
  int32_t **dl_ch_rho2_ext;
934 935
  /// \brief Downlink PMIs extracted in PRBS and grouped in subbands.
  /// - first index: ressource block [0..N_RB_DL[
936
  uint8_t *pmi_ext;
937 938 939
  /// \brief Magnitude of Downlink Channel first layer (16QAM level/First 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
940
  int32_t **dl_ch_mag0;
941 942 943
  /// \brief Magnitude of Downlink Channel second layer (16QAM level/First 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
944
  int32_t **dl_ch_mag1[8][8];
945 946 947
  /// \brief Magnitude of Downlink Channel, first layer (2nd 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
948
  int32_t **dl_ch_magb0;
949 950 951
  /// \brief Magnitude of Downlink Channel second layer (2nd 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
952
  int32_t **dl_ch_magb1[8][8];
953 954 955
  /// \brief Cross-correlation of two eNB signals.
  /// - first index: rx antenna [0..nb_antennas_rx[
  /// - second index: symbol [0..]
956
  int32_t **rho;
957
  /// never used... always send dl_ch_rho_ext instead...
958
  int32_t **rho_i;
959 960 961
  /// \brief Pointers to llr vectors (2 TBs).
  /// - first index: ? [0..1] (hard coded)
  /// - second index: ? [0..1179743] (hard coded)
962
  int16_t *llr[2];
963
  /// \f$\log_2(\max|H_i|^2)\f$
964
  int16_t log2_maxh;
965 966 967 968
    /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer1 channel compensation
  int16_t log2_maxh0;
    /// \f$\log_2(\max|H_i|^2)\f$ //this is for TM3-4 layer2 channel commpensation
  int16_t log2_maxh1;
969 970
  /// \brief LLR shifts for subband scaling.
  /// - first index: ? [0..168*N_RB_DL[
971
  uint8_t *llr_shifts;
972 973
  /// \brief Pointer to LLR shifts.
  /// - first index: ? [0..168*N_RB_DL[
974
  uint8_t *llr_shifts_p;
975 976 977
  /// \brief Pointers to llr vectors (128-bit alignment).
  /// - first index: ? [0..0] (hard coded)
  /// - second index: ? [0..]
978
  int16_t **llr128;
979 980 981 982
  /// \brief Pointers to llr vectors (128-bit alignment).
  /// - first index: ? [0..0] (hard coded)
  /// - second index: ? [0..]
  int16_t **llr128_2ndstream;
983 984
  //uint32_t *rb_alloc;
  //uint8_t Qm[2];
985 986 987 988
  //MIMO_mode_t mimo_mode;
} LTE_UE_PDSCH;

typedef struct {
989 990 991
  /// \brief Received frequency-domain signal after extraction.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
992
  int32_t **rxdataF_ext;
993 994 995
  /// \brief Received frequency-domain signal after extraction and channel compensation.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
996
  double **rxdataF_comp;
997 998 999
  /// \brief Downlink channel estimates extracted in PRBS.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
1000
  int32_t **dl_ch_estimates_ext;
1001 1002 1003
  ///  \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
1004
  double **dl_ch_rho_ext;
1005 1006
  /// \brief Downlink PMIs extracted in PRBS and grouped in subbands.
  /// - first index: ressource block [0..N_RB_DL[
1007
  uint8_t *pmi_ext;
1008 1009 1010
  /// \brief Magnitude of Downlink Channel (16QAM level/First 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
1011
  double **dl_ch_mag;
1012 1013 1014
  /// \brief Magnitude of Downlink Channel (2nd 64QAM level).
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..]
1015
  double **dl_ch_magb;
1016 1017 1018
  /// \brief Cross-correlation of two eNB signals.
  /// - first index: rx antenna [0..nb_antennas_rx[
  /// - second index: ? [0..]
1019 1020
  double **rho;
  /// never used... always send dl_ch_rho_ext instead...
1021
  double **rho_i;
1022 1023 1024
  /// \brief Pointers to llr vectors (2 TBs).
  /// - first index: ? [0..1] (hard coded)
  /// - second index: ? [0..1179743] (hard coded)
1025
  int16_t *llr[2];
1026
  /// \f$\log_2(\max|H_i|^2)\f$
1027
  uint8_t log2_maxh;
1028 1029 1030
  /// \brief Pointers to llr vectors (128-bit alignment).
  /// - first index: ? [0..0] (hard coded)
  /// - second index: ? [0..]
1031 1032 1033
  int16_t **llr128;
  //uint32_t *rb_alloc;
  //uint8_t Qm[2];
1034 1035 1036 1037
  //MIMO_mode_t mimo_mode;
} LTE_UE_PDSCH_FLP;

typedef struct {
1038
  /// \brief Pointers to extracted PDCCH symbols in frequency-domain.
1039 1040
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
1041
  int32_t **rxdataF_ext;
1042 1043 1044
  /// \brief Pointers to extracted and compensated PDCCH symbols in frequency-domain.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
1045
  int32_t **rxdataF_comp;
1046 1047 1048
  /// \brief Pointers to extracted channel estimates of PDCCH symbols.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
1049
  int32_t **dl_ch_estimates_ext;
1050 1051 1052
  /// \brief Pointers to channel cross-correlation vectors for multi-eNB detection.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..168*N_RB_DL[
1053
  int32_t **dl_ch_rho_ext;
1054 1055 1056
  /// \brief Pointers to channel cross-correlation vectors for multi-eNB detection.
  /// - first index: rx antenna [0..nb_antennas_rx[
  /// - second index: ? [0..]
1057
  int32_t **rho;
1058 1059
  /// \brief Pointer to llrs, 4-bit resolution.
  /// - first index: ? [0..48*N_RB_DL[
1060
  uint16_t *llr;
1061 1062
  /// \brief Pointer to llrs, 16-bit resolution.
  /// - first index: ? [0..96*N_RB_DL[
1063
  uint16_t *llr16;
1064 1065
  /// \brief \f$\overline{w}\f$ from 36-211.
  /// - first index: ? [0..48*N_RB_DL[
1066
  uint16_t *wbar;
1067 1068
  /// \brief PDCCH/DCI e-sequence (input to rate matching).
  /// - first index: ? [0..96*N_RB_DL[
1069
  int8_t *e_rx;
1070
  /// number of PDCCH symbols in current subframe
1071
  uint8_t num_pdcch_symbols;
1072
  /// Allocated CRNTI for UE
1073
  uint16_t crnti;
1074 1075
  /// 1: the allocated crnti is Temporary C-RNTI / 0: otherwise
  uint8_t crnti_is_temporary;
1076
  /// Total number of PDU errors (diagnostic mode)
1077
  uint32_t dci_errors;
1078
  /// Total number of PDU received
1079
  uint32_t dci_received;
1080
  /// Total number of DCI False detection (diagnostic mode)
1081
  uint32_t dci_false;
1082
  /// Total number of DCI missed (diagnostic mode)
1083
  uint32_t dci_missed;
1084
  /// nCCE for PUCCH per subframe
1085
  uint8_t nCCE[10];
1086 1087 1088 1089
} LTE_UE_PDCCH;

#define PBCH_A 24
typedef struct {
1090 1091 1092
  uint8_t pbch_d[96+(3*(16+PBCH_A))];
  uint8_t pbch_w[3*3*(16+PBCH_A)];
  uint8_t pbch_e[1920];
1093 1094 1095
} LTE_eNB_PBCH;

typedef struct {
1096 1097 1098
  /// \brief Pointers to extracted PBCH symbols in frequency-domain.
  /// - first index: rx antenna [0..nb_antennas_rx[
  /// - second index: ? [0..287] (hard coded)
1099
  int32_t **rxdataF_ext;
1100 1101 1102
  /// \brief Pointers to extracted and compensated PBCH symbols in frequency-domain.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..287] (hard coded)
1103
  int32_t **rxdataF_comp;
1104 1105 1106
  /// \brief Pointers to downlink channel estimates in frequency-domain extracted in PRBS.
  /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
  /// - second index: ? [0..287] (hard coded)
1107
  int32_t **dl_ch_estimates_ext;
1108 1109
  /// \brief Pointer to PBCH llrs.
  /// - first index: ? [0..1919] (hard coded)
1110
  int8_t *llr;
1111 1112
  /// \brief Pointer to PBCH decoded output.
  /// - first index: ? [0..63] (hard coded)
1113
  uint8_t *decoded_output;
1114
  /// \brief Total number of PDU errors.
1115
  uint32_t pdu_errors;
1116
  /// \brief Total number of PDU errors 128 frames ago.
1117
  uint32_t pdu_errors_last;
1118
  /// \brief Total number of consecutive PDU errors.
1119
  uint32_t pdu_errors_conseq;
1120
  /// \brief FER (in percent) .
1121
  uint32_t pdu_fer;
1122 1123 1124
} LTE_UE_PBCH;

typedef struct {
1125 1126 1127
  int16_t amp;
  int16_t *prachF;
  int16_t *prach;
1128 1129 1130
} LTE_UE_PRACH;

typedef struct {
1131 1132
  /// \brief ?.
  /// first index: ? [0..1023] (hard coded)
1133
  int16_t *prachF;
1134
  /// \brief ?.
1135
  /// first index: rx antenna [0..63] (hard coded) \note Hard coded array size indexed by \c nb_antennas_rx.
1136
  /// second index: ? [0..ofdm_symbol_size*12[
1137
  int16_t *rxsigF[64];
1138
  /// \brief local buffer to compute prach_ifft (necessary in case of multiple CCs)
1139
  /// first index: rx antenna [0..63] (hard coded) \note Hard coded array size indexed by \c nb_antennas_rx.
1140
  /// second index: ? [0..2047] (hard coded)
1141
  int16_t *prach_ifft[64];
1142 1143 1144 1145
} LTE_eNB_PRACH;

typedef struct {
  /// Preamble index for PRACH (0-63)
1146
  uint8_t ra_PreambleIndex;
1147
  /// RACH MaskIndex
1148
  uint8_t ra_RACH_MaskIndex;
1149
  /// Target received power at eNB (-120 ... -82 dBm)
1150
  int8_t ra_PREAMBLE_RECEIVED_TARGET_POWER;
1151
  /// PRACH index for TDD (0 ... 6) depending on TDD configuration and prachConfigIndex
1152
  uint8_t ra_TDD_map_index;
1153
  /// Corresponding RA-RNTI for UL-grant
1154
  uint16_t ra_RNTI;
1155
  /// Pointer to Msg3 payload for UL-grant
1156
  uint8_t *Msg3;
1157 1158 1159 1160
} PRACH_RESOURCES_t;

typedef struct {
  /// Downlink Power offset field
1161
  uint8_t dl_pow_off;
1162
  ///Subband resource allocation field
1163
  uint8_t rballoc_sub[50];
1164
  ///Total number of PRBs indicator
1165
  uint8_t pre_nb_available_rbs;
1166
} MU_MIMO_mode;
1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179

typedef enum {
  NOT_SYNCHED=0,
  PRACH=1,
  RA_RESPONSE=2,
  PUSCH=3,
  RESYNCH=4
} UE_MODE_t;



typedef enum {SF_DL, SF_UL, SF_S} lte_subframe_t;

1180 1181 1182 1183 1184 1185 1186 1187 1188
typedef enum {
  /// do not detect any DCIs in the current subframe
  NO_DCI = 0x0,
  /// detect only downlink DCIs in the current subframe
  UL_DCI = 0x1,
  /// detect only uplink DCIs in the current subframe
  DL_DCI = 0x2,
  /// detect both uplink and downlink DCIs in the current subframe
  UL_DL_DCI = 0x3} dci_detect_mode_t;
1189

1190
#endif