1 /******************************************************************************
3 * Copyright (c) 2020 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 *******************************************************************************/
23 * @author Intel Corporation
26 #ifndef _SAMPLEAPP__CONFIG_H_
27 #define _SAMPLEAPP__CONFIG_H_
30 #include <rte_ether.h>
31 #include "xran_fh_o_du.h"
33 /** Run time configuration of application */
34 typedef struct _RuntimeConfig
36 uint8_t appMode; /**< Application mode: lls-CU or RU */
37 uint8_t xranTech; /**< Radio Access Technology (NR or LTE) */
38 uint8_t xranCat; /**< xran mode: NR Categoty A, NR Category B, LTE Cat A, LTE Cat B */
39 uint8_t numCC; /**< Number of CC per ports supported by RU */
40 uint8_t numAxc; /**< Number of Antenna Carriers per CC */
41 uint8_t numUlAxc; /**< Number of Antenna Carriers per CC for UL (Cat B) */
42 uint32_t antElmTRx; /**< Number of antenna elements for TX and RX */
43 uint32_t muMimoUEs; /**< Number of UEs (with 1 RX ant)/beams */
45 uint32_t DlLayersPerUe; /**< Number of DL layer per UE */
46 uint32_t UlLayersPerUe; /**< Number of UL layer per UE */
48 uint32_t ttiPeriod; /**< TTI period */
49 uint32_t testVect; /**< Test Signal to send */
50 struct rte_ether_addr o_du_addr[XRAN_VF_MAX]; /**< O-DU Ethernet Mac Address */
51 struct rte_ether_addr o_ru_addr[XRAN_VF_MAX]; /**< O-RU Ethernet Mac Address */
52 struct rte_ether_addr tmp_addr; /**< Temp Ethernet Mac Address */
54 uint32_t instance_id; /**< Instance ID of application */
55 uint32_t io_core; /**< Core used for IO */
56 uint64_t io_worker; /**< Mask for worker cores */
57 int32_t io_sleep; /**< enable sleep on PMD cores */
58 uint32_t system_core; /* house keeping core */
59 int iova_mode; /**< DPDK IOVA Mode */
61 uint32_t mtu; /**< maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single
62 xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */
63 int numSlots; /**< number of slots in IQ vector */
64 char ant_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
65 char prach_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
67 char dl_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for DL streams */
68 char ul_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for UL streams */
70 char ul_srs_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANT_ARRAY_ELM_NR][512]; /**< file with SRS content for UL antenna elements */
73 uint8_t enablePrach; /**< enable PRACH */
74 uint8_t prachOffset; /**< Sets the PRACH position in frequency / subcarrier position, n_PRBoffset^RA and is expressed as a physical resource block number.
75 Set by SIB2, prach-FreqOffset in E-UTRA. */
77 uint8_t prachConfigIndex;/**< TS36.211 - Table 5.7.1-2 : PRACH Configuration Index */
78 uint8_t iqswap; /**< do swap of IQ before send to ETH */
79 uint8_t nebyteorderswap; /**< do swap of byte order from host byte order to network byte order. ETH */
80 uint8_t compression; /**< enable use case with compression */
81 uint8_t CompHdrType; /**< dynamic or static compression header */
83 uint16_t totalBfWeights; /**< The total number of beamforming weights on RU */
85 uint8_t enableSrs; /**< enable SRS (valid for Cat B only) */
86 uint16_t srsSymMask; /**< SRS symbol mask [014] within S/U slot [0-13] def is 13 */
88 uint16_t maxFrameId; /**< max value of frame id */
91 uint16_t T2a_min_cp_dl;
92 uint16_t T2a_max_cp_dl;
93 uint16_t T2a_min_cp_ul;
94 uint16_t T2a_max_cp_ul;
99 uint16_t T1a_min_cp_dl;
100 uint16_t T1a_max_cp_dl;
101 uint16_t T1a_min_cp_ul;
102 uint16_t T1a_max_cp_ul;
108 uint8_t enableCP; /**< enable C-plane */
109 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
110 uint8_t up_vlan_tag; /**< U-plane vlan tag */
113 int32_t debugStopCount;
115 int32_t DynamicSectionEna;
119 uint8_t mu_number; /**< Mu numner as per 3GPP */
120 uint32_t nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
121 uint32_t nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
122 uint32_t nDLBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
123 uint32_t nULBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
124 uint32_t nDLFftSize; /**< DL FFT size */
125 uint32_t nULFftSize; /**< UL FFT size */
128 uint8_t nFrameDuplexType;
130 struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY];
131 struct xran_prb_map PrbMapDl;
132 struct xran_prb_map PrbMapUl;
134 int32_t DU_Port_ID_bitwidth;
135 int32_t BandSector_ID_bitwidth;
136 int32_t CC_ID_bitwidth;
137 int32_t RU_Port_ID_bitwidth;
142 * Parse application configuration file.
144 * @param filename The name of the configuration file to be parsed.
145 * @param config The configuration structure to be filled with parsed data. */
146 int parseConfigFile(char *filename, RuntimeConfig *config);
148 #endif /* _SAMPLEAPP__CONFIG_H_ */