1 /******************************************************************************
3 * Copyright (c) 2021 Intel.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 *******************************************************************************/
19 #ifndef _FAPI_VENDOR_EXTENSION_H_
20 #define _FAPI_VENDOR_EXTENSION_H_
22 #if defined(__cplusplus)
28 #include "fapi_interface.h"
30 #define FAPI_VENDOR_MESSAGE 0x10
31 #define FAPI_VENDOR_EXT_SHUTDOWN_REQUEST 0x11
32 #define FAPI_VENDOR_EXT_SHUTDOWN_RESPONSE 0x12
35 #define FAPI_VENDOR_EXT_DL_IQ_SAMPLES 0x13
36 #define FAPI_VENDOR_EXT_UL_IQ_SAMPLES 0x14
37 #define FAPI_VENDOR_EXT_START_RESPONSE 0x15
38 #define FAPI_VENDOR_EXT_ADD_REMOVE_CORE 0x16
41 #define FAPI_VENDOR_EXT_P7_IND 0x17
43 /* ----- WLS Operation --- */
44 #define FAPI_VENDOR_MSG_HEADER_IND 0x1A
47 #define FAPI_VENDOR_MSG_PHY_ZBC_BLOCK_REQ 0x1B
49 #define MAX_SNR_COUNT (255)
50 #define FAPI_VENDOR_MAX_RXRU_NUM 16
51 #define FAPI_VENDOR_MAX_TXRU_NUM 4
52 #define FAPI_VENDOR_MAX_SRS_PORT_PER_UE 2
53 #define FAPI_VENDOR_MAX_NUM_ANT 64
56 USE_VENDOR_EPREXSSB = 1
59 // Linked list header present at the top of all messages
60 typedef struct _fapi_api_queue_elem {
61 struct _fapi_api_queue_elem *p_next;
62 // p_tx_data_elm_list used for TX_DATA.request processing
63 struct _fapi_api_queue_elem *p_tx_data_elm_list;
65 uint8_t num_message_in_block;
67 uint32_t align_offset;
69 } fapi_api_queue_elem_t,
70 *p_fapi_api_queue_elem_t;
71 /* ----------------------- */
74 #define FAPI_MAX_IQ_SAMPLE_FILE_SIZE 576
75 #define FAPI_MAX_IQ_SAMPLE_DL_PORTS 16
76 #define FAPI_MAX_IQ_SAMPLE_UL_PORTS 2
77 #define FAPI_MAX_IQ_SAMPLE_UL_VIRTUAL_PORTS 16
78 #define FAPI_MAX_IQ_SAMPLE_UL_ANTENNA 64
79 #define FAPI_MAX_IQ_SAMPLE_BUFFER_SIZE 4096
81 #define FAPI_MAX_NUM_SET_CORE_MASK ( 4 )
82 #define FAPI_MAX_MASK_OPTIONS ( 4 )
83 #define FAPI_NUM_SPLIT_OPTIONS ( 22 )
84 #define FAPI_MAX_NUM_CELLS ( 32 )
85 #define FAPI_MAX_GROUP_NUM ( 32 )
90 uint8_t carrier_aggregation_level;
91 uint8_t group_hop_flag;
92 uint8_t sequence_hop_flag;
93 // uint8_t nDMRS_type_A_pos;
94 uint8_t prach_nr_of_rx_ru;
95 uint8_t nr_of_dl_ports;
96 uint8_t nr_of_ul_ports;
97 uint16_t urllc_capable;
98 uint16_t urllc_mini_slot_mask;
99 uint8_t ssb_subc_spacing;
100 uint8_t use_vendor_EpreXSSB; // values: USE_VENDOR_EPREXSSB - use; else don't use
102 } fapi_config_req_vendor_msg_t;
112 } fapi_start_req_vendor_msg_t;
117 } fapi_stop_req_vendor_msg_t;
119 // P7 vendor extensions
121 uint8_t nr_of_antenna_ports;
124 uint8_t rx_ru_idx[FAPI_VENDOR_MAX_RXRU_NUM];
125 // open for extension for new fields from ULSCHPDUStruct
126 } fapi_vendor_ul_pusch_pdu_t;
132 uint8_t rx_ru_idx[FAPI_VENDOR_MAX_RXRU_NUM];
133 // open for extension for new fields from ULCCHUCIPDUStruct
134 } fapi_vendor_ul_pucch_pdu_t;
139 uint8_t rx_ru_idx[FAPI_VENDOR_MAX_RXRU_NUM];
140 // open for extension for new fields from SRSPDUStruct
141 } fapi_vendor_ul_srs_pdu_t;
147 fapi_vendor_ul_pusch_pdu_t pusch_pdu;
148 fapi_vendor_ul_pucch_pdu_t pucch_pdu;
149 fapi_vendor_ul_srs_pdu_t srs_pdu;
150 // open for extension for prach vendor type (as in fapi_ul_tti_req_pdu_t)
152 } fapi_vendor_ul_tti_req_pdu_t;
155 fapi_vendor_ul_tti_req_pdu_t ul_pdus[FAPI_MAX_NUMBER_UL_PDUS_PER_TTI];
159 // open for extension for new fields from PULConfigRequestStruct
160 } fapi_vendor_ul_tti_req_t;
163 uint16_t epre_ratio_of_pdcch_to_ssb;
164 uint16_t epre_ratio_of_dmrs_to_ssb;
165 // open for extension for new fields from DCIPDUStruct
166 } fapi_vendor_dl_dci_t;
171 fapi_vendor_dl_dci_t dl_dci[FAPI_MAX_NUMBER_DL_DCI];
172 } fapi_vendor_dl_pdcch_pdu_t;
175 uint16_t epre_ratio_of_pdsch_to_ssb;
176 uint16_t epre_ratio_of_dmrs_to_ssb;
177 uint8_t nr_of_antenna_ports;
179 uint8_t tx_ru_idx[FAPI_VENDOR_MAX_TXRU_NUM];
180 // open for extension for new fields from DLSCHPDUStruct
181 } fapi_vendor_dl_pdsch_pdu_t;
184 uint16_t epre_ratio_to_ssb;
186 } fapi_vendor_csi_rs_pdu_t;
192 fapi_vendor_dl_pdcch_pdu_t pdcch_pdu;
193 fapi_vendor_dl_pdsch_pdu_t pdsch_pdu;
194 fapi_vendor_csi_rs_pdu_t csi_rs_pdu;
195 // open for extension for ssb vendor types (as in fapi_dl_tti_req_pdu_t)
197 } fapi_vendor_dl_tti_req_pdu_t;
201 uint16_t lte_crs_carrier_freq_dl;
202 uint8_t lte_crs_present;
203 uint8_t lte_crs_carrier_bandwidth_dl;
204 uint8_t lte_crs_nr_of_crs_ports;
205 uint8_t lte_crs_v_shift;
206 uint8_t pdcch_precoder_en;
207 uint8_t ssb_precoder_en;
210 fapi_vendor_dl_tti_req_pdu_t pdus[FAPI_MAX_PDUS_PER_SLOT];
211 // open for extension for new fields from DLConfigRequestStruct
212 } fapi_vendor_dl_tti_req_t;
217 fapi_vendor_dl_pdcch_pdu_t pdcch_pdu_config;
218 } fapi_vendor_dci_pdu_t;
224 fapi_vendor_dci_pdu_t pdus[FAPI_MAX_NUMBER_UCI_PDUS_PER_SLOT];
225 // open for extension for new fields from ULDCIRequestStruct
226 } fapi_vendor_ul_dci_req_t;
230 // open for extension for new fields from TXRequestStruct
231 } fapi_vendor_tx_data_req_t;
234 fapi_vendor_dl_tti_req_t dl_tti_req;
235 fapi_vendor_ul_tti_req_t ul_tti_req;
236 fapi_vendor_ul_dci_req_t ul_dci_req;
237 fapi_vendor_tx_data_req_t tx_data_req;
238 } fapi_vendor_p7_msg_t;
240 // P7 vendor extensions end
244 fapi_config_req_vendor_msg_t config_req_vendor;
245 fapi_start_req_vendor_msg_t start_req_vendor;
246 fapi_stop_req_vendor_msg_t stop_req_vendor;
247 fapi_vendor_p7_msg_t p7_req_vendor;
248 } fapi_vendor_msg_t; //TODO: union?
255 } fapi_vendor_ext_shutdown_req_t;
262 } fapi_vendor_ext_shutdown_res_t;
265 int16_t nSNR[MAX_SNR_COUNT];
267 } fapi_vendor_ext_snr_t;
271 uint8_t nr_of_rx_ant;
273 uint8_t is_chan_est_pres;
275 int16_t *p_srs_chan_est[FAPI_VENDOR_MAX_SRS_PORT_PER_UE]
276 [FAPI_VENDOR_MAX_NUM_ANT];
277 } fapi_vendor_ext_srs_pdu_t;
282 fapi_vendor_ext_srs_pdu_t srs_pdus[FAPI_MAX_NUMBER_SRS_PDUS_PER_SLOT];
283 } fapi_vendor_ext_srs_ind_t;
286 uint32_t carrier_idx;
288 } fapi_vendor_ext_slot_ind_t;
291 uint32_t carrier_idx;
293 } fapi_vendor_ext_rx_data_ind_t;
296 uint32_t carrier_idx;
298 } fapi_vendor_ext_crc_ind_t;
301 uint32_t carrier_idx;
303 } fapi_vendor_ext_uci_ind_t;
307 fapi_vendor_ext_snr_t crc_snr;
308 fapi_vendor_ext_snr_t uci_snr;
309 fapi_vendor_ext_srs_ind_t srs_ind;
310 fapi_vendor_ext_slot_ind_t slot_ind;
311 fapi_vendor_ext_rx_data_ind_t rx_data_ind;
312 fapi_vendor_ext_crc_ind_t crc_ind;
313 fapi_vendor_ext_uci_ind_t uci_ind;
314 } fapi_vendor_p7_ind_msg_t;
319 uint32_t numSubframes;
320 uint32_t nIsRadioMode;
321 uint32_t timerModeFreqDomain;
322 uint32_t phaseCompensationEnable;
323 uint32_t startFrameNum;
324 uint32_t startSlotNum;
325 uint32_t startSymNum;
326 char filename_in_ul_iq[FAPI_MAX_IQ_SAMPLE_UL_VIRTUAL_PORTS]
327 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
328 char filename_in_ul_iq_compressed[FAPI_MAX_IQ_SAMPLE_UL_VIRTUAL_PORTS]
329 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
330 char filename_in_prach_iq[FAPI_MAX_IQ_SAMPLE_UL_VIRTUAL_PORTS]
331 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
332 char filename_in_srs_iq[FAPI_MAX_IQ_SAMPLE_UL_ANTENNA]
333 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
334 char filename_out_dl_iq[FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
335 char filename_out_dl_beam[FAPI_MAX_IQ_SAMPLE_DL_PORTS]
336 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
337 char filename_out_ul_beam[FAPI_MAX_IQ_SAMPLE_UL_VIRTUAL_PORTS]
338 [FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
339 char filename_out_dl_iq_compressed[FAPI_MAX_IQ_SAMPLE_FILE_SIZE];
341 /* DL Compression add */
342 uint16_t nDLCompressionIdx;
343 uint16_t nDLCompiqWidth;
344 uint16_t nDLCompScaleFactor;
345 uint16_t nDLCompreMask;
347 /*nULDecompressionIdx, determine the UL Decompression method, Value:0->4*/
348 /*0:NONE, 1:BLKFLOAT, 2:BLKSCALE, 3:ULAW, 4:MODULATION*/
349 uint16_t nULDecompressionIdx;
350 uint16_t nULDecompiqWidth;
352 uint8_t buffer[FAPI_MAX_IQ_SAMPLE_BUFFER_SIZE];
353 } fapi_vendor_ext_iq_samples_info_t;
357 fapi_vendor_ext_iq_samples_info_t iq_samples_info;
358 } fapi_vendor_ext_iq_samples_req_t;
362 } fapi_vendor_ext_dl_iq_samples_res_t;
366 } fapi_vendor_ext_ul_iq_samples_res_t;
370 } fapi_vendor_ext_start_response_t;
374 uint64_t nCoreMask[FAPI_MAX_MASK_OPTIONS][FAPI_MAX_NUM_SET_CORE_MASK];
375 uint32_t nMacOptions[FAPI_NUM_SPLIT_OPTIONS];
376 uint8_t nPuschInterOptions[FAPI_MAX_NUM_CELLS][FAPI_MAX_GROUP_NUM];
377 } fapi_vendor_ext_add_remove_core_info_t;
381 fapi_vendor_ext_add_remove_core_info_t add_remove_core_info;
382 } fapi_vendor_ext_add_remove_core_msg_t;
385 #if defined(__cplusplus)
388 #endif // FAPI_VENDOR_EXTENSION_H_