O-RAN E Maintenance Release contribution for ODULOW
[o-du/phy.git] / fhi_lib / lib / src / xran_prach_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 Header file to PRACH specific config structures
21  * @file xran_prach_cfg.h
22  * @author Intel Corporation
23  **/
24
25 #ifndef _XRAN_PRACH_CFG_H_
26 #define _XRAN_PRACH_CFG_H_
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #include <stdint.h>
33
34 /* PRACH configuration table defines */
35 #define XRAN_PRACH_CANDIDATE_PREAMBLE    (2)
36 #define XRAN_PRACH_CANDIDATE_Y           (2)
37 #define XRAN_PRACH_CANDIDATE_SLOT        (40)
38 #define XRAN_PRACH_CONFIG_TABLE_SIZE     (256)
39 #define XRAN_PRACH_PREAMBLE_FORMAT_OF_ABC (9)
40
41 typedef enum
42 {
43     FORMAT_0 = 0,
44     FORMAT_1,
45     FORMAT_2,
46     FORMAT_3,
47     FORMAT_A1,
48     FORMAT_A2,
49     FORMAT_A3,
50     FORMAT_B1,
51     FORMAT_B2,
52     FORMAT_B3,
53     FORMAT_B4,
54     FORMAT_C0,
55     FORMAT_C2,
56     FORMAT_LAST
57 }PreambleFormatEnum;
58
59 /* add PRACH used config table, same structure as used in refPHY */
60 typedef struct
61 {
62     uint8_t     prachConfigIdx;
63     uint8_t     preambleFmrt[XRAN_PRACH_CANDIDATE_PREAMBLE];
64     uint8_t     x;
65     uint8_t     y[XRAN_PRACH_CANDIDATE_Y];
66     uint8_t     slotNr[XRAN_PRACH_CANDIDATE_SLOT];
67     uint8_t     slotNrNum;
68     uint8_t     startingSym;
69     uint8_t     nrofPrachInSlot;
70     uint8_t     occassionsInPrachSlot;
71     uint8_t     duration;
72 } xRANPrachConfigTableStruct;
73
74 typedef struct
75 {
76     uint8_t    preambleFmrt;
77     uint16_t   lRALen;
78     uint8_t    fRA;
79     uint32_t    nu;
80     uint16_t   nRaCp;
81 }xRANPrachPreambleLRAStruct;
82
83 struct xran_prach_cp_config
84 {
85     uint8_t    filterIdx;
86     uint8_t    startSymId;
87     uint16_t   startPrbc;
88     uint8_t    numPrbc;
89     uint8_t    numSymbol;
90     uint16_t   timeOffset;
91     int32_t    freqOffset;
92     uint8_t    nrofPrachInSlot;
93     uint8_t    occassionsInPrachSlot;
94     uint8_t    x;
95     uint8_t    y[XRAN_PRACH_CANDIDATE_Y];
96     uint8_t    isPRACHslot[XRAN_PRACH_CANDIDATE_SLOT];
97     uint8_t    eAxC_offset;  /**< starting eAxC for PRACH stream */
98 };
99
100 extern const xRANPrachConfigTableStruct gxranPrachDataTable_sub6_fdd[XRAN_PRACH_CONFIG_TABLE_SIZE];
101 extern const xRANPrachConfigTableStruct gxranPrachDataTable_sub6_tdd[XRAN_PRACH_CONFIG_TABLE_SIZE];
102 extern const xRANPrachConfigTableStruct gxranPrachDataTable_mmw[XRAN_PRACH_CONFIG_TABLE_SIZE];
103 extern const xRANPrachPreambleLRAStruct gxranPreambleforLRA[13];
104
105 #ifdef __cplusplus
106 }
107 #endif
108
109 #endif