Update to odulow per maintenance bronze
[o-du/phy.git] / fapi_5g / include / fapi_interface.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2019 Intel.
4 *
5 *   Licensed under the Apache License, Version 2.0 (the "License");
6 *   you may not use this file except in compliance with the License.
7 *   You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *   Unless required by applicable law or agreed to in writing, software
12 *   distributed under the License is distributed on an "AS IS" BASIS,
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *   See the License for the specific language governing permissions and
15 *   limitations under the License.
16 *
17 *******************************************************************************/
18
19 #ifndef _FAPI_INTERFACE_H_
20 #define _FAPI_INTERFACE_H_
21
22 #if defined(__cplusplus)
23 extern "C" {
24 #endif
25
26 #include "stdint.h"
27
28 #define FAPI_PARAM_REQUEST                                                                      0x00
29 #define FAPI_PARAM_RESPONSE                                                                     0x01
30 #define FAPI_CONFIG_REQUEST                                                                     0x02
31 #define FAPI_CONFIG_RESPONSE                                                            0x03
32 #define FAPI_START_REQUEST                                                                      0x04
33 #define FAPI_STOP_REQUEST                                                                       0x05
34 #define FAPI_STOP_INDICATION                                                            0x06
35 #define FAPI_ERROR_INDICATION                               0x07
36 // Reserved 0x08 - 0x0F and 0x02 - 0x7f
37 // 0x01 - 0x1F is used in vendor extension
38
39 #define FAPI_DL_TTI_REQUEST                                                             0x80
40 #define FAPI_UL_TTI_REQUEST                                                             0x81
41 #define FAPI_SLOT_INDICATION                                                            0x82
42 #define FAPI_UL_DCI_REQUEST                                                             0x83
43 #define FAPI_TX_DATA_REQUEST                                                            0x84
44 #define FAPI_RX_DATA_INDICATION                                                         0x85
45 #define FAPI_CRC_INDICATION                                                             0x86
46 #define FAPI_UCI_INDICATION                                                             0x87
47 #define FAPI_SRS_INDICATION                                                             0x88
48 #define FAPI_RACH_INDICATION                                                            0x89
49 // Reserved 0x8a -0xff
50
51 // Tags per 5G FAPI
52 // Cell Parameters
53 #define FAPI_RELEASE_CAPABILITY_TAG                                             0x0001
54 #define FAPI_PHY_STATE_TAG                                                  0x0002
55 #define FAPI_SKIP_BLANK_DL_CONFIG_TAG                                           0x0003
56 #define FAPI_SKIP_BLANK_UL_CONFIG_TAG                                   0x0004
57 #define FAPI_NUM_CONFIG_TLVS_TO_REPORT_TYPE_TAG                         0x0005
58 #define FAPI_CYCLIC_PREFIX_TAG                              0x0006
59 // PDCCH Parameters
60 #define FAPI_SUPPORTED_SUBCARRIER_SPACING_DL_TAG                    0x0007
61 #define FAPI_SUPPORTED_BANDWIDTH_DL_TAG                                     0x0008
62 #define FAPI_SUPPORTED_SUBCARRIER_SPACING_UL_TAG                        0x0009
63 #define FAPI_SUPPORTED_BANDWIDTH_UL_TAG                                         0x000A
64 #define FAPI_CCE_MAPPING_TYPE_TAG                                               0x000B
65 #define FAPI_CORESET_OUTSIDE_FIRST_3_OFDM_SYMS_OF_SLOT_TAG      0x000c
66 #define FAPI_PRECODER_GRANULARITY_CORESET_TAG                           0x000d
67 #define FAPI_PDCCH_MU_MIMO_TAG                                                          0x000e
68 #define FAPI_PDCCH_PRECODER_CYCLING_TAG                                     0x000f
69 #define FAPI_MAX_PDCCHS_PER_SLOT_TAG                                    0x0010
70 // PUCCH Parameters
71 #define FAPI_PUCCH_FORMATS_TAG                                                  0x0011
72 #define FAPI_MAX_PUCCHS_PER_SLOT_TAG                                        0x0012
73 // PDSCH Parameters
74 #define FAPI_PDSCH_MAPPING_TYPE_TAG                                             0x0013
75 #define FAPI_PDSCH_ALLOCATION_TYPES_TAG                         0x0014
76 #define FAPI_PDSCH_VRB_TO_PRB_MAPPING_TAG                                       0x0015
77 #define FAPI_PDSCH_CBG_TAG                                                          0x0016
78 #define FAPI_PDSCH_DMRS_CONFIG_TYPES_TAG                                        0x0017
79 #define FAPI_PDSCH_DMRS_MAX_LENGTH_TAG                                          0x0018
80 #define FAPI_PDSCH_DMRS_ADDITIONAL_POS_TAG                                      0x0019
81 #define FAPI_MAX_PDSCHS_TBS_PER_SLOT_TAG                                        0x001a
82 #define FAPI_MAX_NUMBER_MIMO_LAYERS_PDSCH_TAG                           0x001b
83 #define FAPI_SUPPORTED_MAX_MODULATION_ORDER_DL_TAG                  0x001c
84 #define FAPI_MAX_MU_MIMO_USERS_DL_TAG                                           0x001d
85 #define FAPI_PDSCH_DATA_IN_DMRS_SYMBOLS_TAG                                 0x001e
86 #define FAPI_PREMPTIONSUPPORT_TAG                                                       0x001f
87 #define FAPI_PDSCH_NON_SLOT_SUPPORT_TAG                                     0x0020
88 // PUSCH Parameters
89 #define FAPI_UCI_MUX_ULSCH_IN_PUSCH_TAG                             0x0021
90 #define FAPI_UCI_ONLY_PUSCH_TAG                                         0x0022
91 #define FAPI_PUSCH_FREQUENCY_HOPPING_TAG                                    0x0023
92 #define FAPI_PUSCH_DMRS_CONFIG_TYPES_TAG                                0x0024
93 #define FAPI_PUSCH_DMRS_MAX_LEN_TAG                                             0x0025
94 #define FAPI_PUSCH_DMRS_ADDITIONAL_POS_TAG                                  0x0026
95 #define FAPI_PUSCH_CBG_TAG                                  0x0027
96 #define FAPI_PUSCH_MAPPING_TYPE_TAG                         0x0028
97 #define FAPI_PUSCH_ALLOCATION_TYPES_TAG                     0x0029
98 #define FAPI_PUSCH_VRB_TO_PRB_MAPPING_TAG                   0x002a
99 #define FAPI_PUSCH_MAX_PTRS_PORTS_TAG                       0x002b
100 #define FAPI_MAX_PDUSCHS_TBS_PER_SLOT_TAG                   0x002c
101 #define FAPI_MAX_NUMBER_MIMO_LAYERS_NON_CB_PUSCH_TAG        0x002d
102 #define FAPI_SUPPORTED_MODULATION_ORDER_UL_TAG              0x002e
103 #define FAPI_MAX_MU_MIMO_USERS_UL_TAG                       0x002f
104 #define FAPI_DFTS_OFDM_SUPPORT_TAG                          0x0030
105 #define FAPI_PUSCH_AGGREGATION_FACTOR_TAG                   0x0031
106 // PRACH Parameters
107 #define FAPI_PRACH_LONG_FORMATS_TAG                         0x0032
108 #define FAPI_PRACH_SHORT_FORMATS_TAG                        0x0033
109 #define FAPI_PRACH_RESTRICTED_SETS_TAG                      0x0034
110 #define FAPI_MAX_PRACH_FD_OCCASIONS_IN_A_SLOT_TAG           0x0035
111 // Measurement Parameters
112 #define FAPI_RSSI_MEASUREMENT_SUPPORT_TAG                   0x0036
113
114 // CONFIG TLV TAGS per 5G FAPI
115 // Carrier Configuration
116 #define FAPI_DL_BANDWIDTH_TAG                               0x1001
117 #define FAPI_DL_FREQUENCY_TAG                               0x1002
118 #define FAPI_DL_K0_TAG                                      0x1003
119 #define FAPI_DL_GRIDSIZE_TAG                                0x1004
120 #define FAPI_NUM_TX_ANT_TAG                                 0x1005
121 #define FAPI_UPLINK_BANDWIDTH_TAG                           0x1006
122 #define FAPI_UPLINK_FREQUENCY_TAG                           0x1007
123 #define FAPI_UL_K0_TAG                                      0x1008
124 #define FAPI_UL_GRID_SIZE_TAG                               0x1009
125 #define FAPI_NUM_RX_ANT_TAG                                 0x100a
126 #define FAPI_FREQUENCY_SHIFT_7P5_KHZ_TAG                    0x100b
127 // Cell Configuration
128 #define FAPI_PHY_CELL_ID_TAG                                0x100c
129 #define FAPI_FRAME_DUPLEX_TYPE_TAG                          0x100d
130 // SSB Configuration
131 #define FAPI_SS_PBCH_POWER_TAG                              0x100e
132 #define FAPI_BCH_PAYLOAD_TAG                                0x100f
133 #define FAPI_SCS_COMMON_TAG                                 0x1010
134 // PRACH Configuration
135 #define FAPI_PRACH_SEQUENCE_LENGTH_TAG                      0x1011
136 #define FAPI_PRACH_SUBC_SPACING_TAG                         0x1012
137 #define FAPI_RESTRICTED_SET_CONFIG_TAG                      0x1013
138 #define FAPI_NUM_PRACH_FD_OCCASIONS_TAG                     0x1014
139 #define FAPI_PRACH_ROOT_SEQUENCE_INDEX_TAG                  0x1015
140 #define FAPI_NUM_ROOT_SEQUENCES_TAG                         0x1016
141 #define FAPI_K1_TAG                                         0x1017
142 #define FAPI_PRACH_ZERO_CORR_CONF_TAG                       0x1018
143 #define FAPI_NUM_UNUSED_ROOT_SEQUENCES_TAG                  0x1019
144 #define FAPI_UNUSED_ROOT_SEQUENCES_TAG                      0x101a
145 #define FAPI_SSB_PER_RACH_TAG                               0x101b
146 #define FAPI_PRACH_MULTIPLE_CARRIERS_IN_A_BAND_TAG          0x101c
147 // SSB Table
148 #define FAPI_SSB_OFFSET_POINT_A_TAG                         0x101d
149 #define FAPI_BETA_PSS_TAG                                   0x101e
150 #define FAPI_SSB_PERIOD_TAG                                 0x101f
151 #define FAPI_SSB_SUBCARRIER_OFFSET_TAG                      0x1020
152 #define FAPI_MIB_TAG                                        0x1021
153 #define FAPI_SSB_MASK_TAG                                   0x1022
154 #define FAPI_BEAM_ID_TAG                                    0x1023
155 #define FAPI_SS_PBCH_MULTIPLE_CARRIERS_IN_A_BAND_TAG        0x1024
156 #define FAPI_MULTIPLE_CELLS_SS_PBCH_IN_A_CARRIER_TAG        0x1025
157 // TDD Table
158 #define FAPI_TDD_PERIOD_TAG                                 0x1026
159 #define FAPI_SLOT_CONFIG_TAG                                0x1027
160 // Measurement Configuration
161 #define FAPI_RSSI_MEASUREMENT_TAG                           0x1028
162 // Prach Configuration Index
163 #define FAPI_PRACH_CONFIG_INDEX_TAG                                                     0x1029
164 // DMRS-TypeA Pos
165 #define FAPI_DMRS_TYPE_A_POS_TAG                                                        0x102A
166
167 // Error Codes updated per 5G FAPI Table 3-31
168 #define FAPI_MSG_OK                                                                                     0x0
169 #define FAPI_MSG_INVALID_STATE                                                          0x1
170 #define FAPI_MSG_INVALID_CONFIG                                                         0x2
171 #define FAPI_MSG_SFN_OUT_OF_SYNC                                                        0x3
172 #define FAPI_MSG_SLOT_ERR                                                               0x4
173 #define FAPI_MSG_BCH_MISSING                                                            0x5
174 #define FAPI_MSG_INVALID_SFN                                                            0x6
175 #define FAPI_MSG_UL_DCI_ERR                                                                     0x7
176 #define FAPI_MSG_TX_ERR                                                                         0x8
177
178 // 5G FAPI Definitions
179 #define FAPI_NUMEROLOGIES                                   5
180 #define FAPI_MAX_NUM_UNUSED_ROOT_SEQUENCES                  63  // 38.331 page 383
181 #define FAPI_MAX_NUM_PRACH_FD_OCCASIONS                     64  // 38.331 page 383
182 #define FAPI_MAX_NUM_OF_SYMBOLS_PER_SLOT                    14
183 #define FAPI_MAX_TDD_PERIODICITY                            160 // 38.212 11.1 for u=4 and P=10 ms
184 // m=p*q with p number of panels and q number of TxRU/RxRU per panel,
185 // depends on the RF configuration, currently n=m=4, q=1, p=4 and k=21
186 // (number of beams per pannel). n number of antenna ports
187 #define FAPI_MAX_NUMBER_TX_RUS                              4
188 #define FAPI_MAX_NUMBER_OF_BEAMS                            64  // Intel API Page 27
189 #define FAPI_MAX_NUM_ANT_PORTS                              8   // Based on current RF
190 #define FAPI_MAX_NUM_LAYERS                                 8   // 38.211 Table 7.3.1.3-1
191 #define FAPI_MAX_NUM_TLVS_CELL_PARMS                        1505    // 5G FAPI Table 3-9  (A)
192 #define FAPI_MAX_NUM_TLVS_CARRIER_PARMS                                 27  // 5G FAPI Table 3-10 (B)
193 #define FAPI_MAX_NUM_TLVS_PDCCH_PARMS                       6   // 5G FAPI Table 3-11 (C)
194 #define FAPI_MAX_NUM_TLVS_PUCCH_PARMS                       2   // 5G FAPI Table 3-12 (D)
195 #define FAPI_MAX_NUM_TLVS_PDSCH_PARMS                       14  // 5G FAPI Table 3-13 (E)
196 #define FAPI_MAX_NUM_TLVS_PUSCH_PARMS                       17  // 5G FAPI Table 3-14 (F)
197 #define FAPI_MAX_NUM_TLVS_PRACH_PARMS                       4   // 5G FAPI Table 3-15 (G)
198 #define FAPI_MAX_NUM_TLVS_MEAS_PARMS                        1   // 5G FAPI Table 3-16 (H)
199 #define FAPI_MAX_NUM_TLVS_PARAMS                            1576    //  A+B+C+D+E+F+G+H + Padding
200 // Carrier Table 11 + Cell Config 2 + SSB Config 3 + PRACH Config 414 + SSB
201 // Table 71 + TDD Table  141 + Measurements 1
202 #define FAPI_MAX_NUM_TLVS_CONFIG                                                        1500
203
204 #define FAPI_UL_DCI_REQUEST_PDCCH_PDU                                   0
205
206 #define FAPI_MAX_NUMBER_UNSUPPORTED_TLVS                    74
207 #define FAPI_MAX_NUMBER_OF_INVALID_IDLE_ONLY_TLVS           74
208 #define FAPI_MAX_NUMBER_OF_INVALID_RUNNING_ONLY_TLVS        74
209 #define FAPI_MAX_NUMBER_OF_MISSING_TLVS                     74
210 #define FAPI_MAX_NUM_DIGBFINTERFACES                        4   // Based on RF, 5G FAPI says {0,255}
211 #define FAPI_MAX_NUM_PRGS_PER_TTI                           4   // Based on 38.214 5.1.2.3
212 #define FAPI_DCI_PAYLOAD_BYTE_LEN                           32  // Based on Intel API MAX_DCI_BIT_BYTE_LEN
213 #define FAPI_MAX_NUMBER_DL_DCI                              1   // Based on Intel API MAX_NUM_PDCCH
214 #define FAPI_MAX_NUMBER_OF_CODEWORDS_PER_PDU                2   // Based on MAX_DL_CODEWORD
215 // Based on (MAX_NUM_PDSCH*MAX_DL_CODEWORD + MAX_NUM_PDCCH + MAX_NUM_SRS +
216 // 1 PBCH/SLOT)
217 #define FAPI_MAX_NUMBER_DL_PDUS_PER_TTI                     129
218
219 #define FAPI_MAX_NUMBER_OF_UES_PER_TTI                      16  // Per common_ran_parameters.h
220 // Based on Max Tb size of 1376264 bits + 24 crc over (8848-24) and O/H
221 #define FAPI_MAX_NUM_CB_PER_TTI_IN_BYTES                    192
222
223 #define FAPI_MAX_NUM_PTRS_PORTS                             2   // Per 3GPP 38.212 Table 7.3.1.1.2-21
224 #define FAPI_MAX_NUMBER_OF_GROUPS_PER_TTI                   16  // FlexRAN API Table 33
225 #define FAPI_MAX_NUMBER_UL_PDUS_PER_TTI                     328 // (MAX_NUM_PUSCH+MAX_NUM_PUCCH+MAX_NUM_SRS+MAX_NUM_PRACH_DET)
226 #define FAPI_MAX_NUMBER_DCI_PDUS_PER_TTI                    32  // Based on MAX_NUM_PDCCH
227 #define FAPI_MAX_NUMBER_OF_TLVS_PER_PDU                     1   // one for each codeword
228 #define FAPI_MAX_NUMBER_TX_PDUS_PER_TTI                     129 // Same as FAPI_MAX_NUMBER_DL_PDUS_PER_TTI
229 // Based on 38.214 5.1.3.4, the TBS is 1376264 bits and divided by 8 and
230 // aligned to 64 bytes
231 #define FAPI_MAX_PDU_LENGTH                                 172096
232 #define FAPI_TX_DATA_PAYLOAD                                0x00
233 #define FAPI_TX_DATA_PTR_TO_PAYLOAD_32                      0x01
234 #define FAPI_TX_DATA_OFFSET_TO_PAYLOAD                      0x02
235 #define FAPI_TX_DATA_PTR_TO_PAYLOAD_64                      0x03
236
237 #define FAPI_MAX_NUMBER_OF_PDUS_PER_TTI                     129 // Same as FAPI_MAX_NUMBER_DL_PDUS_PER_TTI
238 #define FAPI_MAX_NUMBER_OF_ULSCH_PDUS_PER_SLOT              64  // NUM_PUSCH_CHAN*FAPI_MAX_NUMBER_OF_CODEWORDS_PER_PDU
239 #define FAPI_MAX_NUMBER_OF_CRCS_PER_SLOT                    32  // Based on MAX_NUM_UL_CHAN
240 #define FAPI_MAX_HARQ_INFO_LEN_BYTES                        214 // Based on 5G FAPI Table 3-70
241 #define FAPI_MAX_CSI_PART1_DATA_BYTES                       214 // Based on 5G FAPI Table 3-71
242 #define FAPI_MAX_CSI_PART2_DATA_BYTES                       214 // Based on 5G FAPI Table 3-72
243 #define FAPI_MAX_NUMBER_OF_HARQS_PER_IND                    2   // Based on 5G FAPI Table 3-68
244 #define FAPI_MAX_SR_PAYLOAD_SIZE                            1   // Based on 5G FAPI Table 3-69
245 #define FAPI_MAX_HARQ_PAYLOAD_SIZE                          214 // Based on 5G FAPI Table 3-70
246 #define FAPI_MAX_NUMBER_UCI_PDUS_PER_SLOT                   200 // Based on MAX_NUM_PUCCH
247 #define FAPI_MAX_NUMBER_RBS                                 273 // Based on MAX_NUM_OF_PRB_IN_FULL_BAND
248 #define FAPI_MAX_NUMBER_OF_REP_SYMBOLS                      4   // Based on 5g FAPI Table 3-73
249 #define FAPI_MAX_NUMBER_SRS_PDUS_PER_SLOT                   32  // Based on MAX_NUM_SRS
250 #define FAPI_MAX_NUM_PREAMBLES_PER_SLOT                     64  // Based on MAX_NUM_PRACH_DET
251 #define FAPI_MAX_NUMBER_RACH_PDUS_PER_SLOT                  64  // Based on MAX_NUM_PRACH_DET
252 #define FAPI_MAX_PDUS_PER_SLOT                                                          64
253 #define FAPI_MAX_NUM_TLVS_START                             3   // Based on Timer Mode requirement.
254 #define FAPI_MAX_NUM_TLVS_SHUTDOWN                          1   // Based on Timer Mode requirement.
255 #define FAPI_MAX_UCI_BIT_BYTE_LEN                           256
256
257     enum ul_tti_pdu_type_e {
258         FAPI_PRACH_PDU_TYPE = 0,
259         FAPI_PUSCH_PDU_TYPE,
260         FAPI_PUCCH_PDU_TYPE,
261         FAPI_SRS_PDU_TYPE,
262         FAPI_UL_TTI_PDU_TYPE_MAX
263     };
264
265     enum dl_tti_pdu_type_e {
266         FAPI_PDCCH_PDU_TYPE = 0,
267         FAPI_PDSCH_PDU_TYPE,
268         FAPI_CSIRS_PDU_TYPE,
269         FAPI_PBCH_PDU_TYPE,
270         FAPI_DL_TTI_PDU_TYPE_MAX
271     };
272
273 //------------------------------------------------------------------------------------------------------------
274 // Updated per 5G FAPI
275     typedef struct {
276         uint8_t num_msg;
277         // Can be used for Phy Id or Carrier Id  5G FAPI Table 3-2
278         uint8_t handle;
279         uint8_t pad[2];
280     } fapi_msg_header_t,
281     *p_fapi_msg_header_t;
282
283 // Updated per 5G FAPI
284     typedef struct {
285         uint16_t msg_id;
286         uint16_t pad;
287         uint32_t length;        // Length of the message body in bytes  5G FAPI Table 3-3
288     } fapi_msg_t;
289 // Updated per 5G FAPI
290     typedef struct {
291         uint16_t tag;
292         uint16_t length;        // 5G FAPI Table 3-7 Fixed part
293     } fapi_tl_t;
294 // Updated per 5G FAPI
295     typedef struct {
296         fapi_tl_t tl;
297         uint8_t value;          // TLV with byte value
298         uint8_t rsv[3];         // Per 5g FAPI 3.3.1.4 the lenght of the value parameter must be 32 bits
299     } fapi_uint8_tlv_t;
300     typedef struct {
301         fapi_tl_t tl;
302         uint8_t *value;         // TLV with unsigned 32 bit value
303     } fapi_uint8_ptr_tlv_t;
304 // Updated per 5G FAPI
305     typedef struct {
306         fapi_tl_t tl;
307         uint16_t value;         // TLV with unsigned 16 bit value
308         uint8_t rsv[2];         // Per 5g FAPI 3.3.1.4 the lenght of the value parameter must be 32 bits
309     } fapi_uint16_tlv_t;
310 // Updated per 5G FAPI
311     typedef struct {
312         fapi_tl_t tl;
313         int16_t value;          // TLV with signed 16 bit value
314         uint8_t rsv[2];         // Per 5g FAPI 3.3.1.4 the lenght of the value parameter must be 32 bits
315     } fapi_int16_tlv_t;
316 // Updated per 5G FAPI
317     typedef struct {
318         fapi_tl_t tl;
319         uint32_t value;         // TLV with unsigned 32 bit value
320     } fapi_uint32_tlv_t;
321 // Updated per 5G FAPI
322     typedef struct {
323         uint16_t tag;           // In 5G FAPI for Cell Params inside Table 3-9 under NumConfigTLVsToReport Loop
324         uint8_t length;
325         uint8_t value;
326     } fapi_config_tlv_t;
327
328     typedef struct {
329         fapi_tl_t tl;
330         uint16_t value[FAPI_NUMEROLOGIES];
331         uint16_t rsv;           // To be 32-bit aligned, if FAPI_NUMEROLOGIES changes to some other value than 5 please ensure 32 bit alignment
332     } fapi_config_num_tlv_t;
333
334 // Updated per 5G FAPI
335     typedef struct {
336         fapi_msg_t header;      // For PARAM.req message length in fapi_msg_t is zero per 5G FAPI 3.3.1.1
337     } fapi_param_req_t;
338
339 // Updated per 5G FAPI
340     typedef struct {
341         fapi_uint16_tlv_t releaseCapability;
342         fapi_uint16_tlv_t phyState;
343         fapi_uint8_tlv_t skipBlankDlConfig;
344         fapi_uint8_tlv_t skipBlankUlConfig;
345         fapi_uint16_tlv_t numTlvsToReport;
346         fapi_config_tlv_t tlvStatus[FAPI_MAX_NUM_TLVS_CONFIG];  // 5G FAPI Table 3-9
347     } fapi_cell_parms_t;
348
349 // Updated per 5G FAPI
350     typedef struct {
351         fapi_uint8_tlv_t cyclicPrefix;
352         fapi_uint8_tlv_t supportedSubcarrierSpacingDl;
353         fapi_uint16_tlv_t supportedBandwidthDl;
354         fapi_uint8_tlv_t supportedSubcarrierSpecingsUl;
355         fapi_uint16_tlv_t supportedBandwidthUl; // 5G FAPI Table 3-10
356     } fapi_carrier_parms_t;
357
358 // Updated per 5G FAPI    
359     typedef struct {
360         fapi_uint8_tlv_t cceMappingType;
361         fapi_uint8_tlv_t coresetOutsideFirst3OfdmSymsOfSlot;
362         fapi_uint8_tlv_t precoderGranularityCoreset;
363         fapi_uint8_tlv_t pdcchMuMimo;
364         fapi_uint8_tlv_t pdcchPrecoderCycling;
365         fapi_uint8_tlv_t maxPdcchsPerSlot;  // 5G FAPI Table 3-11
366     } fapi_pdcch_parms_t;
367
368 // Updated per 5G FAPI
369     typedef struct {
370         fapi_uint8_tlv_t pucchFormats;
371         fapi_uint8_tlv_t maxPucchsPerSlot;  // 5G FAPI Table 3-12
372     } fapi_pucch_parms_t;
373
374 // Updated per 5G FAPI
375     typedef struct {
376         fapi_uint8_tlv_t pdschMappingType;
377         fapi_uint8_tlv_t pdschAllocationTypes;
378         fapi_uint8_tlv_t pdschVrbToPrbMapping;
379         fapi_uint8_tlv_t pdschCbg;
380         fapi_uint8_tlv_t pdschDmrsConfigTypes;
381         fapi_uint8_tlv_t pdschDmrsMaxLength;
382         fapi_uint8_tlv_t pdschDmrsAdditionalPos;
383         fapi_uint8_tlv_t maxPdschsTBsPerSlot;
384         fapi_uint8_tlv_t maxNumberMimoLayersPdsch;
385         fapi_uint8_tlv_t supportedMaxModulationOrderDl;
386         fapi_uint8_tlv_t maxMuMimoUsersDl;
387         fapi_uint8_tlv_t pdschDataInDmrsSymbols;
388         fapi_uint8_tlv_t premptionSupport;
389         fapi_uint8_tlv_t pdschNonSlotSupport;   // 5G FAPI Table 3-13
390     } fapi_pdsch_parms_t;
391
392 // Updated per 5G FAPI
393     typedef struct {
394         fapi_uint8_tlv_t uciMuxUlschInPusch;
395         fapi_uint8_tlv_t uciOnlyPusch;
396         fapi_uint8_tlv_t puschFrequencyHopping;
397         fapi_uint8_tlv_t puschDmrsConfigTypes;
398         fapi_uint8_tlv_t puschDmrsMaxLen;
399         fapi_uint8_tlv_t puschDmrsAdditionalPos;
400         fapi_uint8_tlv_t puschCbg;
401         fapi_uint8_tlv_t puschMappingType;
402         fapi_uint8_tlv_t puschAllocationTypes;
403         fapi_uint8_tlv_t puschVrbToPrbMapping;
404         fapi_uint8_tlv_t puschMaxPtrsPorts;
405         fapi_uint8_tlv_t maxPduschsTBsPerSlot;
406         fapi_uint8_tlv_t maxNumberMimoLayersNonCbPusch;
407         fapi_uint8_tlv_t supportedModulationOrderUl;
408         fapi_uint8_tlv_t maxMuMimoUsersUl;
409         fapi_uint8_tlv_t dftsOfdmSupport;
410         fapi_uint8_tlv_t puschAggregationFactor;    // 5G FAPI Table 3-14
411     } fapi_pusch_parms_t;
412
413 // Updated per 5G FAPI
414     typedef struct {
415         fapi_uint8_tlv_t prachLongFormats;
416         fapi_uint16_tlv_t prachShortFormats;
417         fapi_uint8_tlv_t prachRestrictedSets;
418         fapi_uint8_tlv_t maxPrachFdOccasionsInASlot;    // 5G FAPI Table 3-15
419     } fapi_prach_parms_t;
420
421 // Updated per 5G FAPI
422     typedef struct {
423         fapi_uint8_tlv_t rssiMeasurementSupport;    // 5G FAPI Table 3-16
424     } fapi_meas_parms_t;
425
426 // Updated per 5G FAPI
427     typedef struct {
428         fapi_cell_parms_t cell_parms;
429         fapi_carrier_parms_t carr_parms;
430         fapi_pdcch_parms_t pdcch_parms;
431         fapi_pucch_parms_t pucch_parms;
432         fapi_pdsch_parms_t pdsch_parms;
433         fapi_pusch_parms_t pusch_parms;
434         fapi_prach_parms_t prach_parms;
435         fapi_meas_parms_t meas_parms;   // 5G FAPI Table 3-8
436     } fapi_params_t;
437
438 // Updated per 5G FAPI
439     typedef struct {
440         fapi_msg_t header;
441         uint8_t error_code;
442         uint8_t number_of_tlvs;
443         uint8_t pad[2];
444         fapi_uint16_tlv_t tlvs[FAPI_MAX_NUM_TLVS_PARAMS];   // 5G FAPI Table 3-5
445     } fapi_param_resp_t;
446
447 // Updated per 5G FAPI
448     typedef struct {
449         fapi_uint16_tlv_t dlBandwidth;
450         fapi_uint32_tlv_t dlFrequency;
451         fapi_config_num_tlv_t dlk0;
452         fapi_config_num_tlv_t dlGridSize;
453         fapi_uint16_tlv_t numTxAnt;
454         fapi_uint16_tlv_t uplinkBandwidth;
455         fapi_uint32_tlv_t uplinkFrequency;
456         fapi_config_num_tlv_t ulk0;
457         fapi_config_num_tlv_t ulGridSize;
458         fapi_uint16_tlv_t numRxAnt;
459         fapi_uint8_tlv_t frequencyShift7p5KHz;  // 5G FAPI Table 3-21
460     } fapi_carrier_config_t;
461
462 // Updated per 5G FAPI
463     typedef struct {
464         fapi_uint8_tlv_t phyCellId;
465         fapi_uint8_tlv_t frameDuplexType;   // 5G FAPI Table 3-22
466     } fapi_cell_config_t;
467
468 // Updated per 5G FAPI
469     typedef struct {
470         fapi_uint32_tlv_t ssPbchPower;
471         fapi_uint8_tlv_t bchPayload;
472         fapi_uint8_tlv_t scsCommon; // 5G FAPI Table 3-23
473     } fapi_ssb_config_t;
474
475 // Updated per 5G FAPI
476     typedef struct {
477         fapi_uint16_tlv_t prachRootSequenceIndex;
478         fapi_uint8_tlv_t numRootSequences;
479         fapi_uint16_tlv_t k1;
480         fapi_uint8_tlv_t prachZeroCorrConf;
481         fapi_uint16_tlv_t numUnusedRootSequences;   // 5G FAPI Table 3-24 Subset
482         fapi_uint16_tlv_t
483             unusedRootSequences[FAPI_MAX_NUM_UNUSED_ROOT_SEQUENCES];
484     } fapi_prachFdOccasion_t;
485
486 // Updated per 5G FAPI_
487     typedef struct {
488         fapi_uint8_tlv_t prachSequenceLength;
489         fapi_uint8_tlv_t prachSubCSpacing;
490         fapi_uint8_tlv_t restrictedSetConfig;
491         fapi_uint8_tlv_t numPrachFdOccasions;
492         fapi_uint8_tlv_t prachConfigIndex;
493         fapi_prachFdOccasion_t prachFdOccasion[FAPI_MAX_NUM_PRACH_FD_OCCASIONS];
494         fapi_uint8_tlv_t ssbPerRach;
495         fapi_uint8_tlv_t prachMultipleCarriersInABand;  // 5G FAPI Table 3-24
496     } fapi_prach_configuration_t;
497
498 //Updated per 5G FAPI
499     typedef struct {
500         fapi_uint16_tlv_t ssbOffsetPointA;
501         fapi_uint8_tlv_t betaPss;
502         fapi_uint8_tlv_t ssbPeriod;
503         fapi_uint8_tlv_t ssbSubCarrierOffset;
504         fapi_uint32_tlv_t mib;
505         fapi_uint32_tlv_t ssbMask[2];
506         fapi_uint8_tlv_t beamId[64];
507         fapi_uint8_tlv_t ssPbchMultipleCarriersInABand;
508         fapi_uint8_tlv_t multipleCellsSsPbchInACarrier; // 5G FAPI Table 3-25
509     } fapi_ssb_table_t;
510
511 // Updated per 5G FAPI
512     typedef struct {
513         fapi_uint8_tlv_t slotConfig[FAPI_MAX_NUM_OF_SYMBOLS_PER_SLOT];  // 5G FAPI Table 3-26 Subset
514     } fapi_slotconfig_t;
515
516 // Updated per 5G FAPI
517     typedef struct {
518         fapi_uint8_tlv_t tddPeriod;
519         fapi_slotconfig_t slotConfig[FAPI_MAX_TDD_PERIODICITY]; // 5G FAPI Table 3-26
520     } fapi_tdd_table_t;
521
522 // Updated per 5G FAPI
523     typedef struct {
524         fapi_uint8_tlv_t rssiMeasurement;   // 5G FAPI Table 3-27
525     } fapi_meas_config_t;
526
527 // Updated per 5G FAPI
528     typedef struct {
529         int16_t digBeamWeightRe;
530         int16_t digBeamWeightIm;    // 5G FAPI Table 3-32 Subset
531     } fapi_dig_beam_weight_t;
532
533 // Updated per 5G FAPI
534     typedef struct {
535         uint16_t beamIdx;
536         fapi_dig_beam_weight_t digBeamWeight[FAPI_MAX_NUMBER_TX_RUS];   // 5G FAPI Table 3-32 Subset
537     } fapi_dig_beam_config_t;
538
539 // Updated per 5G FAPI
540     typedef struct {
541         uint16_t numDigBeams;
542         uint16_t numTxRus;
543         fapi_dig_beam_config_t digBeam[FAPI_MAX_NUMBER_OF_BEAMS];   // 5G FAPI Table 3-32
544     } fapi_beamforming_table_t;
545
546 // Updated per 5G FAPI
547     typedef struct {
548         int16_t preCoderWeightRe;
549         int16_t preCoderWeightIm;   // 5G FAPI Table 3-33 Subset
550     } fapi_precoderWeight_t;
551
552 // Updated per 5G FAPI
553     typedef struct {
554         fapi_precoderWeight_t precoder_weight[FAPI_MAX_NUM_ANT_PORTS];  // 5G FAPI Table 3-33 Subset
555     } fapi_precoder_weight_t;
556
557 // Updated per 5G FAPI
558     typedef struct {
559         uint16_t pmIdx;
560         uint16_t numLayers;
561         uint16_t numAntPorts;
562         uint16_t pad[1];
563         fapi_precoder_weight_t precoderWeight[FAPI_MAX_NUM_LAYERS]; // 5G FAPI Table 3-33
564     } fapi_precoding_table_t;
565
566 // Updated per 5G FAPI
567     typedef struct {
568         fapi_carrier_config_t carrierConfig;
569         fapi_cell_config_t cellConfig;
570         fapi_ssb_config_t ssbConfig;
571         fapi_prach_configuration_t prachConfig;
572         fapi_ssb_table_t ssbTable;
573         fapi_tdd_table_t tddTable;
574         fapi_meas_config_t measConfig;
575         fapi_beamforming_table_t beamformingTable;
576         fapi_precoding_table_t precodingTable;  // 5G FAPI Table 3-20
577     } fapi_config_t;
578
579 // Updated per 5G FAPI 
580     typedef struct {
581         fapi_msg_t header;
582         uint8_t number_of_tlvs;
583         uint8_t pad[3];
584         fapi_uint32_tlv_t tlvs[FAPI_MAX_NUM_TLVS_CONFIG];   // 5G FAPI Table 3-17
585     } fapi_config_req_t;
586
587 // Updated per 5G FAPI
588     typedef struct {
589         fapi_msg_t header;
590         uint8_t error_code;
591         uint8_t number_of_invalid_tlvs;
592         uint8_t number_of_inv_tlvs_idle_only;
593         uint8_t number_of_inv_tlvs_running_only;
594         uint8_t number_of_missing_tlvs;
595         uint8_t pad[3];
596         fapi_uint16_tlv_t tlvs[4 * FAPI_MAX_NUM_TLVS_CONFIG];   // 5G FAPI Table 3-18
597         //   fapi_uint16_tlv_t unsupported_or_invalid_tlvs[FAPI_MAX_NUMBER_UNSUPPORTED_TLVS];
598         //   fapi_uint16_tlv_t invalid_idle_only_tlvs[FAPI_MAX_NUMBER_OF_INVALID_IDLE_ONLY_TLVS];
599         //   fapi_uint16_tlv_t invalid_running_only_tlvs[FAPI_MAX_NUMBER_OF_INVALID_RUNNING_ONLY_TLVS];
600         //   fapi_uint16_tlv_t missing_tlvs[FAPI_MAX_NUMBER_OF_MISSING_TLVS];            
601     } fapi_config_resp_t;
602
603 // Updated per 5G FAPI
604     typedef struct {
605         fapi_msg_t header;
606     } fapi_start_req_t;
607
608 // Updated per 5G FAPI
609     typedef struct {
610         fapi_msg_t header;      // Message Length is zero for STOP.request
611     } fapi_stop_req_t;
612
613 // Updated per 5G FAPI
614     typedef struct {
615         fapi_msg_t header;      // Message Length is zero for STOP.indication
616     } fapi_stop_ind_t;
617
618 // Updated per 5G FAPI
619     typedef struct {
620         fapi_msg_t header;
621         uint16_t sfn;
622         uint16_t slot;
623         uint8_t message_id;
624         uint8_t error_code;     // 5G FAPI Table 3-30
625         uint8_t pad[2];
626     } fapi_error_ind_t;
627
628 // Updated per 5G FAPI
629     typedef struct {
630         fapi_msg_t header;
631         uint16_t sfn;
632         uint16_t slot;          // 5G FAPI Table 3-34
633     } fapi_slot_ind_t;
634
635 // Updated per 5G FAPI
636     typedef struct {
637         uint16_t beamidx;       // 5G FAPI Table 3-43 subset
638     } fapi_bmi_t;
639
640 // Updated per 5G FAPI
641     typedef struct {
642         uint16_t pmIdx;
643         uint8_t pad[2];
644         fapi_bmi_t beamIdx[FAPI_MAX_NUM_DIGBFINTERFACES];   // 5G FAPI Table 3-43 subset
645     } fapi_pmi_bfi_t;
646
647 // Updated per 5G FAPI
648     typedef struct {
649         uint16_t numPrgs;
650         uint16_t prgSize;
651         uint8_t digBfInterfaces;
652         uint8_t pad[3];
653         fapi_pmi_bfi_t pmi_bfi[FAPI_MAX_NUM_PRGS_PER_TTI];  // 5G FAPI Table 3-43
654     } fapi_precoding_bmform_t;
655
656 // Updated per 5G FAPI
657     typedef struct {
658         uint16_t rnti;
659         uint16_t scramblingId;
660         uint16_t scramblingRnti;
661         uint8_t cceIndex;
662         uint8_t aggregationLevel;
663         fapi_precoding_bmform_t pc_and_bform;
664         uint8_t beta_pdcch_1_0;
665         uint8_t powerControlOffsetSS;
666         uint16_t payloadSizeBits;
667         uint8_t payload[FAPI_DCI_PAYLOAD_BYTE_LEN]; // 5G FAPI Table 3-37
668     } fapi_dl_dci_t;
669
670 // Updated per 5G FAPI
671     typedef struct {
672         uint16_t bwpSize;
673         uint16_t bwpStart;
674         uint8_t subCarrierSpacing;
675         uint8_t cyclicPrefix;
676         uint8_t startSymbolIndex;
677         uint8_t durationSymbols;
678         uint8_t freqDomainResource[6];
679         uint8_t cceRegMappingType;
680         uint8_t regBundleSize;
681         uint8_t interleaverSize;
682         uint8_t coreSetType;
683         uint16_t shiftIndex;
684         uint8_t precoderGranularity;
685         uint8_t pad;
686         uint16_t numDlDci;      // 5G FAPI Table 3-36
687         fapi_dl_dci_t dlDci[FAPI_MAX_NUMBER_DL_DCI];
688     } fapi_dl_pdcch_pdu_t;
689
690     // Updated per 5G FAPI
691     typedef struct {
692         uint16_t targetCodeRate;
693         uint8_t qamModOrder;
694         uint8_t mcsIndex;
695         uint8_t mcsTable;
696         uint8_t rvIndex;
697         uint8_t pad[2];
698         uint32_t tbSize;        // 5G FAPI Table 3-38 Subset
699     } fapi_codeword_pdu_t;
700
701     // Updated per 5G FAPI
702     typedef struct {
703         uint16_t pduBitMap;
704         uint16_t rnti;
705         uint16_t pdu_index;
706         uint16_t bwpSize;
707         uint16_t bwpStart;
708         uint8_t subCarrierSpacing;
709         uint8_t cyclicPrefix;
710         uint8_t nrOfCodeWords;
711         uint8_t pad[3];
712         fapi_codeword_pdu_t cwInfo[FAPI_MAX_NUMBER_OF_CODEWORDS_PER_PDU];
713         uint16_t dataScramblingId;
714         uint8_t nrOfLayers;
715         uint8_t transmissionScheme;
716         uint8_t refPoint;
717         uint8_t dmrsConfigType;
718         uint16_t dlDmrsSymbPos;
719         uint8_t scid;
720         uint8_t numDmrsCdmGrpsNoData;
721         uint8_t resourceAlloc;
722         uint8_t pad1;
723         uint16_t dlDmrsScramblingId;
724         uint16_t dmrsPorts;
725         uint16_t rbStart;
726         uint16_t rbSize;
727         uint8_t rbBitmap[36];
728         uint8_t vrbToPrbMapping;
729         uint8_t startSymbIndex;
730         uint8_t nrOfSymbols;
731         uint8_t ptrsPortIndex;
732         uint8_t ptrsTimeDensity;
733         uint8_t ptrsFreqDensity;
734         uint8_t ptrsReOffset;
735         uint8_t nEpreRatioOfPdschToPtrs;
736         fapi_precoding_bmform_t preCodingAndBeamforming;
737         uint8_t powerControlOffset;
738         uint8_t powerControlOffsetSS;
739         uint8_t isLastCbPresent;
740         uint8_t isInlineTbCrc;
741         uint32_t dlTbCrc;       // 5G FAPI Table 3-38
742         uint8_t mappingType;
743         uint8_t nrOfDmrsSymbols;
744         uint8_t dmrsAddPos;
745         uint8_t pad2;
746     } fapi_dl_pdsch_pdu_t;
747
748     // Updated per 5G FAPI
749     typedef struct {
750         uint16_t bwpSize;
751         uint16_t bwpStart;
752         uint8_t subCarrierSpacing;
753         uint8_t cyclicPrefix;
754         uint16_t startRb;
755         uint16_t nrOfRbs;
756         uint8_t csiType;
757         uint8_t row;
758         uint16_t freqDomain;
759         uint8_t symbL0;
760         uint8_t symbL1;
761         uint8_t cdmType;
762         uint8_t freqDensity;
763         uint16_t scramId;
764         uint8_t powerControlOffset;
765         uint8_t powerControlOffsetSs;
766         uint8_t pad[2];
767         fapi_precoding_bmform_t preCodingAndBeamforming;    // 5G FAPI Table 3-39
768     } fapi_dl_csi_rs_pdu_t;
769
770 // Updated per 5G FAPI 
771     typedef struct {
772         uint8_t dmrsTypeAPosition;
773         uint8_t pdcchConfigSib1;
774         uint8_t cellBarred;
775         uint8_t intraFreqReselection;   // 5G FAPI Table 3-42
776     } fapi_phy_mib_pdu_t;
777
778 // Updated per 5G FAPI 
779     typedef struct {
780         union {
781             uint32_t bchPayload;
782             fapi_phy_mib_pdu_t phyMibPdu;   // 5G FAPI Table 3-40 Subset
783         };
784     } fapi_bch_payload_t;
785
786     // Updated per 5G FAPI
787     typedef struct {
788         uint16_t physCellId;
789         uint8_t betaPss;
790         uint8_t ssbBlockIndex;
791         uint8_t ssbSubCarrierOffset;
792         uint8_t bchPayloadFlag;
793         uint16_t ssbOffsetPointA;
794         fapi_bch_payload_t bchPayload;
795         fapi_precoding_bmform_t preCodingAndBeamforming;    // 5G FAPI Table 3-40
796     } fapi_dl_ssb_pdu_t;
797
798 // Updated per 5G FAPI
799     typedef struct {
800         uint16_t pduType;
801         uint16_t pduSize;
802         union {
803             fapi_dl_pdcch_pdu_t pdcch_pdu;
804             fapi_dl_pdsch_pdu_t pdsch_pdu;
805             fapi_dl_csi_rs_pdu_t csi_rs_pdu;
806             fapi_dl_ssb_pdu_t ssb_pdu;  // 5G FAPI Table 3-35 Subset
807         } pdu;
808     } fapi_dl_tti_req_pdu_t;
809
810 // Updated per 5G FAPI
811     typedef struct {
812         uint8_t nUe;
813         uint8_t pad[3];
814         uint8_t pduIdx[FAPI_MAX_NUMBER_OF_UES_PER_TTI]; // 5G FAPI Subset Table 3-35 and Table 3-44
815     } fapi_ue_info_t;
816
817 // Updated per 5G FAPI
818     typedef struct {
819         fapi_msg_t header;
820         uint16_t sfn;
821         uint16_t slot;
822         uint8_t nPdus;
823         uint8_t nGroup;
824         uint8_t pad[2];
825         fapi_dl_tti_req_pdu_t pdus[FAPI_MAX_PDUS_PER_SLOT]; // 5G FAPI Table 3-35
826         fapi_ue_info_t ue_grp_info[FAPI_MAX_NUMBER_OF_GROUPS_PER_TTI];
827     } fapi_dl_tti_req_t;
828
829 // Updated per 5G FAPI
830     typedef struct {
831         uint8_t rvIndex;
832         uint8_t harqProcessId;
833         uint8_t newDataIndicator;
834         uint8_t pad;
835         uint32_t tbSize;
836         uint16_t numCb;         // 5G FAPI Table 3-47
837         uint8_t cbPresentAndPosition[2];    // Since the maximum number of Code Blocks per TCB in a CBG is 8 for 1 CW or 4 for 2CW and this is a bit field with pading to align to 32 bits
838     } fapi_pusch_data_t;
839
840 // Updated per 5G FAPI
841     typedef struct {
842         uint16_t harqAckBitLength;
843         uint16_t csiPart1BitLength;
844         uint16_t csiPart2BitLength;
845         uint8_t alphaScaling;
846         uint8_t betaOffsetHarqAck;
847         uint8_t betaOffsetCsi1;
848         uint8_t betaOffsetCsi2; // 5G FAPI Table 3-48
849         uint8_t pad[2];
850     } fapi_pusch_uci_t;
851
852 // Updated per 5G FAPI
853     typedef struct {
854         uint16_t ptrsPortIndex;
855         uint8_t ptrsDmrsPort;
856         uint8_t ptrsReOffset;   // 5G FAPI Table 3-49 Subset
857     } fapi_ptrs_info_t;
858
859 // Updated per 5G FAPI
860     typedef struct {
861         uint8_t numPtrsPorts;
862         uint8_t ptrsTimeDensity;
863         uint8_t ptrsFreqDensity;    // 5G FAPI Table 3-49 Subset
864         uint8_t ulPtrsPower;
865         fapi_ptrs_info_t ptrsInfo[FAPI_MAX_NUM_PTRS_PORTS];
866     } fapi_pusch_ptrs_t;
867
868 // Updated per 5G FAPI
869     typedef struct {
870         uint16_t lowPaprSequenceNumber;
871         uint8_t lowPaprGroupNumber;
872         uint8_t ulPtrsSampleDensity;
873         uint8_t ulPtrsTimeDensityTransformPrecoding;
874         uint8_t pad;            // 5G FAPI Table 3-50
875     } fapi_dfts_ofdm_t;
876
877 // Updated per 5G FAPI
878     typedef struct {
879         fapi_bmi_t beamIdx[FAPI_MAX_NUM_DIGBFINTERFACES];
880     } fapi_rx_bfi_t;
881
882 // Updated per 5G FAPI
883     typedef struct {
884         uint16_t numPrgs;
885         uint16_t prgSize;
886         uint8_t digBfInterface;
887         uint8_t pad[3];
888         fapi_rx_bfi_t rx_bfi[FAPI_MAX_NUM_PRGS_PER_TTI];    // 5G FAPI Table 3-53
889     } fapi_ul_rx_bmform_pdu_t;
890
891 // Updated per 5G FAPI
892     typedef struct {
893         uint16_t physCellId;
894         uint8_t numPrachOcas;
895         uint8_t prachFormat;
896         uint8_t numRa;
897         uint8_t prachStartSymbol;
898         uint16_t numCs;
899         fapi_ul_rx_bmform_pdu_t beamforming;
900     } fapi_ul_prach_pdu_t;      // 5G FAPI Table 3-45
901
902 // Updated per 5G FAPI
903     typedef struct {
904         uint16_t pduBitMap;
905         uint16_t rnti;
906         uint32_t handle;
907         uint16_t bwpSize;
908         uint16_t bwpStart;
909         uint8_t subCarrierSpacing;
910         uint8_t cyclicPrefix;
911         uint8_t mcsIndex;
912         uint8_t mcsTable;
913         uint16_t targetCodeRate;
914         uint8_t qamModOrder;
915         uint8_t transformPrecoding;
916         uint16_t dataScramblingId;
917         uint8_t nrOfLayers;
918         uint8_t dmrsConfigType;
919         uint16_t ulDmrsSymbPos;
920         uint16_t ulDmrsScramblingId;
921         uint8_t scid;
922         uint8_t numDmrsCdmGrpsNoData;
923         uint16_t dmrsPorts;
924         uint16_t nTpPuschId;
925         uint16_t tpPi2Bpsk;
926         uint8_t rbBitmap[36];
927         uint16_t rbStart;
928         uint16_t rbSize;
929         uint8_t vrbToPrbMapping;
930         uint8_t frequencyHopping;
931         uint16_t txDirectCurrentLocation;
932         uint8_t resourceAlloc;
933         uint8_t uplinkFrequencyShift7p5khz;
934         uint8_t startSymbIndex;
935         uint8_t nrOfSymbols;
936         uint8_t mappingType;
937         uint8_t nrOfDmrsSymbols;
938         uint8_t dmrsAddPos;
939         uint8_t pad;
940
941         fapi_pusch_data_t puschData;
942         fapi_pusch_uci_t puschUci;
943         fapi_pusch_ptrs_t puschPtrs;
944         fapi_dfts_ofdm_t dftsOfdm;
945         fapi_ul_rx_bmform_pdu_t beamforming;    // 5G FAPI Table 3-46
946     } fapi_ul_pusch_pdu_t;
947
948 // Updated per 5G FAPI
949     typedef struct {
950         uint16_t rnti;
951         uint8_t pad1[2];
952         uint32_t handle;
953         uint16_t bwpSize;
954         uint16_t bwpStart;
955         uint8_t subCarrierSpacing;
956         uint8_t cyclicPrefix;
957         uint8_t formatType;
958         uint8_t multiSlotTxIndicator;
959         uint8_t pi2Bpsk;
960         uint8_t pad2;
961         uint16_t prbStart;
962         uint16_t prbSize;
963         uint8_t startSymbolIndex;
964         uint8_t nrOfSymbols;
965         uint8_t freqHopFlag;
966         uint8_t groupHopFlag;
967         uint8_t sequenceHopFlag;
968         uint8_t pad3;
969         uint16_t secondHopPrb;
970         uint16_t hoppingId;
971         uint16_t initialCyclicShift;
972         uint16_t dataScramblingId;
973         uint8_t timeDomainOccIdx;
974         uint8_t preDftOccIdx;
975         uint8_t preDftOccLen;
976         uint8_t addDmrsFlag;
977         uint16_t dmrsScramblingId;
978         uint8_t dmrsCyclicShift;
979         uint8_t srFlag;
980         uint16_t bitLenHarq;
981         uint8_t pad4[2];
982         uint16_t bitLenCsiPart1;
983         uint16_t bitLenCsiPart2;
984         fapi_ul_rx_bmform_pdu_t beamforming;    // 5G FAPI Table 3-51
985     } fapi_ul_pucch_pdu_t;
986
987 // Updated per 5G FAPI
988     typedef struct {
989         uint16_t rnti;
990         uint8_t pad[2];
991         uint32_t handle;
992         uint16_t bwpSize;
993         uint16_t bwpStart;
994         uint8_t subCarrierSpacing;
995         uint8_t cyclicPrefix;
996         uint8_t numAntPorts;
997         uint8_t numSymbols;
998         uint8_t numRepetitions;
999         uint8_t timeStartPosition;
1000         uint8_t configIndex;
1001         uint8_t bandwidthIndex;
1002         uint16_t sequenceId;
1003         uint8_t combSize;
1004         uint8_t combOffset;
1005         uint8_t cyclicShift;
1006         uint8_t frequencyPosition;
1007         uint16_t frequencyShift;
1008         uint8_t frequencyHopping;
1009         uint8_t groupOrSequenceHopping;
1010         uint8_t resourceType;
1011         uint8_t pad1[2];
1012         uint16_t tSrs;
1013         uint16_t tOffset;
1014         fapi_ul_rx_bmform_pdu_t beamforming;    // 5G FAPI Table 3-52
1015     } fapi_ul_srs_pdu_t;
1016
1017 // Updated per 5G FAPI
1018     typedef struct {
1019         uint16_t pduType;
1020         uint16_t pduSize;
1021         union {
1022             fapi_ul_prach_pdu_t prach_pdu;
1023             fapi_ul_pusch_pdu_t pusch_pdu;
1024             fapi_ul_pucch_pdu_t pucch_pdu;
1025             fapi_ul_srs_pdu_t srs_pdu;
1026         } pdu;
1027     } fapi_ul_tti_req_pdu_t;    // 5G FAPI Subset Table 3-44
1028
1029 // Updated per 5G FAPI
1030     typedef struct {
1031         fapi_msg_t header;
1032         uint16_t sfn;
1033         uint16_t slot;
1034         uint8_t nPdus;
1035         uint8_t rachPresent;
1036         uint8_t nUlsch;
1037         uint8_t nUlcch;
1038         uint8_t nGroup;
1039         uint8_t pad[3];
1040         fapi_ul_tti_req_pdu_t pdus[FAPI_MAX_NUMBER_UL_PDUS_PER_TTI];    // 5G FAPI Table 3-44
1041         fapi_ue_info_t ueGrpInfo[FAPI_MAX_NUMBER_OF_GROUPS_PER_TTI];
1042     } fapi_ul_tti_req_t;
1043
1044 // Updated per 5G FAPI
1045     typedef struct {
1046         uint16_t pduType;
1047         uint16_t pduSize;
1048         fapi_dl_pdcch_pdu_t pdcchPduConfig; // 5G FAPI Table 3-54 Subset
1049     } fapi_dci_pdu_t;
1050
1051     // Updated per 5G FAPI
1052     typedef struct {
1053         fapi_msg_t header;
1054         uint16_t sfn;
1055         uint16_t slot;
1056         uint8_t numPdus;
1057         uint8_t pad[3];
1058         fapi_dci_pdu_t pdus[FAPI_MAX_NUMBER_UCI_PDUS_PER_SLOT]; // 5G FAPI Table 3-54
1059     } fapi_ul_dci_req_t;
1060
1061 // Updated per 5G FAPI
1062     typedef struct {
1063         uint32_t pdu_length;
1064         uint16_t pdu_index;
1065         uint16_t num_tlvs;
1066         fapi_uint8_ptr_tlv_t tlvs[FAPI_MAX_NUMBER_OF_TLVS_PER_PDU]; // 5G FAPI Table 3-58 Subset
1067     } fapi_tx_pdu_desc_t;
1068
1069 // Updated per 5G FAPI
1070     typedef struct {
1071         fapi_msg_t header;
1072         uint16_t sfn;
1073         uint16_t slot;
1074         uint16_t num_pdus;
1075         uint8_t pad[2];
1076         fapi_tx_pdu_desc_t pdu_desc[FAPI_MAX_NUMBER_DL_PDUS_PER_TTI];   // 5G FAPI Table 3-58
1077     } fapi_tx_data_req_t;
1078
1079 // Updated per 5G FAPI
1080     typedef struct {
1081         uint32_t handle;
1082         uint16_t rnti;
1083         uint8_t harqId;
1084         uint8_t ul_cqi;
1085         uint16_t timingAdvance;
1086         uint16_t rssi;
1087         uint16_t pdu_length;
1088         uint8_t pad[2];
1089         void *pduData;          // 5G FAPI Table 3-61 Subset
1090     } fapi_pdu_ind_info_t;
1091
1092     // Updated per 5G FAPI
1093     typedef struct {
1094         fapi_msg_t header;
1095         uint16_t sfn;
1096         uint16_t slot;
1097         uint16_t numPdus;
1098         uint8_t pad[2];
1099         fapi_pdu_ind_info_t pdus[FAPI_MAX_NUMBER_OF_ULSCH_PDUS_PER_SLOT];   // 5G FAPI Table 3-61
1100     } fapi_rx_data_indication_t;
1101
1102 // Updated per 5G FAPI
1103     typedef struct {
1104         uint32_t handle;
1105         uint16_t rnti;
1106         uint8_t harqId;
1107         uint8_t tbCrcStatus;
1108         uint8_t ul_cqi;
1109         uint8_t pad;
1110         uint16_t numCb;
1111         uint16_t timingAdvance;
1112         uint16_t rssi;
1113         uint8_t cbCrcStatus[FAPI_MAX_NUM_CB_PER_TTI_IN_BYTES];  // 5G FAPI Table 3-62 subset
1114     } fapi_crc_ind_info_t;
1115
1116 // Updated per 5G FAPI
1117     typedef struct {
1118         fapi_msg_t header;
1119         uint16_t sfn;
1120         uint16_t slot;
1121         uint16_t numCrcs;
1122         uint8_t pad[2];
1123         fapi_crc_ind_info_t crc[FAPI_MAX_NUMBER_OF_CRCS_PER_SLOT];  // 5G FAPI Table 3-62
1124     } fapi_crc_ind_t;
1125
1126 // Updated per 5G FAPI
1127     typedef struct {
1128         uint8_t harqCrc;
1129         uint8_t pad;
1130         uint16_t harqBitLen;
1131         uint8_t harqPayload[FAPI_MAX_HARQ_INFO_LEN_BYTES];  // 5G FAPI Table 3-70
1132     } fapi_harq_info_t;
1133
1134 // Updated per 5G FAPI
1135     typedef struct {
1136         uint8_t csiPart1Crc;
1137         uint8_t pad;
1138         uint16_t csiPart1BitLen;
1139         uint8_t csiPart1Payload[FAPI_MAX_CSI_PART1_DATA_BYTES]; // 5G FAPI Table 3-71
1140     } fapi_csi_p1_info_t;
1141
1142 // Updated per 5G FAPI
1143     typedef struct {
1144         uint8_t csiPart2Crc;
1145         uint8_t pad;
1146         uint16_t csiPart2BitLen;
1147         uint8_t csiPart2Payload[FAPI_MAX_CSI_PART2_DATA_BYTES]; // 5G FAPI Table 3-72
1148     } fapi_csi_p2_info_t;
1149
1150 // Updated per 5G FAPI
1151     typedef struct {
1152
1153         uint32_t handle;
1154         uint8_t pduBitmap;
1155         uint8_t ul_cqi;
1156         uint16_t rnti;
1157         uint16_t timingAdvance;
1158         uint16_t rssi;          // 5G FAPI Table 3-64
1159         fapi_harq_info_t harqInfo;  // This is included if indicated by the pduBitmap
1160         fapi_csi_p1_info_t csiPart1info;    // This is included if indicated by the pduBitmap
1161         fapi_csi_p2_info_t csiPart2info;    // This is included if indicated by the pduBitmap
1162     } fapi_uci_o_pusch_t;
1163
1164 // Updated per 5G FAPI
1165     typedef struct {
1166         uint8_t srIndication;
1167         uint8_t srConfidenceLevel;  // 5G FAPI Table 3-67
1168         uint8_t pad[2];
1169     } fapi_sr_f0f1_info_t;
1170
1171 // Updated per 5G FAPI
1172     typedef struct {
1173         uint8_t numHarq;
1174         uint8_t harqConfidenceLevel;
1175         uint8_t harqValue[FAPI_MAX_NUMBER_OF_HARQS_PER_IND];    // 5G FAPI Table 3-68
1176     } fapi_harq_f0f1_info_t;
1177
1178 // Updated per 5G FAPI
1179     typedef struct {
1180         uint16_t srBitlen;
1181         uint8_t srPayload[FAPI_MAX_SR_PAYLOAD_SIZE + 1];    // 5G FAPI Table 3-69
1182     } fapi_sr_f2f3f4_info_t;
1183
1184 // Updated per 5G FAPI
1185     typedef struct {
1186         uint8_t harqCrc;
1187         uint8_t pad;
1188         uint16_t harqBitLen;
1189         uint8_t harqPayload[FAPI_MAX_HARQ_PAYLOAD_SIZE + 2];    // 5G FAPI Table 3-70
1190     } fapi_harq_f2f3f4_info_t;
1191
1192 // Updated per 5G FAPI
1193     typedef struct {
1194         uint32_t handle;
1195         uint8_t pduBitmap;
1196         uint8_t pucchFormat;
1197         uint8_t ul_cqi;
1198         uint8_t pad;
1199         uint16_t rnti;
1200         uint16_t timingAdvance;
1201         uint16_t rssi;          // 5G FAPI Table 3-66
1202         uint16_t num_uci_bits;
1203         uint8_t uciBits[FAPI_MAX_UCI_BIT_BYTE_LEN];
1204     } fapi_uci_o_pucch_f2f3f4_t;
1205
1206 // Updated per 5G FAPI
1207     typedef struct {
1208         uint32_t handle;
1209         uint8_t pduBitmap;
1210         uint8_t pucchFormat;
1211         uint8_t ul_cqi;
1212         uint8_t pad;
1213         uint16_t rnti;
1214         uint16_t timingAdvance;
1215         uint16_t rssi;          // 5G FAPI Table 3-65
1216         uint8_t pad1[2];
1217         fapi_sr_f0f1_info_t srInfo; // This is included if indicated by the pduBitmap
1218         fapi_harq_f0f1_info_t harqInfo; // This is included if indicated by the pduBitmap
1219     } fapi_uci_o_pucch_f0f1_t;
1220
1221 // Updated per 5G FAPI
1222     typedef struct {
1223         uint16_t pduType;
1224         uint16_t pduSize;
1225         union {
1226             fapi_uci_o_pusch_t uciPusch;
1227             fapi_uci_o_pucch_f0f1_t uciPucchF0F1;
1228             fapi_uci_o_pucch_f2f3f4_t uciPucchF2F3F4;   // 5G FAPI Table 3-63 subset
1229         } uci;
1230     } fapi_uci_pdu_info_t;
1231
1232 // Updated per 5G FAPI
1233     typedef struct {
1234         fapi_msg_t header;
1235         uint16_t sfn;
1236         uint16_t slot;
1237         uint16_t numUcis;       // 5G FAPI Table 3-63
1238         uint8_t pad[2];
1239         fapi_uci_pdu_info_t uciPdu[FAPI_MAX_NUMBER_UCI_PDUS_PER_SLOT];
1240     } fapi_uci_indication_t;
1241
1242 // Updated per 5G FAPI
1243     typedef struct {
1244         uint16_t numRbs;
1245         uint8_t pad[2];
1246         uint8_t rbSNR[FAPI_MAX_NUMBER_RBS]; // 5G FAPI Table 3-73 Subset
1247     } fapi_symb_snr_t;
1248
1249 // Updated per 5G FAPI
1250     typedef struct {
1251         uint32_t handle;
1252         uint16_t rnti;
1253         uint16_t timingAdvance;
1254         uint8_t numSymbols;
1255         uint8_t wideBandSnr;
1256         uint8_t numReportedSymbols;
1257         uint8_t pad;
1258         fapi_symb_snr_t symbSnr[FAPI_MAX_NUMBER_OF_REP_SYMBOLS];    // 5G FAPI Table 3-73 subset
1259     } fapi_srs_pdu_t;
1260
1261 // Updated per 5G FAPI
1262     typedef struct {
1263         fapi_msg_t header;
1264         uint16_t sfn;
1265         uint16_t slot;
1266         uint8_t numPdus;
1267         uint8_t pad[3];
1268         fapi_srs_pdu_t srsPdus[FAPI_MAX_NUMBER_SRS_PDUS_PER_SLOT];  // 5G FAPI Table 3-73
1269     } fapi_srs_indication_t;
1270
1271 // Updated per 5G FAPI
1272     typedef struct {
1273         uint8_t preambleIndex;
1274         uint8_t pad;
1275         uint16_t timingAdvance;
1276         uint32_t preamblePwr;   // 5G FAPI Table 3-74 Subset
1277     } fapi_preamble_info_t;
1278
1279 // Updated per 5G FAPI
1280     typedef struct {
1281         uint16_t phyCellId;
1282         uint8_t symbolIndex;
1283         uint8_t slotIndex;
1284         uint8_t freqIndex;
1285         uint8_t avgRssi;
1286         uint8_t avgSnr;
1287         uint8_t numPreamble;
1288         fapi_preamble_info_t preambleInfo[FAPI_MAX_NUM_PREAMBLES_PER_SLOT]; // 5G FAPI Table 3-74 Subset
1289     } fapi_rach_pdu_t;
1290
1291 // Updated per 5G FAPI
1292     typedef struct {
1293         fapi_msg_t header;
1294         uint16_t sfn;
1295         uint16_t slot;
1296         uint8_t numPdus;
1297         uint8_t pad[3];
1298         fapi_rach_pdu_t rachPdu[FAPI_MAX_NUMBER_RACH_PDUS_PER_SLOT];    // 5G FAPI Table 3-74
1299     } fapi_rach_indication_t;
1300
1301 //------------------------------------------------------------------------------
1302
1303 #if defined(__cplusplus)
1304 }
1305 #endif
1306 #endif