1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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. #
16 ################################################################################
17 *******************************************************************************/
18 #ifndef __COMMON_DEF_H__
19 #define __COMMON_DEF_H__
44 #include "gen.x" /* general */
45 #include "ssi.x" /* system services */
58 #define MAX_NUM_CELL 1
61 /* 5G ORAN phy delay */
65 #define ODU_SELECTOR_LC 0
66 #define ODU_SELECTOR_TC 1
67 #define ODU_SELECTOR_LWLC 2
69 #define ODU_START_CRNTI 100
70 #define ODU_END_CRNTI 500
72 /* Defining macros for common utility functions */
73 #define ODU_GET_MSG SGetMsg
74 #define ODU_PUT_MSG SPutMsg
75 #define ODU_ADD_PRE_MSG_MULT SAddPreMsgMult
76 #define ODU_ADD_POST_MSG_MULT SAddPstMsgMult
77 #define ODU_START_TASK SStartTask
78 #define ODU_STOP_TASK SStopTask
79 #define ODU_ATTACH_TTSK SAttachTTsk
80 #define ODU_POST_TASK SPstTsk
81 #define ODU_COPY_MSG_TO_FIX_BUF SCpyMsgFix
82 #define ODU_REG_TTSK SRegTTsk
83 #define ODU_SET_PROC_ID SSetProcId
84 #define ODU_FIND_MSG_LEN SFndLenMsg
85 #define ODU_EXIT_TASK SExitTsk
86 #define ODU_PRINT_MSG SPrntMsg
87 #define ODU_REM_PRE_MSG SRemPreMsg
88 #define ODU_REG_TMR_MT SRegTmrMt
90 #define GET_UE_IDX( _crnti,_ueIdx) \
92 _ueIdx = _crnti - ODU_START_CRNTI + 1; \
95 #define GET_CRNTI( _crnti,_ueIdx) \
97 _crnti = _ueIdx + ODU_START_CRTNI - 1; \
100 /* Calculates cellIdx from cellId */
101 #define GET_CELL_IDX(_cellId, _cellIdx) \
103 _cellIdx = _cellId - 1; \
106 #define SET_BITS_MSB(_startBit, _numBits, _byte) \
108 _byte = (~((0xFF) >> _numBits)); \
109 _byte >>= _startBit; \
112 #define SET_BITS_LSB(_startBit, _numBits, _byte) \
114 _byte = (~((0xFF) << _numBits)); \
115 _byte <<= _startBit; \
119 typedef struct slotIndInfo
126 typedef struct PlmnIdentity
132 void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
136 /**********************************************************************
138 ***********************************************************************/