nr_estimation.h 3.74 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 37 38 39 40 41 42 43 44
/** @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
\param phy_vars_ue Pointer to UE PHY variables
\param eNB_id Index of target eNB
\param eNB_offset Offset for interfering eNB (in terms cell ID mod 3)
\param Ns slot number (0..19)
\param p antenna port
\param l symbol within slot
\param symbol symbol within frame
*/
45
int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
46 47 48 49 50
                                uint8_t eNB_offset,
                                unsigned char Ns,
                                unsigned char symbol,
                                unsigned short coreset_start_subcarrier,
                                unsigned short nb_rb_coreset);
Hongzhi Wang's avatar
Hongzhi Wang committed
51

52 53 54 55
int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue,
                             uint8_t eNB_offset,
                             unsigned char Ns,
                             unsigned char symbol,
56 57
                             int dmrss,
                             NR_UE_SSB *current_ssb);
58

Hongzhi Wang's avatar
Hongzhi Wang committed
59
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
Francesco Mani's avatar
Francesco Mani committed
60 61
                               uint8_t eNB_offset,
                               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 69 70 71 72 73
                                uint8_t eNB_offset,
                                unsigned char Ns,
                                unsigned short p,
                                unsigned char symbol,
                                unsigned short bwp_start_subcarrier,
                                unsigned short nb_rb_pdsch);
Francesco Mani's avatar
Francesco Mani committed
74

hongzhi wang's avatar
hongzhi wang committed
75
void nr_adjust_synch_ue(NR_DL_FRAME_PARMS *frame_parms,
76 77 78 79 80
                        PHY_VARS_NR_UE *ue,
                        module_id_t eNB_id,
                        uint8_t subframe,
                        unsigned char clear,
                        short coef);
Hongzhi Wang's avatar
Hongzhi Wang committed
81 82
                      
void nr_ue_measurements(PHY_VARS_NR_UE *ue,
83 84 85 86 87 88 89 90 91
                        unsigned int subframe_offset,
                        unsigned char N0_symbol,
                        unsigned char abstraction_flag,
                        unsigned char rank_adaptation,
                        uint8_t subframe);

void phy_adjust_gain_nr(PHY_VARS_NR_UE *ue,
                        uint32_t rx_power_fil_dB,
                        uint8_t eNB_id);
hongzhi wang's avatar
hongzhi wang committed
92

Francesco Mani's avatar
Francesco Mani committed
93
int16_t get_nr_PL(PHY_VARS_NR_UE *ue,uint8_t gNB_index);
94 95


Hongzhi Wang's avatar
Hongzhi Wang committed
96
#endif