1 /******************************************************************************
\r
3 * Copyright (c) 2019 Intel.
\r
5 * Licensed under the Apache License, Version 2.0 (the "License");
\r
6 * you may not use this file except in compliance with the License.
\r
7 * You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
17 *******************************************************************************/
\r
23 * @author Intel Corporation
\r
26 #ifndef _SAMPLEAPP__CONFIG_H_
\r
27 #define _SAMPLEAPP__CONFIG_H_
\r
30 #include <rte_ether.h>
\r
31 #include "xran_fh_o_du.h"
\r
33 /** Run time configuration of application */
\r
34 typedef struct _RuntimeConfig
\r
36 uint8_t appMode; /**< Application mode: lls-CU or RU */
\r
37 uint8_t xranCat; /**< xran mode: Categoty A | Category B */
\r
38 uint8_t numCC; /**< Number of CC per ports supported by RU */
\r
39 uint8_t numAxc; /**< Number of Antenna Carriers per CC */
\r
40 uint8_t numUlAxc; /**< Number of Antenna Carriers per CC for UL (Cat B) */
\r
41 uint32_t antElmTRx; /**< Number of antenna elements for TX and RX */
\r
42 uint32_t muMimoUEs; /**< Number of UEs (with 1 RX ant)/beams */
\r
44 uint32_t DlLayersPerUe; /**< Number of DL layer per UE */
\r
45 uint32_t UlLayersPerUe; /**< Number of UL layer per UE */
\r
47 uint32_t ttiPeriod; /**< TTI period */
\r
48 uint32_t testVect; /**< Test Signal to send */
\r
49 struct ether_addr o_du_addr; /**< lls-CU Ethernet Mac Address */
\r
50 struct ether_addr o_ru_addr; /**< RU Ethernet Mac Address */
\r
51 struct ether_addr tmp_addr; /**< Temp Ethernet Mac Address */
\r
53 uint32_t instance_id; /**< Instance ID of application */
\r
54 uint32_t io_core; /**< Core used for IO */
\r
55 uint64_t system_core; /* <system core ID> */
\r
56 uint64_t pkt_proc_core;
\r
57 uint64_t pkt_aux_core;
\r
58 uint64_t timing_core;
\r
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
\r
61 xRAN network layer transaction. supported 1500 bytes and 9600 bytes (Jumbo Frame) */
\r
62 int numSlots; /**< number of slots in IQ vector */
\r
63 char ant_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
\r
64 char prach_file[XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file to use for test vector */
\r
66 char dl_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for DL streams */
\r
67 char ul_bfw_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANTENNA_NR][512]; /**< file with beamforming weights for UL streams */
\r
69 char ul_srs_file [XRAN_MAX_SECTOR_NR*XRAN_MAX_ANT_ARRAY_ELM_NR][512]; /**< file with SRS content for UL antenna elements */
\r
72 uint8_t enablePrach; /**< enable PRACH */
\r
73 uint8_t prachOffset; /**< Sets the PRACH position in frequency / subcarrier position, n_PRBoffset^RA and is expressed as a physical resource block number.
\r
74 Set by SIB2, prach-FreqOffset in E-UTRA. */
\r
76 uint8_t prachConfigIndex; /**< TS36.211 - Table 5.7.1-2 : PRACH Configuration Index */
\r
77 uint8_t iqswap; /**< do swap of IQ before send to ETH */
\r
78 uint8_t nebyteorderswap; /**< do swap of byte order from host byte order to network byte order. ETH */
\r
79 uint8_t compression; /**< enable use case with compression */
\r
81 uint16_t totalBfWeights; /**< The total number of beamforming weights on RU */
\r
83 uint8_t enableSrs; /**< enable SRS (valid for Cat B only) */
\r
84 uint16_t srsSymMask; /**< SRS symbol mask [014] within S/U slot [0-13] def is 13 */
\r
86 uint16_t maxFrameId; /**< max value of frame id */
\r
88 uint16_t Tadv_cp_dl;
\r
89 uint16_t T2a_min_cp_dl;
\r
90 uint16_t T2a_max_cp_dl;
\r
91 uint16_t T2a_min_cp_ul;
\r
92 uint16_t T2a_max_cp_ul;
\r
93 uint16_t T2a_min_up;
\r
94 uint16_t T2a_max_up;
\r
97 uint16_t T1a_min_cp_dl;
\r
98 uint16_t T1a_max_cp_dl;
\r
99 uint16_t T1a_min_cp_ul;
\r
100 uint16_t T1a_max_cp_ul;
\r
101 uint16_t T1a_min_up;
\r
102 uint16_t T1a_max_up;
\r
106 uint8_t enableCP; /**< enable C-plane */
\r
107 uint8_t cp_vlan_tag; /**< C-plane vlan tag */
\r
108 uint8_t up_vlan_tag; /**< U-plane vlan tag */
\r
111 int32_t debugStopCount;
\r
113 int32_t DynamicSectionEna;
\r
117 uint8_t mu_number; /**< Mu numner as per 3GPP */
\r
118 uint32_t nDLAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
\r
119 uint32_t nULAbsFrePointA; /**< Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000 */
\r
120 uint32_t nDLBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
\r
121 uint32_t nULBandwidth; /**< Carrier bandwidth for in MHz. Value: 5->400 */
\r
122 uint32_t nDLFftSize; /**< DL FFT size */
\r
123 uint32_t nULFftSize; /**< UL FFT size */
\r
126 uint8_t nFrameDuplexType;
\r
127 uint8_t nTddPeriod;
\r
128 struct xran_slot_config sSlotConfig[XRAN_MAX_TDD_PERIODICITY];
\r
129 struct xran_prb_map PrbMapDl;
\r
130 struct xran_prb_map PrbMapUl;
\r
134 * Parse application configuration file.
\r
136 * @param filename The name of the configuration file to be parsed.
\r
137 * @param config The configuration structure to be filled with parsed data. */
\r
138 int parseConfigFile(char *filename, RuntimeConfig *config);
\r
140 #endif /* _SAMPLEAPP__CONFIG_H_ */
\r