mdci.h 13.7 KB
Newer Older
knopp's avatar
knopp committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 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 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 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 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 235
/*
 * 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
 */

/*! \file PHY/LTE_TRANSPORT/dci.h
 * \brief typedefs for LTE DCI structures from 36-212, V8.6 2009-03.  Limited to 5 MHz formats for the moment.Current LTE compliance V8.6 2009-03.
 * \author R. Knopp
 * \date 2011
 * \version 0.1
 * \company Eurecom
 * \email: knopp@eurecom.fr
 * \note
 * \warning
 */

#include <stdint.h>


///  basic DCI Format Type 6-0A (5 MHz, FDD, rep2, no mod order override - XX bits)
struct DCI6_0A_5MHz {
  /// padding to fill 32 bit word
  uint32_t padding:5;
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// SRS Request
  uint32_t srs_req:1;
  /// CSI Request
  uint32_t csi_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// redundancy version
  uint32_t rv_idx:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
  uint32_t rballoc:7;
  /// Hopping flag
  uint32_t hopping:1;
  /// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0A_5MHz DCI6_0A_5MHz_t; 
#define sizeof_DCI6_0A_5MHz_t 28 // extended by one bit to match DCI6_1A

/// basic DCI Format Type 6-1A (5 MHz, FDD primary carrier,  24 bits, 5 bit format, TM!=9,TM!=6, no scheduling enhancement)
struct DCI6_1A_5MHz {
  /// padding to fill 32-bit word
  uint32_t padding:4;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// SRS request 
  uint32_t srs_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// Redundancy version
  uint32_t rv:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
  uint32_t rballoc:7;
  /// Frequency hopping flag
  uint32_t hopping:1;
  /// 0/1A differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1A_5MHz DCI6_1A_5MHz_t;
#define sizeof_DCI6_1A_5MHz_t 28

///  basic DCI Format Type 6-0A (10 MHz, FDD, rep2, no mod order override - XX bits)
struct DCI6_0A_10MHz {
  /// padding to fill 32 bit word
  uint32_t padding:4;
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// SRS Request
  uint32_t srs_req:1;
  /// CSI Request
  uint32_t csi_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// redundancy version
  uint32_t rv_idx:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
  uint32_t rballoc:8;
  /// Hopping flag
  uint32_t hopping:1;
  /// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0A_10MHz DCI6_0A_10MHz_t; 
#define sizeof_DCI6_0A_10MHz_t 29 // extended by one bit to match DCI6_1A

/// basic DCI Format Type 6-1A (10 MHz, FDD primary carrier,  24 bits, 5 bit format, TM!=9,TM!=6, no scheduling enhancement)
struct DCI6_1A_10MHz {
  /// padding to fill 32-bit word
  uint32_t padding:4;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// SRS request 
  uint32_t srs_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// Redundancy version
  uint32_t rv:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// Resource block assignment (assignment flag = 0 for 10 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
  uint32_t rballoc:8;
  /// Frequency hopping flag
  uint32_t hopping:1;
  /// 0/1A differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1A_10MHz DCI6_1A_10MHz_t;
#define sizeof_DCI6_1A_10MHz_t 29

///  basic DCI Format Type 6-0A (20 MHz, FDD, rep2, no mod order override - XX bits)
struct DCI6_0A_20MHz {
  /// padding to fill 32 bit word
  uint32_t padding:4;
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// SRS Request
  uint32_t srs_req:1;
  /// CSI Request
  uint32_t csi_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// redundancy version
  uint32_t rv_idx:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 5 bits)
  uint32_t rballoc:9;
  /// Hopping flag
  uint32_t hopping:1;
  /// type = 0 => DCI Format 0, type = 1 => DCI Format 1A
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0A_20MHz DCI6_0A_20MHz_t; 
#define sizeof_DCI6_0A_20MHz_t 30 // extended by one bit to match DCI6_1A

/// basic DCI Format Type 6-1A (20 MHz, FDD primary carrier,  24 bits, 5 bit format, TM!=9,TM!=6, no scheduling enhancement)
struct DCI6_1A_20MHz {
  /// padding to fill 32-bit word
  uint32_t padding:3;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// SRS request 
  uint32_t srs_req:1;
  /// Power Control
  uint32_t TPC:2;
  /// Redundancy version
  uint32_t rv:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:3;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// Resource block assignment (assignment flag = 0 for 20 MHz, ceil(log2(floor(N_RB_DL/6)))+5)
  uint32_t rballoc:9;
  /// Frequency hopping flag
  uint32_t hopping:1;
  /// 0/1A differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1A_20MHz DCI6_1A_20MHz_t;
#define sizeof_DCI6_1A_20MHz_t 30

///  basic DCI Format Type 6-0B (5 MHz)
struct DCI6_0B_5MHz {
236 237
  /// padding to fill 32-bit word
  uint32_t padding:15;
knopp's avatar
knopp committed
238 239 240 241 242 243 244
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:1;
  /// Repetition number
245
  uint32_t rep:3;
knopp's avatar
knopp committed
246 247 248 249 250 251 252 253 254
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 3 bits)
  uint32_t rballoc:5;
  /// type = 0 => DCI Format 0B, type = 1 => DCI Format 1B
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0B_5MHz DCI6_0B_5MHz_t; 
255
#define sizeof_DCI6_0B_5MHz_t 17
knopp's avatar
knopp committed
256 257 258

/// basic DCI Format Type 6-1B (5 MHz)
struct DCI6_1B_5MHz {
259 260
  /// padding to fill 32-bit word
  uint32_t padding:15;
knopp's avatar
knopp committed
261 262 263 264 265 266 267 268 269
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:1;
  /// Repetition number
270
  uint32_t rep:3;
knopp's avatar
knopp committed
271 272 273 274 275 276 277 278 279
  /// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+1)
  uint32_t rballoc:3;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// 0B/1B differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1B_5MHz DCI6_1B_5MHz_t;
280
#define sizeof_DCI6_1B_5MHz_t 17 
knopp's avatar
knopp committed
281 282 283 284

///  basic DCI Format Type 6-0B (10 MHz)
struct DCI6_0B_10MHz {
  /// padding to fill 32-bit word
285
  uint32_t padding:14;
knopp's avatar
knopp committed
286 287 288 289 290 291 292
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:1;
  /// Repetition number
293
  uint32_t rep:3;
knopp's avatar
knopp committed
294 295 296 297 298 299 300 301 302
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 3 bits)
  uint32_t rballoc:6;
  /// type = 0 => DCI Format 0B, type = 1 => DCI Format 1B
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0B_10MHz DCI6_0B_10MHz_t; 
303
#define sizeof_DCI6_0B_10MHz_t 18
knopp's avatar
knopp committed
304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 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 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469

/// basic DCI Format Type 6-1B (10 MHz)
struct DCI6_1B_10MHz {
  /// padding to fill 32-bit word
  uint32_t padding:15;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:1;
  /// Repetition number
  uint32_t rep:2;
  /// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+1)
  uint32_t rballoc:4;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// 0B/1B differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1B_10MHz DCI6_1B_10MHz_t;
#define sizeof_DCI6_1B_10MHz_t 17 

///  basic DCI Format Type 6-0B (20 MHz)
struct DCI6_0B_20MHz {
  /// padding to fill 32-bit word
  uint32_t padding:14;
  /// DCI subframe repetition
  uint32_t dci_rep:2;
  /// new data indicator
  uint32_t ndi:1;
  /// harq id
  uint32_t harq_pid:1;
  /// Repetition number
  uint32_t rep:2;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// RB Assignment (ceil(log2(floor(N_RB_UL/6))) + 3 bits)
  uint32_t rballoc:7;
  /// type = 0 => DCI Format 0B, type = 1 => DCI Format 1B
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_0B_20MHz DCI6_0B_20MHz_t; 
#define sizeof_DCI6_0B_20MHz_t 18

/// basic DCI Format Type 6-1B (10 MHz)
struct DCI6_1B_20MHz {
  /// padding to fill 32-bit word
  uint32_t padding:14;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// HARQ-ACK resource offset
  uint32_t harq_ack_off:2;
  /// New Data Indicator
  uint32_t ndi:1;
  /// HARQ Process
  uint32_t harq_pid:1;
  /// Repetition number
  uint32_t rep:2;
  /// Resource block assignment (assignment flag = 0 for 5 MHz, ceil(log2(floor(N_RB_DL/6)))+1)
  uint32_t rballoc:5;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:4;
  /// 0B/1B differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_1B_20MHz DCI6_1B_20MHz_t;
#define sizeof_DCI6_1B_20MHz_t 18 

/// basic DCI Format Type 6-2 for paging (5 MHz)
struct DCI6_2_paging_5MHz {
  /// padding to reach 32-bits
  uint32_t padding:21;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// Repetition number
  uint32_t rep:3;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:3;
  /// Resource block assignment (ceil(log2(floor(N_RB_DL/6))) bits)
  uint32_t rballoc:2;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_2_paging_5MHz DCI6_2_paging_5MHz_t;

/// basic DCI Format Type 6-2 for direct indication (5 MHz)
struct DCI6_2_di_5MHz {
  /// padding to reach 32-bits
  uint32_t padding:23;
  /// Direct indication information
  uint32_t di_info:8;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_2_di_5MHz DCI6_2_di_5MHz_t;
#define sizeof_DCI6_2_5MHz_t 11

/// basic DCI Format Type 6-2 for paging (10 MHz)
struct DCI6_2_paging_10MHz {
  /// padding to reach 32-bits
  uint32_t padding:20;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// Repetition number
  uint32_t rep:3;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:3;
  /// Resource block assignment (ceil(log2(floor(N_RB_DL/6))))
  uint32_t rballoc:3;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));
typedef struct DCI6_2_paging_10MHz DCI6_2_paging_10MHz_t;

/// basic DCI Format Type 6-2 for direct indication (10 MHz)
struct DCI6_2_di_10MHz {
  /// padding to reach 32-bits
  uint32_t padding:23;
  /// Direct indication information
  uint32_t di_info:8;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_2_di_10MHz DCI6_2_di_10MHz_t;
#define sizeof_DCI6_2_10MHz_t 12

/// basic DCI Format Type 6-2 for paging (20 MHz)
struct DCI6_2_paging_20MHz {
  /// padding to reach 32-bits
  uint32_t padding:19;
  /// DCI subframe repetition number 
  uint32_t dci_rep:2;
  /// Repetition number
  uint32_t rep:3;
  /// Modulation and Coding Scheme and Redundancy Version
  uint32_t mcs:3;
  /// Resource block assignment (ceil(log2(floor(N_RB_DL/6))))
  uint32_t rballoc:4;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_2_paging_20MHz DCI6_2_paging_20MHz_t;

/// basic DCI Format Type 6-2 for direct indication (20 MHz)
struct DCI6_2_di_20MHz {
  /// padding to reach 32-bits
  uint32_t padding:23;
  /// Direct indication information
  uint32_t di_info:8;
  /// 0B/1B paging/directindication differentiator
  uint32_t type:1;
} __attribute__ ((__packed__));

typedef struct DCI6_2_di_20MHz DCI6_2_di_20MHz_t;
#define sizeof_DCI6_2_20MHz_t 13