Adding new commiter to ODU-High repo
[o-du/l2.git] / src / cm / tfu.h
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
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      Name:    Lower layer interface - TFU
21
22      Type:    C header file
23
24      Desc:    Constants needed for TFU interface
25
26      File:    tfu.h
27
28 *********************************************************************21*/
29
30 /**
31   @file tfu.h
32   @brief Defines for TFU interface.
33   */
34
35 #ifndef __TFU_H__
36 #define __TFU_H__
37
38 /* Define for the block size for memory allocation */
39 /** @name TFU_TDD */
40 /** @{ */
41 #define TFU_MAX_HQ_RES        4     /*!< n^1 Pucch resources for
42                                                     HARQ feedback */
43
44 #ifdef TFU_5GTF
45 #define TFU_RIV_324        324     /*!<  RV value 324 */
46 #define TFU_RIV_325        325     /*!<  RV value 325 */
47 #define TFU_RIV_326        326     /*!<  RV value 326 */
48 #endif
49
50 #ifdef TFU_TDD
51 #define TFU_BLKSZ                 2048  /*!< Block size for memory allocations. */
52 #else
53 /* tfu_h_001.main_3  Changing from 4096 to 1500 to align with max bucket-max 
54  * packet sizes - optimization*/
55 #define TFU_BLKSZ                 1500  /*!< Block size for memory allocations. */
56 #endif
57 /* tfu_h_001.main_6. Added changes of TFU_UPGRADE */
58 #ifdef TFU_UPGRADE
59 #define TFU_MAX_UL_RB             110   /*!< Maximum number of RBs in UL */
60 #define TFU_MAX_CQI_BYTES         9     /*!< Maximum number of CQI Bytes length */
61 #define TFU_MAX_PHY_ANTENNA       4     /*!<  Maximum number of Physical Antennas */
62 #endif /* TFU_UPGRADE */
63
64 #define TFU_MAX_RAPID_IN_SUBFRAME 64    /*!< Maximum number of Random access preambes in a subframe. */
65 #define TFU_MAX_UL_SUBBAND        110   /*!< Maxiumum number of Uplink Subbands.*/
66 #define TFU_MAX_DL_SUBBAND        110   /*!< Maxiumum number of Downlink Subbands.*/
67 #define TFU_MAX_TB                2    /*!< Maximum number of Transport blocks per UE. */
68 #ifdef L2_OPTMZ
69 #define TFU_MAX_PDU               8    /*!< This No is mapped to RGU_MAX_PDU*/
70 #define TFU_MAX_LC                10    /*!< This No is mapped to RGU_MAX_LC*/
71 #endif
72 #define TFU_MAX_M                 4    /*!< Maximum value of "M" for HARQ Feedback multiplexing. */
73 #define TFU_MAX_2BIT_TPC          16   /*!< Maximum number of 2 bit TPC commands. */
74 #define TFU_MAX_1BIT_TPC          32   /*!< Maximum number of 1 bit TPC commands. */
75 /*tfu_h_001.main_5 - Added support for SPS*/
76 /* Tunable parameter */
77 #define TFU_MAX_MEMBLK_SIZE       1500 /* tfu_h_001.main_3 Changing from 2048 to 1500 
78                                           for alignment and optimization */
79
80 #define TFU_UBNDREQ_MNGMT         1    /*!< TFU sap unbind reason */
81
82 #ifdef LTE_ADV
83 #define TFU_MAX_FDD_HARQ_FDBKS       10 
84 #define TFU_MAX_HARQ_FDBKS       20 /*For Rel10 UE
85                                      Considering 10 bit requirement of PUCCH Format 3*/
86 #else
87 #define TFU_MAX_HARQ_FDBKS       TFU_MAX_TB /*For Rel8/Rel9 UE*/
88 #endif/*LTE_ADV*/
89
90 /* selector(coupling) values */
91 #define TFU_MAX_ALLOC_BYTES     4
92 /* pack unpack error code */
93 #define ETFUXXX                 0
94 #define ERRTFU                  0
95 /* tfu_h_001.main_2 - ccpu00110457 DTX Changes Start */
96 #define TFU_HQFDB_NACK          FALSE
97 #define TFU_HQFDB_ACK           TRUE
98 /* tfu_h_001.main_6. Added changes of TFU_UPGRADE */
99 #define TFU_HQFDB_DTX           4
100 #define TFU_HQFDB_INVALID       0xFF
101
102 #define TFU_PERIODIC_CQI_TYPE  0
103 #define TFU_APERIODIC_CQI_TYPE 1
104
105 #define TFU_FREE_MSG(_buf)\
106 {\
107    if (NULLP != (_buf)) \
108    { \
109       SPutMsg((_buf)); \
110       _buf = NULLP; \
111    } \
112 }
113
114 #define TFU_FREE_MEM(_mem)\
115 {\
116    if (NULLP != (_mem)) \
117    { \
118       cmFreeMem((_mem)); \
119       _mem = NULLP; \
120    } \
121 }
122
123 #endif /* __TFU_H__ */
124
125 /********************************************************************30**
126
127          End of file
128 **********************************************************************/