nr_estimation.h 4.83 KB
Newer Older
Hongzhi Wang's avatar
Hongzhi Wang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The OpenAirInterface Software Alliance licenses this file to You under
 * the OAI Public License, Version 1.1  (the "License"); you may not use this file
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

22 23
#ifndef __NR_ESTIMATION_DEFS__H__
#define __NR_ESTIMATION_DEFS__H__
Hongzhi Wang's avatar
Hongzhi Wang committed
24 25 26


#include "PHY/defs_nr_UE.h"
27
//#include "PHY/defs_gNB.h"
Hongzhi Wang's avatar
Hongzhi Wang committed
28 29 30 31 32 33 34 35 36
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
 * @{
 */

/*!\brief Timing drift hysterisis in samples*/
#define SYNCH_HYST 2

/*!
\brief This function performs channel estimation including frequency and temporal interpolation
37 38
\param ue Pointer to UE PHY variables
\param gNB_id Index of target gNB
Hongzhi Wang's avatar
Hongzhi Wang committed
39
\param Ns slot number (0..19)
40
\param symbol symbol within slot
Hongzhi Wang's avatar
Hongzhi Wang committed
41
*/
42
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
43
                                UE_nr_rxtx_proc_t *proc,
44
                                uint8_t gNB_id,
45 46 47 48
                                unsigned char Ns,
                                unsigned char symbol,
                                unsigned short coreset_start_subcarrier,
                                unsigned short nb_rb_coreset);
Hongzhi Wang's avatar
Hongzhi Wang committed
49

50
int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
51
                             UE_nr_rxtx_proc_t *proc,
52
                             uint8_t gNB_id,
53 54
                             unsigned char Ns,
                             unsigned char symbol,
55 56
                             int dmrss,
                             NR_UE_SSB *current_ssb);
57

Hongzhi Wang's avatar
Hongzhi Wang committed
58
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
59
                               UE_nr_rxtx_proc_t *proc,
60
                               uint8_t gNB_id,
Francesco Mani's avatar
Francesco Mani committed
61
                               unsigned char Ns,
62
                               unsigned char symbol,
63 64 65
                               int dmrss,
                               uint8_t ssb_index,
                               uint8_t n_hf);
66 67

int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
68
                                UE_nr_rxtx_proc_t *proc,
69
                                uint8_t gNB_id,
70
                                bool is_SI,
71 72 73
                                unsigned char Ns,
                                unsigned short p,
                                unsigned char symbol,
74
                                unsigned short BWPStart,
75 76
                                unsigned short bwp_start_subcarrier,
                                unsigned short nb_rb_pdsch);
Francesco Mani's avatar
Francesco Mani committed
77

hongzhi wang's avatar
hongzhi wang committed
78
void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
79
                        PHY_VARS_NR_UE *ue,
80
                        module_id_t gNB_id,
81
                        uint8_t frame,
82 83 84
                        uint8_t subframe,
                        unsigned char clear,
                        short coef);
Hongzhi Wang's avatar
Hongzhi Wang committed
85 86
                      
void nr_ue_measurements(PHY_VARS_NR_UE *ue,
87
                        UE_nr_rxtx_proc_t *proc,
cig's avatar
cig committed
88
                        uint8_t slot);
89

90
void nr_ue_rsrp_measurements(PHY_VARS_NR_UE *ue,
cig's avatar
cig committed
91
                             uint8_t gNB_index,
92 93 94
                             UE_nr_rxtx_proc_t *proc,
                             uint8_t slot,
                             uint8_t abstraction_flag);
95

Thomas Schlichter's avatar
Thomas Schlichter committed
96 97 98 99
void nr_ue_rrc_measurements(PHY_VARS_NR_UE *ue,
                            UE_nr_rxtx_proc_t *proc,
                            uint8_t slot);

100 101
void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
                        uint32_t rx_power_fil_dB,
102
                        uint8_t gNB_id);
hongzhi wang's avatar
hongzhi wang committed
103

104
int16_t get_nr_PL(uint8_t Mod_id, uint8_t CC_id, uint8_t gNB_index);
105

106 107 108 109 110
void nr_pdsch_ptrs_processing(PHY_VARS_NR_UE *ue,
                              NR_UE_PDSCH **pdsch_vars,
                              NR_DL_FRAME_PARMS *frame_parms,
                              NR_DL_UE_HARQ_t *dlsch0_harq,
                              NR_DL_UE_HARQ_t *dlsch1_harq,
111
                              uint8_t gNB_id,
112
                              uint8_t nr_slot_rx,
113 114 115 116
                              unsigned char symbol,
                              uint32_t nb_re_pdsch,
                              uint16_t rnti,
                              RX_type_t rx_type);
117

118 119
float_t get_nr_RSRP(module_id_t Mod_id,uint8_t CC_id,uint8_t gNB_index);

Hongzhi Wang's avatar
Hongzhi Wang committed
120
#endif