1 /******************************************************************************
3 * Copyright (c) 2019 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 *******************************************************************************/
21 * @brief This file provides public interface to XRAN Front Haul layer implementation as defined in the
22 * XRAN-FH.CUS.0-v02.00 spec. Implementation is specific to lls-CU node
23 * for 5G NR Radio Access technology
25 * @file xran_fh_lls_cu.h
26 * @ingroup group_lte_source_xran
27 * @author Intel Corporation
31 #ifndef _XRAN_FH_LLS_CU_H_
32 #define _XRAN_FH_LLS_CU_H_
43 #include <sys/types.h>
44 #include <sys/queue.h>
45 #include <netinet/in.h>
53 #define XRAN_STATUS_SUCCESS (0)
56 * Success status value. */
57 #define XRAN_STATUS_FAIL (-1)
60 * Fail status value. */
62 #define XRAN_STATUS_RETRY (-2)
65 * Retry status value. */
67 #define XRAN_STATUS_RESOURCE (-3)
70 * The resource that has been requested is unavailable. Refer
71 * to relevant sections of the API for specifics on what the suggested
72 * course of action is. */
74 #define XRAN_STATUS_INVALID_PARAM (-4)
77 * Invalid parameter has been passed in. */
78 #define XRAN_STATUS_FATAL (-5)
81 * A serious error has occurred. Recommended course of action
82 * is to shutdown and restart the component. */
84 #define XRAN_STATUS_UNSUPPORTED (-6)
87 * The function is not supported, at least not with the specific
88 * parameters supplied. This may be because a particular
89 * capability is not supported by the current implementation. */
91 /** Macro to calculate TTI number [0:7999] from symbol index [0: 112000-1] used by timing thread */
92 #define XranGetTtiNum(symIdx, numSymPerTti) (((uint32_t)symIdx / (uint32_t)numSymPerTti))
93 /** Macro to calculate Symbol number [0:7] for given slot from symbol index [0: 112000-1] */
94 #define XranGetSymNum(symIdx, numSymPerTti) (((uint32_t)symIdx % (uint32_t)numSymPerTti))
95 /** Macro to calculate Frame number [0:99] for given tti [0: 7999] */
96 #define XranGetFrameNum(tti,numSubFramePerSystemFrame, numSlotPerSubFrame) ((uint32_t)tti / ((uint32_t)numSubFramePerSystemFrame * (uint32_t)numSlotPerSubFrame))
97 /** Macro to calculate Subframe number [0:9] for given tti [0: 7999] */
98 #define XranGetSubFrameNum(tti, numSlotPerSubFrame, numSubFramePerSystemFrame) (((uint32_t)tti/(uint32_t)numSlotPerSubFrame) % (uint32_t)numSubFramePerSystemFrame)
99 /** Macro to calculate Slot number [0:7] for given tti [0: 7999] */
100 #define XranGetSlotNum(tti, numSlotPerSfn) ((uint32_t)tti % ((uint32_t)numSlotPerSfn))
102 #define XRAN_PORTS_NUM (1) /**< number of XRAN ports supported */
103 #define XRAN_N_FE_BUF_LEN (80)/** Number of TTIs (slots) */
104 #define XRAN_MAX_SECTOR_NR (4) /**< Max sectors per XRAN port */
105 #define XRAN_MAX_ANTENNA_NR (4) /**< Max antenna per port */
106 #define XRAN_NUM_OF_SYMBOL_PER_SLOT ( 14 ) /**< Number of symbols per slot */
108 #define XRAN_MAX_CELLS_PER_PORT (4) /**< Max cells mapped to XRAN port */
109 #define XRAN_COMPONENT_CARRIERS_MAX XRAN_MAX_SECTOR_NR /**< number of CCs */
110 #define XRAN_NUM_OF_ANT_RADIO 16 /**< Max Number of Antennas supported for all CC on single XRAN port */
112 #define XRAN_MAX_PKT_BURST (448+4) /**< 4x14x8 symbols per ms */
113 #define XRAN_N_MAX_BUFFER_SEGMENT XRAN_MAX_PKT_BURST /**< Max number of segments per ms */
115 #define XRAN_STRICT_PARM_CHECK (1) /**< enable parameter check for C-plane */
117 //#define _XRAN_DEBUG /**< Enable debug log */
118 //#define _XRAN_VERBOSE /**< Enable verbose log */
121 #define xran_log_dbg(fmt, ...) \
123 "DEBUG: %s(%d): " fmt "\n", \
125 __LINE__, ##__VA_ARGS__)
127 #define xran_log_dbg(fmt, ...)
130 #if defined(_XRAN_DEBUG) || defined(_XRAN_VERBOSE)
131 #define xran_log_wrn(fmt, ...) \
134 "WARNING: %s(%d): " fmt "\n", \
136 __LINE__, ##__VA_ARGS__)
138 #define xran_log_dbg(fmt, ...)
139 #define xran_log_wrn(fmt, ...)
142 #define xran_log_err(fmt, ...) \
144 "ERROR: %s(%d): " fmt "\n", \
146 __LINE__, ##__VA_ARGS__)
149 ******************************************************************************
153 * Compression Method 6.3.3.13, Table 6-43
154 *****************************************************************************/
155 enum xran_compression_method {
156 XRAN_COMPMETHOD_NONE = 0,
157 XRAN_COMPMETHOD_BLKFLOAT = 1,
158 XRAN_COMPMETHOD_BLKSCALE = 2,
159 XRAN_COMPMETHOD_ULAW = 3,
160 XRAN_COMPMETHOD_MODULATION = 4,
165 ******************************************************************************
169 * Callback function type for symbol packet enum
170 *****************************************************************************/
171 enum callback_to_phy_id
173 XRAN_CB_TTI = 0, /**< callback on TTI boundary */
174 XRAN_CB_HALF_SLOT_RX =1, /**< callback on half slot (sym 7) packet arrival*/
175 XRAN_CB_FULL_SLOT_RX =2, /**< callback on full slot (sym 14) packet arrival */
176 XRAN_CB_MAX /**< max number of callbacks */
179 typedef int32_t XranStatusInt32; /**< Xran status return value */
181 /** callback function type for Symbol packet */
182 typedef void (*XRANFHSYMPROCCB)(void*);
184 /** Callback function type for TTI event */
185 typedef int (*XRANFHTTIPROCCB)(void* );
187 /** Callback function type packet arrival from transport layer (ETH or IP) */
188 typedef void (*XranTransportBlockCallbackFn)(void*, int32_t);
191 * Component Carrier Initialization
193 typedef struct tagXRANCCINIT
195 uint32_t RadioMode; /**< XRAN mode Cat A or Cat B on given CC */
196 uint32_t nTxAnt; /**< Number of TX antennas */
197 uint32_t nRxAnt; /**< Number of RX antennas */
198 uint32_t radiobw; /**< bandwidth id */
199 uint32_t dpdk_port; /**< networking layer port id */
200 char *dpdk_pcie_eth_dev; /**< pcie device for this cc */
201 char *ru_mac_str; /**< mac address of RU */
202 uint32_t ulAgc; /**< state of UL AGC (ON/OFF) */
203 uint32_t numCell; /**< Number of Cells per port per CC */
204 uint32_t phyInsId[XRAN_MAX_CELLS_PER_PORT]; /**< Mapping of Cell ID to CC */
205 uint32_t dpdkRxCore; /**< DPDK RX Core */
206 uint32_t dpdkTxCore; /**< DPDK TX Core */
207 }XRANCCINIT, *PXRANCCINIT;
209 /** XRAN port enum */
212 XRAN_UP_VF = 0, /**< port type for U-plane */
213 XRAN_CP_VF, /**< port type for C-plane */
217 /** DPDK IO configuration for XRAN layer */
218 typedef struct tagXRAN_IO_LOOP_CFG
221 char *dpdk_dev[XRAN_VF_MAX];
223 int system_core; /* Needed as DPDK will change your starting core. */
224 int pkt_proc_core; /* Needed for packet processing thread. */
225 int pkt_aux_core; /* Needed for debug purposes. */
226 int timing_core; /* Needed for getting precise time */
227 int port[XRAN_VF_MAX]; /* This is auto-detected, no need to set. */
228 }XRAN_IO_LOOP_CFG, *PXRAN_IO_LOOP_CFG;
230 /** XRAN spec section 3.1.3.1.6 ecpriRtcid / ecpriPcid define */
231 typedef struct tagXRANEAXCIDCONFIG
233 uint16_t mask_cuPortId; /**< Mask CU PortId */
234 uint16_t mask_bandSectorId; /**< Mask Band */
235 uint16_t mask_ccId; /**< Mask CC */
236 uint16_t mask_ruPortId; /**< Mask RU Port ID */
238 uint8_t bit_cuPortId; /**< bandsectorId + ccId + ruportId */
239 uint8_t bit_bandSectorId; /**< ccId + ruPortId */
240 uint8_t bit_ccId; /**< ruportId */
241 uint8_t bit_ruPortId; /**< 0 */
242 }XRANEAXCIDCONFIG, *PXRANEAXCIDCONFIG;
245 * XRAN Front haul interface initialization settings
247 typedef struct tagXRANFHINIT
249 uint32_t llscuId; /**< lls-cu ID */
250 uint32_t nSec; /**< number of sectors, shall be 1 */
251 XRANCCINIT ccCfg[XRAN_COMPONENT_CARRIERS_MAX]; /**< configuration of each CCs */
252 XRANEAXCIDCONFIG eAxCId_conf; /**< config of ecpriRtcid/ecpriPcid */
253 uint32_t radio_iface; /**< enable/disable radio */
254 uint32_t dpdkMasterCore; /**< master core of DPDK */
255 uint32_t dpdkMemorySize; /**< huge pages allocation for DPDK */
256 uint32_t dpdkIrqMode; /**< DPDK IRQ or PMD mode */
257 uint32_t dpdkBasebandFecMode; /**< DPDK Baseband FEC device mode (0-SW, 1-HW) */
258 char *dpdkBasebandDevice; /**< DPDK Baseband device address */
259 uint32_t singleThreadTxRx;
260 uint32_t bbuPoolCores; /**< DPDK cores for BBU pool */
261 uint32_t radioEnabled; /**< reserved */
262 uint32_t powerSaveEn; /**< reserved */
263 char *filePrefix; /**< DPDK prefix */
264 XRAN_IO_LOOP_CFG io_cfg;/**< DPDK IO for XRAN */
265 uint8_t xranMode; /**< mode: lls-CU or RU */
266 int8_t *p_lls_cu_addr; /**< lls-CU Ethernet Mac Address */
267 int8_t *p_ru_addr; /**< RU Ethernet Mac Address */
268 uint32_t ttiPeriod; /**< TTI period */
270 uint16_t Tadv_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
271 uint16_t T2a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
272 uint16_t T2a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
273 uint16_t T2a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
274 uint16_t T2a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
275 uint16_t T2a_min_up; /**< Table 2 7 : xRAN Delay Management Model Parameters */
276 uint16_t T2a_max_up; /**< Table 2 7 : xRAN Delay Management Model Parameters */
277 uint16_t Ta3_min; /**< Table 2 7 : xRAN Delay Management Model Parameters */
278 uint16_t Ta3_max; /**< Table 2 7 : xRAN Delay Management Model Parameters */
279 uint16_t T1a_min_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
280 uint16_t T1a_max_cp_dl; /**< Table 2 7 : xRAN Delay Management Model Parameters */
281 uint16_t T1a_min_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
282 uint16_t T1a_max_cp_ul; /**< Table 2 7 : xRAN Delay Management Model Parameters */
283 uint16_t T1a_min_up; /**< Table 2 7 : xRAN Delay Management Model Parameters */
284 uint16_t T1a_max_up; /**< Table 2 7 : xRAN Delay Management Model Parameters */
285 uint16_t Ta4_min; /**< Table 2 7 : xRAN Delay Management Model Parameters */
286 uint16_t Ta4_max; /**< Table 2 7 : xRAN Delay Management Model Parameters */
288 uint8_t enableCP; /**< enable C-plane */
289 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
290 uint8_t up_vlan_tag; /**< U-plane vlan tag */
291 int32_t debugStop; /**< enable auto stop */
292 } XRANFHINIT, *PXRANFHINIT;
294 /** XRAN Playback format */
296 XRAN_RADIO_PLAYBACK_TIME_DOMAIN = 0,
297 XRAN_RADIO_PLAYBACK_FREQ_DOMAIN = 1
298 } XranPlaybackFormatEnum;
300 /* PRACH config required for XRAN based FH */
301 typedef struct tagXRANPRACHCONFIG
305 /** PRACH Configuration Index*/
306 uint8_t nPrachConfIdx;
307 /** PRACH Sub-carrier spacing
309 For below 6GHz the values indicate 15kHz or 30kHz
310 For above 6GHz the values indicate 60kHz or 120kHz*/
311 /*PRACH zeroCorrelationZoneConfig */
312 uint8_t nPrachSubcSpacing;
313 /** PRACH zeroCorrelationZoneConfig */
314 uint8_t nPrachZeroCorrConf;
315 /** PRACH restrictedSetConfig */
316 uint8_t nPrachRestrictSet;
319 /** PRACH Root Sequence Index */
320 uint16_t nPrachRootSeqIdx;
321 /** PRACH prach-frequency-start */
322 uint16_t nPrachFreqStart;
324 /** PRACH prach-frequency-offset */
325 int32_t nPrachFreqOffset;
326 /** PRACH Filter index */
327 uint8_t nPrachFilterIdx;
328 }XRANPRACHCONFIG, *PXRANPRACHCONFIG;
330 /** XRAN front haul playback configuration (not supported in 19.03) */
331 typedef struct tagXRANFHPLAYBACK
333 XranPlaybackFormatEnum TxPlayFormatType; /**< type of play back files [Time|Freq] */
335 unsigned long TxPlayBufAddr[XRAN_NUM_OF_ANT_RADIO]; /**< pointer to buffers to play */
336 uint32_t TxPlayBufSize; /**< Buffer size */
338 char* TxPlayFileName[XRAN_NUM_OF_ANT_RADIO]; /**< files to play */
339 uint32_t TxPlayFileSize; /**< expected the same size for all Ant */
341 }XRANPLAYBACKCONFIG,*PXRANPLAYBACKCONFIG;
343 /** XRAN front haul logging configuration (not supported in 19.03) */
344 typedef struct tagXRANFHLOGCONF
347 unsigned long TxLogBufAddr;
348 uint32_t TxLogBufSize;
350 unsigned long TxLogIfftInAddr;
351 uint32_t TxLogIfftInSize;
353 unsigned long TxLogIfft1200InAddr;
354 uint32_t TxLogIfft1200InSize;
356 unsigned long RxLogFftOutAddr;
357 uint32_t RxLogFftOutSize;
359 unsigned long RxLogFftOutExpAddr;
360 uint32_t RxLogFftOutExpSize;
362 unsigned long RxLogFftOutGainAddr;
363 uint32_t RxLogFftOutGainSize;
365 unsigned long RxLogBufAddr;
366 uint32_t RxLogBufSize;
368 unsigned long RxLogAlawBufAddr;
369 uint32_t RxLogAlawBufSize;
371 unsigned long RxLogPrachBufAddr;
372 uint32_t RxLogPrachBufSize;
374 uint32_t cfg_dl_iq_buf_enabled;
375 uint32_t cfg_ul_iq_buf_enabled;
377 }XRANFHLOGCONF, *PXRANFHLOGCONF;
379 /** XRAN front haul frame config */
380 typedef struct tagXRANFRAMECONFIG
382 /** Frame Duplex type: 0 -> FDD, 1 -> TDD */
383 uint8_t nFrameDuplexType;
384 /** Numerology, determine sub carrier spacing, Value: 0->4
385 0: 15khz, 1: 30khz, 2: 60khz
386 3: 120khz, 4: 240khz */
390 }XRANFRAMECONFIG, *PXRANFRAMECONFIG;
392 /** XRAN front haul BBU pooling config */
393 typedef struct tagXRANBBUPOOLCONFIG
395 uint32_t isBbuPool; /**< FH running with BBU pool */
396 }XRANBBUPOOLCONFIG, *PXRANBBUPOOLCONFIG;
398 /** XRAN front haul IQ compression settings */
399 typedef struct tagXRANRUCONFIG
401 uint8_t iqWidth; /**< IQ bit width */
402 uint8_t compMeth; /**< Compression method */
403 uint8_t fftSize; /**< FFT Size */
404 }XRANRUCONFIG, *PXRANRUCONFIG;
406 /** XRAN front haul Phase compensation settings */
410 uint32_t nPhaseCompFlag;
411 uint32_t nDlArfcn[XRAN_MAX_SECTOR_NR];
412 uint32_t nUlArfcn[XRAN_MAX_SECTOR_NR];
413 }XRANPHASECompConfig;
417 *XRAN front haul general configuration */
418 typedef struct tagXRANFHCONFIG
420 uint32_t dpdk_port; /**< DPDK port number used for FH */
421 uint32_t sector_id; /**< Band sector ID for FH */
422 uint32_t nCC; /**< number of Component carriers supported on FH */
423 uint32_t neAxc; /**< number of eAxc supported on FH */
424 XRANPLAYBACKCONFIG playback_conf;/**< configuration of playback of IQs supported with FH */
425 XRANFHLOGCONF log_conf; /**< config of logging functionality supported by FH */
426 XRANFHTTIPROCCB ttiCb; /**< call back for TTI event */
427 void *ttiCbParam; /**< parameters of call back function */
428 XRANPRACHCONFIG prach_conf; /**< PRACH specific configurations for FH */
429 XRANFRAMECONFIG frame_conf; /**< frame config */
430 XRANBBUPOOLCONFIG bbu_conf; /**< BBU pool config */
431 XRANRUCONFIG ru_conf; /**< config of RU as per XRAN spec */
432 XRANPHASECompConfig phase_compensation; /**< phase compensation settings */
433 }XRANFHCONFIG, *PXRANFHCONFIG;
438 * CC instance handle pointer type */
439 typedef void * XranCcInstanceHandleVoidP;
442 *****************************************************************************
446 * A flat buffer structure. The data pointer, pData, is a virtual address.
447 * The API requires the memory to by physically contiguous. Each flat
448 * buffer segment may contain several equally sized elements.
450 *****************************************************************************/
451 typedef struct XRANFlatBuffer
453 uint32_t nElementLenInBytes;
454 /**< The Element length specified in bytes.
455 * This parameter specifies the size of a single element in the buffer.
456 * The total size of the buffer is described as
457 * bufferSize = nElementLenInBytes * nNumberOfElements */
458 uint32_t nNumberOfElements;
459 /**< The number of elements in the physical contiguous memory segment */
460 uint32_t nOffsetInBytes;
461 /**< Offset in bytes to the start of the data in the physical contiguous
465 /**< The data pointer is a virtual address, however the actual data pointed
466 * to is required to be in contiguous physical memory unless the field
467 requiresPhysicallyContiguousMemory in CpaInstanceInfo is false. */
468 } XRANFlatBufferStruct;
471 *****************************************************************************
473 * Scatter/Gather buffer list containing an array of Simple buffers.
476 * A Scatter/Gather buffer list structure. It is expected that this buffer
477 * structure will be used where more than one flat buffer can be provided
478 * on a particular API.
480 * IMPORTANT - The memory for the pPrivateMetaData member must be allocated
481 * by the client as contiguous memory. When allocating memory for
482 * pPrivateMetaData a call to cpaCyBufferListGetMetaSize MUST be made to
483 * determine the size of the Meta Data Buffer. The returned size
484 * (in bytes) may then be passed in a memory allocation routine to allocate
485 * the pPrivateMetaData memory.
487 *****************************************************************************/
488 typedef struct XRANBufferList
490 uint32_t nNumBuffers;
491 /**< Number of pointers */
492 XRANFlatBufferStruct *pBuffers;
493 /**< Pointer to an unbounded array containing the number of CpaFlatBuffers
494 * defined by nNumBuffers */
496 /**< This is an opaque field that is not read or modified internally. */
497 void *pPrivateMetaData;
498 /**< Private Meta representation of this buffer List - the memory for this
499 * buffer needs to be allocated by the client as contiguous data.
500 * The amount of memory required is returned with a call to
501 * cpaCyBufferListGetMetaSize. If cpaCyBufferListGetMetaSize returns a size
502 * of zero no memory needs to be allocated, and this parameter can be NULL.
504 } XRANBufferListStruct;
508 * Initialize the XRAN Layer via DPDK.
511 * A non-negative value. If it is greater than 0, the array members
512 * for argv[0] through argv[argc] (non-inclusive) shall contain pointers
515 * An array of strings. The contents of the array, as well as the strings
516 * which are pointed to by the array, may be modified by this function.
520 * Error codes returned via rte_errno
522 int32_t xran_init(int argc, char *argv[], PXRANFHINIT p_xran_fh_init, char *appName, void ** pHandle);
527 * Function returns handles for number of sectors supported by XRAN layer. Currently function
528 * supports one handle XRAN layer where it supports only one CC
531 * Pointer to XRAN layer handle
532 * @param nNumInstances
533 * total number of instances of CC
534 * @param pSectorInstanceHandles
535 * Pointer to XranCcInstanceHandleVoidP where to store Handle pointer
540 int32_t xran_sector_get_instances (void * pHandle, uint16_t nNumInstances,
541 XranCcInstanceHandleVoidP * pSectorInstanceHandles);
546 * Function initialize Memory Management subsystem (mm) in order to handle memory buffers between XRAN layer
550 * Pointer to XRAN layer handle for given CC
552 * memory size of all segments
553 * @param nMemorySegmentSize
554 * size of memory per segment
559 int32_t xran_mm_init (void * pHandle, uint64_t nMemorySize, uint32_t nMemorySegmentSize);
564 * Function allocates buffer memory (bm) used between XRAN layer and PHY. In general case it's DPDK mbuf.
565 * it uses Memory Management system to get memory chunk and define memory pool on top of it.
568 * Pointer to XRAN layer handle for given CC
570 * pointer to buffer pool identification to be returned
571 * @param nNumberOfBuffers
572 * number of buffer to allocate in the pool
574 * buffer size to allocate
579 int32_t xran_bm_init (void * pHandle, uint32_t * pPoolIndex, uint32_t nNumberOfBuffers, uint32_t nBufferSize);
584 * Function allocates buffer used between XRAN layer and PHY. In general case it's DPDK mbuf.
587 * Pointer to XRAN layer handle for given CC
589 * buffer pool identification
591 * Pointer to pointer where to store address of new buffer
596 int32_t xran_bm_allocate_buffer(void * pHandle, uint32_t nPoolIndex, void **ppVirtAddr);
601 * Function frees buffer used between XRAN layer and PHY. In general case it's DPDK mbuf
604 * Pointer to XRAN layer handle for given CC
611 int32_t xran_bm_free_buffer(void * pHandle, void *pVirtAddr);
616 * Function destroys Memory Management (MM) layer of XRAN library
619 * Pointer to XRAN layer handle for given CC
624 int32_t xran_mm_destroy (void * pHandle);
629 * Function configures TX(DL) and RX(UL) output buffers and callback (UL only) for XRAN layer with
633 * Pointer to XRAN layer handle for given CC
635 * list of memory buffers to use to fetch IQs from PHY to XRAN layer (DL)
637 * list of memory buffers to use to deliver IQs from XRAN layer to PHY (UL)
638 * @param XranTransportBlockCallbackFn pCallback
639 * Callback function to call with arrival of all packets for given CC for given symbol
640 * @param pCallbackTag
641 * Parameters of Callback function
647 int32_t xran_5g_fronthault_config (void * pHandle,
648 XRANBufferListStruct *pSrcBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
649 XRANBufferListStruct *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
650 XranTransportBlockCallbackFn pCallback,
656 * Function configures PRACH output buffers and callback for XRAN layer with given handle
659 * Pointer to XRAN layer handle for given CC
661 * list of memory buffers to use to deliver PRACH IQs from xran layer to PHY
662 * @param XranTransportBlockCallbackFn pCallback
663 * Callback function to call with arrival of PRACH packets for given CC
664 * @param pCallbackTag
665 * Parameters of Callback function
671 int32_t xran_5g_prach_req (void * pHandle,
672 XRANBufferListStruct *pDstBuffer[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN],
673 XranTransportBlockCallbackFn pCallback,
678 * Function configures phase compensation for RU via XRAN layer with given handle
681 * Pointer to XRAN layer handle for given CC
683 * TX(DL) phase compensation settings
685 * RX(UL) phase compensation settings
687 * Sector id to use with given settings
692 int32_t xran_5g_pre_compenstor_cfg(void* pHandle,
693 uint32_t nTxPhaseCps,
694 uint32_t nRxPhaseCps,
700 * Function opens XRAN layer with given handle
703 * Pointer to XRAN layer handle for given CC
704 * @param PXRANFHCONFIG pConf
705 * Pointer to XRAN configuration structure with specific settings to use
710 int32_t xran_open(void *pHandle, PXRANFHCONFIG pConf);
715 * Function starts XRAN layer with given handle
718 * Pointer to XRAN layer handle for given CC
723 int32_t xran_start(void *pHandle);
728 * Function stops XRAN layer with given handle
731 * Pointer to XRAN layer handle for given CC
736 int32_t xran_stop(void *pHandle);
741 * Function closes XRAN layer with given handle
744 * Pointer to XRAN layer handle for given CC
749 int32_t xran_close(void *pHandle);
754 * Function registers callback to XRAN layer. Function support callbacks aligned on packet arrival.
757 * Pointer to XRAN layer handle for given CC
759 * pointer to callback function
761 * pointer to Callback Function parameters
763 * symbol to be register for
765 * Antenna number to trigger callback for packet arrival
768 * 0 - in case of success
769 * -1 - in case of failure
771 int32_t xran_reg_sym_cb(void *pHandle, XRANFHSYMPROCCB symCb, void * symCbParam, uint8_t symb, uint8_t ant);
776 * Function registers callback to XRAN layer. Function support callbacks align to OTA time. TTI even, half of slot,
777 * full slot with respect to PTP time.
780 * Pointer to XRAN layer handle for given CC
782 * pointer to callback function
784 * pointer to Callback Function parameters
786 * number of calls to be skipped before first call
787 * @param callback_to_phy_id
788 * call back time identification (see enum callback_to_phy_id)
791 * 0 - in case of success
792 * -1 - in case of failure
794 int32_t xran_reg_physide_cb(void *pHandle, XRANFHTTIPROCCB Cb, void *cbParam, int skipTtiNum, enum callback_to_phy_id);
799 * Function returns current TTI, Frame, Subframe, Slot Number as seen "Over air" base on PTP time
802 * Pointer to Frame number [0-99]
804 * @param nSubframeIdx
805 * Pointer to Subframe number [0-10]
808 * Pointer to Slot number [0-7]
811 * Pointer to current UTC second
814 * current TTI number [0-7999]
816 int32_t xran_get_slot_idx (uint32_t *nFrameIdx, uint32_t *nSubframeIdx, uint32_t *nSlotIdx, uint64_t *nSecond);
822 #endif /* _XRAN_FH_LLS_CU_H_*/