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 Header file for function to work with 5G NR frame structure and related
23 * @file xran_frame_struct.h
24 * @ingroup group_source_xran
25 * @author Intel Corporation
28 #ifndef _XRAN_FRAME_STRUCT_
29 #define _XRAN_FRAME_STRUCT_
36 #include "xran_fh_o_du.h"
38 uint32_t xran_fs_get_tti_interval(uint8_t nMu);
39 uint32_t xran_fs_get_scs(uint8_t nMu);
41 //-------------------------------------------------------------------------------------------
42 /** @ingroup group_nr5g_source_phy_common
44 * @param[in] nNumerology - Numerology determine sub carrier spacing, Value: 0->4 0: 15khz, 1: 30khz, 2: 60khz 3: 120khz, 4: 240khz
45 * @param[in] nBandwidth - Carrier bandwidth for in MHz. Value: 5->400
46 * @param[in] nAbsFrePointA - Abs Freq Point A of the Carrier Center Frequency for in KHz Value: 450000->52600000
48 * @return Number of RBs in cell
51 * Returns number of RBs based on 38.101-1 and 38.101-2 for the cell
54 //-------------------------------------------------------------------------------------------
55 uint16_t xran_fs_get_num_rbs(uint32_t nNumerology, uint32_t nBandwidth, uint32_t nAbsFrePointA);
57 //-------------------------------------------------------------------------------------------
58 /** @ingroup phy_cal_nrarfcn
60 * @param[in] center frequency
65 * This calculates NR-ARFCN value according to center frequency
68 //-------------------------------------------------------------------------------------------
69 uint32_t xran_fs_cal_nrarfcn(uint32_t nCenterFreq);
70 int32_t xran_fs_slot_limit(int32_t nSlotIdx);
71 void xran_fs_clear_slot_type(uint32_t nCcId);
72 int32_t xran_fs_set_slot_type(uint32_t nCcId, uint32_t nFrameDuplexType, uint32_t nTddPeriod, struct xran_slot_config* psSlotConfig);
73 int32_t xran_fs_get_slot_type(int32_t nCcId, int32_t nSlotIdx, int32_t nType);
74 uint32_t xran_fs_slot_limit_init(int32_t tti_interval_us);
75 uint32_t xran_fs_get_max_slot(void);
76 int32_t xran_fs_get_symbol_type(int32_t nCellIdx, int32_t nSlotdx, int32_t nSymbIdx);
82 #endif /* _XRAN_FRAME_STRUCT_ */