* INTC Contribution to the O-RAN F Release for O-DU Low
[o-du/phy.git] / fhi_lib / app / src / ebbu_pool_cfg.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2020 Intel.
4 *
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
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
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.
16 *
17 *******************************************************************************/
18
19 /**
20  * @brief This file consists of parameters that are to be read from ebbu_pool_cfg.xml
21  * to configure the application at system initialization
22  * @file ebbu_pool_cfg.h
23  * @ingroup xran
24  * @author Intel Corporation
25 **/
26
27 #ifndef _EBBUPOOLCFG_H_
28 #define _EBBUPOOLCFG_H_
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 #include "ebbu_pool_api.h"
35 #include "aux_cline.h"
36
37 #define EBBU_POOL_FILE_NAME                    "config_file/ebbu_pool_cfg_basic.xml"
38
39 #define EBBU_POOL_CFG_ERRORCODE__SUCCESS       ( 0 )
40 #define EBBU_POOL_CFG_ERRORCODE__FAIL          ( 1 )
41 #define EBBU_POOL_CFG_ERRORCODE__VER_MISMATCH  ( 2 )
42
43 #define EBBU_POOL_MAX_TEST_CELL 40
44 #define EBBU_POOL_MAX_TEST_CORE 256
45 #define EBBU_POOL_MAX_CTRL_THREAD 8
46
47
48 #define EBBU_POOL_MAX_FRAME_FORMAT 3
49 #define EBBU_POOL_TDD_PERIOD 10
50 #define EBBU_POOL_TEST_DL 1
51 #define EBBU_POOL_TEST_UL 2
52
53 extern uint32_t nD2USwitch[EBBU_POOL_MAX_FRAME_FORMAT][EBBU_POOL_TDD_PERIOD];
54
55 typedef struct
56 {
57     uint32_t frameFormat; //FDD or TDD:DDDSU, DDDDDDDSUU
58     uint32_t tti; //micro-second
59     uint32_t eventPerTti;
60 }eBbuPoolTestCellStruc;
61
62 typedef struct
63 {
64     //eBbuPool general config
65     uint32_t mainThreadCoreId;
66     uint32_t sleepFlag;
67
68     //Queus config
69     uint32_t queueDepth;
70     uint32_t queueNum;
71     uint32_t ququeCtxNum;
72
73     //Test config
74     uint32_t timerCoreId;
75     uint32_t ctrlThreadNum;
76     uint32_t ctrlThreadCoreId[EBBU_POOL_MAX_CTRL_THREAD];
77     uint32_t testCellNum;
78     eBbuPoolTestCellStruc sTestCell[EBBU_POOL_MAX_TEST_CELL];
79     uint32_t testCoreNum;
80     uint32_t testCoreList[EBBU_POOL_MAX_TEST_CORE];
81
82     //Misc
83     uint32_t mlogEnable;
84 } eBbuPoolCfgVarsStruct, *peBbuPoolCfgVarsStruct;
85
86 peBbuPoolCfgVarsStruct ebbu_pool_cfg_get_ctx(void);
87 uint32_t ebbu_pool_cfg_init_from_xml(void);
88 void ebbu_pool_cfg_set_cfg_filename(int argc, char *argv[], char filename[512]);
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* #ifndef _EBBUPOOLCFG_H_ */
95