1 /******************************************************************************
3 * Copyright (c) 2021 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 * This file consist of macros, structures and prototypes of all FAPI
26 #ifndef _NR5G_FAPI_FAP2PHY_P7_PVT_PROC_H_
27 #define _NR5G_FAPI_FAP2PHY_P7_PVT_PROC_H_
29 #include "nr5g_mac_phy_api.h"
30 #include "fapi_interface.h"
31 #include "fapi_vendor_extension.h"
32 #include "nr5g_fapi_framework.h"
38 // DL/UL_TTI.req common
39 uint8_t nr5g_fapi_calc_n_rbg_size(
42 uint32_t nr5g_fapi_calc_rbg_index(
43 const uint8_t rb_bitmap[FAPI_RB_BITMAP_SIZE],
46 uint32_t(*get_rbg_index_mask)(uint32_t nth_bit));
48 uint16_t nr5g_fapi_get_rb_bits_for_rbg(
49 const uint8_t rb_bitmap[FAPI_RB_BITMAP_SIZE],
52 uint16_t rb_bitmap_mask);
55 uint8_t nr5g_fapi_dl_tti_req_to_phy_translation(
56 p_nr5g_fapi_phy_instance_t p_phy_instance,
57 fapi_dl_tti_req_t * p_fapi_req,
58 fapi_vendor_msg_t * p_fapi_vendor_msg,
59 PDLConfigRequestStruct p_ia_dl_config_req);
61 void nr5g_fapi_dl_tti_req_to_phy_translation_vendor_ext(
62 p_nr5g_fapi_phy_instance_t p_phy_instance,
63 fapi_vendor_msg_t * p_fapi_vendor_msg,
64 PDLConfigRequestStruct p_ia_dl_config_req);
66 void nr5g_fapi_fill_dci_pdu(
67 p_nr5g_fapi_phy_instance_t p_phy_instance,
68 fapi_dl_pdcch_pdu_t * p_pdcch_pdu,
69 PDCIPDUStruct p_dci_pdu);
71 void nr5g_fapi_fill_pdsch_pdu(
72 p_nr5g_fapi_phy_instance_t p_phy_instance,
73 fapi_dl_pdsch_pdu_t * p_pdsch_pdu,
74 PDLSCHPDUStruct p_dlsch_pdu);
76 uint16_t nr5g_fapi_calculate_nEpreRatioOfPDCCHToSSB(
77 uint8_t beta_pdcch_1_0);
79 uint16_t nr5g_fapi_calculate_nEpreRatioOfDmrsToSSB(
80 uint8_t power_control_offset_ss);
82 uint16_t nr5g_fapi_calculate_nEpreRatioOfPDSCHToSSB(
83 uint8_t power_control_offset);
85 uint32_t nr5g_fapi_calc_pdsch_rbg_index(
86 const uint8_t rb_bitmap[FAPI_RB_BITMAP_SIZE],
90 void nr5g_fapi_fill_ssb_pdu(
91 p_nr5g_fapi_phy_instance_t p_phy_instance,
92 PBCHPDUStruct p_bch_pdu,
93 fapi_dl_ssb_pdu_t * p_ssb_pdu);
95 void nr5g_fapi_fill_csi_rs_pdu(
96 p_nr5g_fapi_phy_instance_t p_phy_instance,
97 fapi_dl_csi_rs_pdu_t * p_csi_rs_pdu,
98 PCSIRSPDUStruct pCSIRSPdu);
101 uint32_t nr5g_fapi_calc_pusch_rbg_index(
102 const uint8_t rb_bitmap[FAPI_RB_BITMAP_SIZE],
106 void nr5g_fapi_pusch_data_to_phy_ulsch_translation(
107 nr5g_fapi_pusch_info_t * p_pusch_info,
108 fapi_pusch_data_t * p_pusch_data,
109 ULSCHPDUStruct * p_ul_data_chan);
111 void nr5g_fapi_pusch_uci_to_phy_ulsch_translation(
112 fapi_pusch_uci_t * p_pusch_uci,
113 ULSCHPDUStruct * p_ul_data_chan);
115 void nr5g_fapi_pusch_ptrs_to_phy_ulsch_translation(
116 fapi_pusch_ptrs_t * p_pusch_ptrs,
117 ULSCHPDUStruct * p_ul_data_chan);
119 void nr5g_fapi_pusch_to_phy_ulsch_translation(
120 p_nr5g_fapi_phy_instance_t p_phy_instance,
121 nr5g_fapi_pusch_info_t * p_pusch_info,
122 fapi_ul_pusch_pdu_t * p_pusch_pdu,
123 ULSCHPDUStruct * p_ul_data_chan);
125 uint8_t nr5g_get_pucch_resources_group_id(
127 uint16_t initial_cyclic_shift,
128 uint8_t nr_of_symbols,
129 uint8_t start_symbol_index,
130 uint8_t time_domain_occ_idx,
131 nr5g_fapi_pucch_resources_t * p_pucch_resources);
133 void nr5g_fapi_pucch_to_phy_ulcch_uci_translation(
134 p_nr5g_fapi_phy_instance_t p_phy_instance,
135 nr5g_fapi_pucch_info_t * p_pucch_info,
136 fapi_ul_pucch_pdu_t * p_pucch_pdu,
137 ULCCHUCIPDUStruct * p_ul_ctrl_chan);
139 void nr5g_fapi_srs_to_phy_srs_translation(
140 p_nr5g_fapi_phy_instance_t p_phy_instance,
141 fapi_ul_srs_pdu_t * p_srs_pdu,
142 nr5g_fapi_srs_info_t * p_srs_info,
143 SRSPDUStruct * p_ul_srs_chan);
145 uint8_t nr5g_fapi_ul_tti_req_to_phy_translation(
147 p_nr5g_fapi_phy_instance_t p_phy_instance,
148 fapi_ul_tti_req_t * p_fapi_req,
149 fapi_vendor_msg_t * p_fapi_vendor_msg,
150 PULConfigRequestStruct p_ia_ul_config_req);
152 void nr5g_fapi_ul_tti_req_to_phy_translation_vendor_ext(
153 fapi_vendor_msg_t * p_fapi_vendor_msg,
154 PULConfigRequestStruct p_ia_ul_config_req);
156 uint8_t nr5g_fapi_ul_tti_req_to_phy_translation_vendor_ext_symbol_no(
158 fapi_vendor_msg_t * p_fapi_vendor_msg,
159 PULConfigRequestStruct p_ia_ul_config_req,
162 uint8_t nr5g_fapi_ul_dci_req_to_phy_translation(
163 p_nr5g_fapi_phy_instance_t p_phy_instance,
164 fapi_ul_dci_req_t * p_fapi_req,
165 PULDCIRequestStruct p_ia_ul_dci_req);
167 void nr5g_fapi_ul_dci_req_to_phy_translation_vendor_ext(
168 p_nr5g_fapi_phy_instance_t p_phy_instance,
169 fapi_vendor_msg_t * p_fapi_vendor_msg,
170 PULDCIRequestStruct p_ia_ul_dci_req);
172 uint8_t nr5g_fapi_tx_data_req_to_phy_translation(
173 p_nr5g_fapi_phy_instance_t p_phy_instance,
174 fapi_tx_data_req_t * p_fapi_req,
175 fapi_vendor_msg_t * p_fapi_vendor_msg,
176 PTXRequestStruct p_ia_tx_req);
178 void nr5g_fapi_tx_data_req_to_phy_translation_vendor_ext(
179 fapi_vendor_msg_t * p_fapi_vendor_msg,
180 PTXRequestStruct p_phy_req);
186 #endif //_NR5G_FAPI_FAP2PHY_P7_PVT_PROC_H_