o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
fhi_lib
lib
api
xran_pkt_up.h
Go to the documentation of this file.
1
/******************************************************************************
2
*
3
* Copyright (c) 2019 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
36
#ifndef _XRAN_PKT_UP_H_
37
#define _XRAN_PKT_UP_H_
38
39
#ifdef __cplusplus
40
extern
"C"
{
41
#endif
42
43
#include "
xran_pkt.h
"
44
45
#define IQ_PAIR_NUM_IN_RB 12
46
#define MAX_DATA_SECTIONS_NUM 273
47
#define MAX_IQ_BIT_WIDTH 16
48
49
/* currently library supports I and Q sizes of 8 and 16 bits each */
50
#define IQ_BITS MAX_IQ_BIT_WIDTH
51
52
/*
53
* Structure holding data section header fields
54
* It is repeated for every section ID in xRAN packet
55
*/
56
67
struct
data_section_hdr
{
68
union
{
69
uint32_t
all_bits
;
70
struct
{
71
uint32_t
num_prbu
:8;
72
uint32_t
start_prbu
:10;
73
uint32_t
sym_inc
:1;
74
uint32_t
rb
:1;
75
uint32_t
sect_id
:12;
76
};
77
}
fields
;
78
}
__rte_packed
;
79
80
81
/*
82
******************************************************************************
83
* @ingroup xran_up_pkt
84
*
85
* @description
86
* Structure holds compression header structure and field reserved for future use.
87
* reserved goes always with udCompHdr in u-plane pkt
88
* U-plane as per 6.3.2 DL/UL Data
89
*****************************************************************************/
90
struct
data_section_compression_hdr
91
{
92
struct
compression_hdr
ud_comp_hdr;
93
uint8_t
rsrvd
;
98
/* TODO: support for Block Floating Point compression */
99
/* udCompMeth 0000b = no compression absent*/
100
};
101
102
/*
103
******************************************************************************
104
* @ingroup xran_up_pkt
105
*
106
* @description
107
* Structure holds the compression parameters by the compression header.
108
* may not be present by udCompMeth in 6.3.3.13
109
*****************************************************************************/
110
union
compression_params
{
111
struct
block_fl_point
{
112
uint8_t
exponent
:4;
113
uint8_t
reserved
:4;
114
} blockFlPoint;
115
struct
block_scaling
{
116
uint8_t
sblockScaler
;
117
} blockScaling;
118
struct
u_law
{
119
uint8_t
compShift
:4;
120
uint8_t
compBitWidth
:4;
121
} uLaw;
122
}
__rte_packed
;
123
124
125
/*
126
******************************************************************************
127
* @ingroup xran_up_pkt
128
*
129
* @description
130
* Structure holds an IQ sample pair
131
* U-plane as per 6.3.2 DL/UL Data
132
* Each bit field size is defined with IQ_BITS macro
133
* Currently supported I and Q sizes are 8 and 16 bits
134
*****************************************************************************/
135
struct
rb_map
136
{
137
int16_t
i_sample
:
IQ_BITS
;
138
int16_t
q_sample
:
IQ_BITS
;
139
}
__rte_packed
;
140
149
struct
xran_up_pkt_hdr
150
{
151
struct
xran_ecpri_hdr
ecpri_hdr;
152
struct
radio_app_common_hdr
app_hdr;
153
struct
data_section_hdr
data_sec_hdr;
154
}
__rte_packed
;
155
156
165
struct
eth_xran_up_pkt_hdr
166
{
167
struct
ether_hdr eth_hdr;
168
struct
xran_up_pkt_hdr
xran_hdr;
169
}
__rte_packed
;
170
171
#ifdef __cplusplus
172
}
173
#endif
174
175
#endif
data_section_hdr::sym_inc
uint32_t sym_inc
Definition:
xran_pkt_up.h:73
data_section_hdr::rb
uint32_t rb
Definition:
xran_pkt_up.h:74
compression_params::u_law
Definition:
xran_pkt_up.h:118
data_section_compression_hdr
Definition:
xran_pkt_up.h:90
compression_params::block_fl_point::exponent
uint8_t exponent
Definition:
xran_pkt_up.h:112
data_section_compression_hdr::rsrvd
uint8_t rsrvd
Definition:
xran_pkt_up.h:93
data_section_hdr
Definition:
xran_pkt_up.h:67
rb_map::q_sample
int16_t q_sample
Definition:
xran_pkt_up.h:138
compression_params::block_scaling::sblockScaler
uint8_t sblockScaler
Definition:
xran_pkt_up.h:116
compression_params::u_law::compBitWidth
uint8_t compBitWidth
Definition:
xran_pkt_up.h:120
data_section_hdr::num_prbu
uint32_t num_prbu
Definition:
xran_pkt_up.h:71
compression_params::block_fl_point::reserved
uint8_t reserved
Definition:
xran_pkt_up.h:113
compression_params::block_scaling
Definition:
xran_pkt_up.h:115
rb_map
Definition:
xran_pkt_up.h:135
xran_ecpri_hdr
Definition:
xran_pkt.h:130
data_section_hdr::all_bits
uint32_t all_bits
Definition:
xran_pkt_up.h:69
IQ_BITS
#define IQ_BITS
Definition:
xran_pkt_up.h:50
compression_params
Definition:
xran_pkt_up.h:110
data_section_hdr::start_prbu
uint32_t start_prbu
Definition:
xran_pkt_up.h:72
xran_pkt.h
Definitions and support functions to process XRAN packet.
data_section_hdr::sect_id
uint32_t sect_id
Definition:
xran_pkt_up.h:75
__rte_packed
struct data_section_hdr __rte_packed
xran_up_pkt_hdr
Definition:
xran_pkt_up.h:149
compression_params::block_fl_point
Definition:
xran_pkt_up.h:111
rb_map::i_sample
int16_t i_sample
Definition:
xran_pkt_up.h:137
data_section_hdr::fields
union data_section_hdr::@18 fields
radio_app_common_hdr
Definition:
xran_pkt.h:162
eth_xran_up_pkt_hdr
Definition:
xran_pkt_up.h:165
compression_params::u_law::compShift
uint8_t compShift
Definition:
xran_pkt_up.h:119
compression_hdr
Definition:
xran_pkt.h:206
Generated by
1.8.13