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 *******************************************************************************/
21 * @brief This file provides the definition of Control Plane Messages
22 * for XRAN Front Haul layer as defined in XRAN-FH.CUS.0-v02.01.
25 * @ingroup group_lte_source_xran
26 * @author Intel Corporation
30 #ifndef _XRAN_PKT_CP_H_
31 #define _XRAN_PKT_CP_H_
34 /**********************************************************************
35 * Common structures for C/U-plane
36 **********************************************************************/
38 * @ingroup xran_cp_pkt
41 * user data compression header defined in 5.4.4.10 / 6.3.3.13
43 struct xran_radioapp_udComp_header {
44 uint8_t udCompMeth:4; /**< Compression method, XRAN_COMPMETHOD_xxxx */
45 uint8_t udIqWidth:4; /**< IQ bit width, 1 ~ 16 */
46 } __attribute__((__packed__));
49 /**********************************************************************
50 * Definition of C-Plane Protocol 5.4
51 **********************************************************************/
53 * @ingroup xran_cp_pkt
56 * Common Radio Application Header for C-Plane
58 struct xran_cp_radioapp_common_header { /* 6bytes, first 4bytes need the conversion for byte order */
59 uint32_t startSymbolId:6; /**< 5.4.4.7 start symbol identifier */
60 uint32_t slotId:6; /**< 5.4.4.6 slot identifier */
61 uint32_t subframeId:4; /**< 5.4.4.5 subframe identifier */
62 uint32_t frameId:8; /**< 5.4.4.4 frame identifier */
63 uint32_t filterIndex:4; /**< 5.4.4.3 filter index, XRAN_FILTERINDEX_xxxx */
64 uint32_t payloadVer:3; /**< 5.4.4.2 payload version, should be 1 */
65 uint32_t dataDirection:1; /**< 5.4.4.1 data direction (gNB Tx/Rx) */
66 uint8_t numOfSections; /**< 5.4.4.8 number of sections */
67 uint8_t sectionType; /**< 5.4.4.9 section type */
68 } __attribute__((__packed__));
71 * @ingroup xran_cp_pkt
74 * frame structure defined in 5.4.4.13
76 struct xran_cp_radioapp_frameStructure {
77 uint8_t uScs:4; /**< sub-carrier spacing, XRAN_SCS_xxx */
78 uint8_t fftSize:4; /**< FFT size, XRAN_FFTSIZE_xxx */
79 } __attribute__((__packed__));
82 * @ingroup xran_cp_pkt
85 * Section headers definition for C-Plane.
86 * Section type 6 and 7 are not present since those have different fields.
88 struct xran_cp_radioapp_section_header { // 8bytes, need the conversion for byte order
92 uint32_t numSymbol:4; /**< 5.4.5.7 number of symbols */
93 uint32_t reMask:12; /**< 5.4.5.5 resource element mask */
96 uint32_t beamId:15; /**< 5.4.5.9 beam identifier */
97 uint32_t ef:1; /**< 5.4.5.8 extension flag */
98 uint32_t numSymbol:4; /**< 5.4.5.7 number of symbols */
99 uint32_t reMask:12; /**< 5.4.5.5 resource element mask */
102 uint32_t beamId:15; /**< 5.4.5.9 beam identifier */
103 uint32_t ef:1; /**< 5.4.5.8 extension flag */
104 uint32_t numSymbol:4; /**< 5.4.5.7 number of symbols */
105 uint32_t reMask:12; /**< 5.4.5.5 resource element mask */
108 uint32_t ueId:15; /**< 5.4.5.10 UE identifier */
109 uint32_t ef:1; /**< 5.4.5.8 extension flag */
110 uint32_t numSymbol:4; /**< 5.4.5.7 number of symbols */
111 uint32_t reMask:12; /**< 5.4.5.5 resource element mask */
115 uint32_t numPrbc:8; /**< 5.4.5.6 number of contiguous PRBs per control section */
116 uint32_t startPrbc:10; /**< 5.4.5.4 starting PRB of control section */
117 uint32_t symInc:1; /**< 5.4.5.3 symbol number increment command XRAN_SYMBOLNUMBER_xxxx */
118 uint32_t rb:1; /**< 5.4.5.2 resource block indicator, XRAN_RBIND_xxx */
119 uint32_t sectionId:12; /**< 5.4.5.1 section identifier */
120 } __attribute__((__packed__));
123 /**********************************************************
124 * Scheduling and Beam-forming Commands 5.4.2
125 **********************************************************/
127 * @ingroup xran_cp_pkt
130 * Section header definition for type 0
132 struct xran_cp_radioapp_section0_header { // 12bytes (6+2+1+2+1)
133 struct xran_cp_radioapp_common_header cmnhdr;
134 uint16_t timeOffset; /**< 5.4.4.12 time offset */
136 struct xran_cp_radioapp_frameStructure frameStructure;
137 uint16_t cpLength; /**< 5.4.4.14 cyclic prefix length */
139 } __attribute__((__packed__));
142 * @ingroup xran_cp_pkt
145 * Section definition for type 0: Unused RB or Symbols in DL or UL (Table 5-2)
146 * Not supported in this release
148 struct xran_cp_radioapp_section0 { // 8bytes (4+4)
149 struct xran_cp_radioapp_section_header hdr;
150 } __attribute__((__packed__));
153 * @ingroup xran_cp_pkt
156 * Section header definition for type 1
158 struct xran_cp_radioapp_section1_header { // 8bytes (6+1+1)
159 struct xran_cp_radioapp_common_header cmnhdr;
160 struct xran_radioapp_udComp_header udComp;
162 } __attribute__((__packed__));
165 * @ingroup xran_cp_pkt
168 * Section definition for type 1: Most DL/UL Radio Channels (Table 5-3)
170 struct xran_cp_radioapp_section1 { // 8bytes (4+4)
171 struct xran_cp_radioapp_section_header hdr;
173 // section extensions // 5.4.6 & 5.4.7
175 } __attribute__((__packed__));
178 * @ingroup xran_cp_pkt
181 * Section header definition for type 3
183 struct xran_cp_radioapp_section3_header { // 12bytes (6+2+1+2+1)
184 struct xran_cp_radioapp_common_header cmnhdr;
185 uint16_t timeOffset; /**< 5.4.4.12 time offset */
187 struct xran_cp_radioapp_frameStructure frameStructure;
188 uint16_t cpLength; /**< 5.4.4.14 cyclic prefix length */
189 struct xran_radioapp_udComp_header udComp;
190 } __attribute__((__packed__));
193 * @ingroup xran_cp_pkt
196 * Section definition for type 3: PRACH and Mixed-numerology Channels (Table 5-4)
198 struct xran_cp_radioapp_section3 { // 12bytes (4+4+4)
199 struct xran_cp_radioapp_section_header hdr;
200 uint32_t freqOffset:24; /**< 5.4.5.11 frequency offset */
203 // section extensions // 5.4.6 & 5.4.7
205 } __attribute__((__packed__));
208 * @ingroup xran_cp_pkt
211 * Section header definition for type 5
213 struct xran_cp_radioapp_section5_header { // 8bytes (6+1+1)
214 struct xran_cp_radioapp_common_header cmnhdr;
215 struct xran_radioapp_udComp_header udComp;
217 } __attribute__((__packed__));
220 * @ingroup xran_cp_pkt
223 * Section definition for type 5: UE scheduling information (Table 5-5)
224 * Not supported in this release
226 struct xran_cp_radioapp_section5 {
227 struct xran_cp_radioapp_section_header hdr;
229 // section extensions // 5.4.6 & 5.4.7
231 } __attribute__((__packed__));
234 * @ingroup xran_cp_pkt
237 * Section header definition for type 6
239 struct xran_cp_radioapp_section6_header { // 8bytes (6+1+1)
240 struct xran_cp_radioapp_common_header cmnhdr;
241 uint8_t numberOfUEs; /**< 5.4.4.11 number of UEs */
243 } __attribute__((__packed__));
246 * @ingroup xran_cp_pkt
249 * Section definition for type 5: Channel Information (Table 5-6)
250 * Not supported in this release
252 struct xran_cp_radioapp_section6 {
253 uint32_t regularizationFactor:16;/**< 5.4.5.12 regularization Factor */
254 uint32_t ueId:15; /**< 5.4.5.10 UE identifier */
255 uint32_t ef:1; /**< 5.4.5.8 extension flag */
256 uint8_t startPrbch:2; /**< 5.4.5.4 starting PRB of control section */
257 uint8_t symInc:1; /**< 5.4.5.3 symbol number increment command XRAN_SYMBOLNUMBER_xxxx */
258 uint8_t rb:1; /**< 5.4.5.2 resource block indicator, XRAN_RBIND_xxx */
260 uint8_t startPrbcl:8; /**< 5.4.5.4 starting PRB of control section */
261 uint8_t numPrbc:8; /**< 5.4.5.6 number of contiguous PRBs per control section */
263 // ciIQsamples start from here // 5.4.5.13 channel information I and Q values
266 // section extensions // 5.4.6 & 5.4.7
268 } __attribute__((__packed__));
271 * @ingroup xran_cp_pkt
274 * Section header definition for type 7: LAA
275 * Not supported in this release
277 struct xran_cp_radioapp_section7_header {
278 struct xran_cp_radioapp_common_header cmnhdr;
280 uint8_t laaMsgLen:4; /**< 5.4.5.15 LAA message length */
281 uint8_t laaMsgType:4; /**< 5.4.5.14 LAA message type */
283 // Payload start from here // 5.4.5.16 ~ 5.4.5.32
284 } __attribute__((__packed__));
287 #endif /* _XRAN_PKT_CP_H_ */