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 *******************************************************************************/
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 xranCat; /**< xran mode: Categoty A | Category B */
38 uint8_t numCC; /**< Number of CC per ports supported by RU */
39 uint8_t numAxc; /**< Number of Antenna Carriers per CC */
40 uint8_t numUlAxc; /**< Number of Antenna Carriers per CC for UL (Cat B) */
41 uint32_t antElmTRx; /**< Number of antenna elements for TX and RX */
42 uint32_t muMimoUEs; /**< Number of UEs (with 1 RX ant)/beams */
44 uint32_t DlLayersPerUe; /**< Number of DL layer per UE */
45 uint32_t UlLayersPerUe; /**< Number of UL layer per UE */
47 uint32_t ttiPeriod; /**< TTI period */
48 uint32_t testVect; /**< Test Signal to send */
49 struct ether_addr o_du_addr; /**< lls-CU Ethernet Mac Address */
50 struct ether_addr o_ru_addr; /**< RU Ethernet Mac Address */
51 struct ether_addr tmp_addr; /**< Temp Ethernet Mac Address */
53 uint32_t instance_id; /**< Instance ID of application */
54 uint32_t io_core; /**< Core used for IO */
55 uint64_t system_core; /* <system core ID> */
56 uint64_t pkt_proc_core;
57 uint64_t pkt_aux_core;
60 uint32_t mtu; /**< maximum transmission unit (MTU) is the size of the largest protocol data unit (PDU) that can be communicated in a single
61 xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */
62 int numSlots; /**< number of slots in IQ vector */
63 char ant_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
64 char prach_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
66 char dl_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for DL streams */
67 char ul_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for UL streams */
69 char ul_srs_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANT_ARRAY_ELM_NR][512]; /**< file with SRS content for UL antenna elements */
72 uint8_t enablePrach; /**< enable PRACH */
73 uint8_t prachOffset; /**< Sets the PRACH position in frequency / subcarrier position, n_PRBoffset^RA and is expressed as a physical resource block number.
74 Set by SIB2, prach-FreqOffset in E-UTRA. */
76 uint8_t prachConfigIndex; /**< TS36.211 - Table 5.7.1-2 : PRACH Configuration Index */
77 uint8_t iqswap; /**< do swap of IQ before send to ETH */
78 uint8_t nebyteorderswap; /**< do swap of byte order from host byte order to network byte order. ETH */
79 uint8_t compression; /**< enable use case with compression */
81 uint16_t totalBfWeights; /**< The total number of beamforming weights on RU */
83 uint8_t enableSrs; /**< enable SRS (valid for Cat B only) */
84 uint16_t srsSymMask; /**< SRS symbol mask [014] within S/U slot [0-13] def is 13 */
86 uint16_t maxFrameId; /**< max value of frame id */
89 uint16_t T2a_min_cp_dl;
90 uint16_t T2a_max_cp_dl;
91 uint16_t T2a_min_cp_ul;
92 uint16_t T2a_max_cp_ul;
97 uint16_t T1a_min_cp_dl;
98 uint16_t T1a_max_cp_dl;
99 uint16_t T1a_min_cp_ul;
100 uint16_t T1a_max_cp_ul;
106 uint8_t enableCP; /**< enable C-plane */
107 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
108 uint8_t up_vlan_tag; /**< U-plane vlan tag */
111 int32_t debugStopCount;
113 int32_t DynamicSectionEna;
117 uint8_t mu_number; /**< Mu numner as per 3GPP */
118 uint32_t nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
119 uint32_t nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
120 uint32_t nDLBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
121 uint32_t nULBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
122 uint32_t nDLFftSize; /**< DL FFT size */
123 uint32_t nULFftSize; /**< UL FFT size */
126 uint8_t nFrameDuplexType;
128 struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY];
129 struct xran_prb_map PrbMapDl;
130 struct xran_prb_map PrbMapUl;
134 * Parse application configuration file.
136 * @param filename The name of the configuration file to be parsed.
137 * @param config The configuration structure to be filled with parsed data. */
138 int parseConfigFile(char *filename, RuntimeConfig *config);
140 #endif /* _SAMPLEAPP__CONFIG_H_ */