Commit 8ee10be2 authored by Hongzhi Wang's avatar Hongzhi Wang

ue nr pdcch channel est update

parent a79992bc
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "PHY/defs_nr_UE.h" #include "PHY/defs_nr_UE.h"
#include "modulation_UE.h" #include "modulation_UE.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
//#define DEBUG_FEP //#define DEBUG_FEP
...@@ -48,6 +49,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -48,6 +49,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
int i; int i;
unsigned int frame_length_samples = frame_parms->samples_per_subframe * 10; unsigned int frame_length_samples = frame_parms->samples_per_subframe * 10;
unsigned int rx_offset; unsigned int rx_offset;
//NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[Ns>>1]][0];
uint16_t coreset_start_subcarrier = frame_parms->first_carrier_offset;
uint16_t nb_rb_coreset = 24;
/*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id]; /*LTE_UE_DLSCH_t **dlsch_ue = phy_vars_ue->dlsch_ue[eNB_id];
unsigned char harq_pid = dlsch_ue[0]->current_harq_pid; unsigned char harq_pid = dlsch_ue[0]->current_harq_pid;
...@@ -242,7 +246,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, ...@@ -242,7 +246,9 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
Ns, Ns,
aa, aa,
l, l,
symbol); symbol,
coreset_start_subcarrier,
nb_rb_coreset);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->dlsch_channel_estimation_stats); stop_meas(&ue->dlsch_channel_estimation_stats);
#endif #endif
......
...@@ -229,6 +229,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -229,6 +229,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
unsigned char p, unsigned char p,
unsigned char l, unsigned char l,
unsigned char symbol, unsigned char symbol,
unsigned short coreset_start_subcarrier,
unsigned short nb_rb_coreset) unsigned short nb_rb_coreset)
{ {
int pilot[2][200] __attribute__((aligned(16))); int pilot[2][200] __attribute__((aligned(16)));
...@@ -241,8 +242,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -241,8 +242,8 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
//uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1]; //uint16_t Nid_cell = (eNB_offset == 0) ? ue->frame_parms.Nid_cell : ue->measurements.adj_cell_id[eNB_offset-1];
uint8_t nushift; uint8_t nushift;
int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].dl_ch_estimates[eNB_offset]; int **dl_ch_estimates =ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].dl_ch_estimates[eNB_offset];
int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns]].rxdataF; int **rxdataF=ue->common_vars.common_vars_rx_data_per_thread[ue->current_thread_id[Ns>>1]].rxdataF;
nushift = 1; nushift = 1;
ue->frame_parms.nushift = nushift; ue->frame_parms.nushift = nushift;
...@@ -254,7 +255,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -254,7 +255,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol; symbol_offset = ue->frame_parms.ofdm_symbol_size*symbol;
k = nushift; k = coreset_start_subcarrier;
#ifdef DEBUG_CH #ifdef DEBUG_CH
printf("PBCH Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d\n",ue->current_thread_id[Ns>>1], eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size, printf("PBCH Channel Estimation : ThreadId %d, eNB_offset %d cell_id %d ch_offset %d, OFDM size %d, Ncp=%d, l=%d, Ns=%d, k=%d symbol %d\n",ue->current_thread_id[Ns>>1], eNB_offset,Nid_cell,ch_offset,ue->frame_parms.ofdm_symbol_size,
...@@ -271,7 +272,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -271,7 +272,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) { for (aarx=0; aarx<ue->frame_parms.nb_antennas_rx; aarx++) {
pil = (int16_t *)&pilot[p][0]; pil = (int16_t *)&pilot[p][0];
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+(ue->frame_parms.ofdm_symbol_size-12*(nb_rb_coreset>>1)))]; rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];
dl_ch = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset]; dl_ch = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][ch_offset];
memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size)); memset(dl_ch,0,4*(ue->frame_parms.ofdm_symbol_size));
...@@ -329,11 +330,13 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -329,11 +330,13 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
pil+=2; pil+=2;
rxF+=8; rxF+=8;
dl_ch+=24; dl_ch+=24;
k+=12;
for (pilot_cnt=3; pilot_cnt<(3*24); pilot_cnt+=3) { for (pilot_cnt=3; pilot_cnt<(3*nb_rb_coreset); pilot_cnt+=3) {
if (pilot_cnt == 36) if (k >= ue->frame_parms.ofdm_symbol_size){
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k)]; k-=ue->frame_parms.ofdm_symbol_size;
rxF = (int16_t *)&rxdataF[aarx][(symbol_offset+k+nushift)];}
ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15); ch[0] = (int16_t)(((int32_t)pil[0]*rxF[0] - (int32_t)pil[1]*rxF[1])>>15);
ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15); ch[1] = (int16_t)(((int32_t)pil[0]*rxF[1] + (int32_t)pil[1]*rxF[0])>>15);
...@@ -377,6 +380,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, ...@@ -377,6 +380,7 @@ int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
pil+=2; pil+=2;
rxF+=8; rxF+=8;
dl_ch+=24; dl_ch+=24;
k+=12;
} }
......
...@@ -19,12 +19,12 @@ ...@@ -19,12 +19,12 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
#ifndef __LTE_ESTIMATION_DEFS__H__ #ifndef __NR_ESTIMATION_DEFS__H__
#define __LTE_ESTIMATION_DEFS__H__ #define __NR_ESTIMATION_DEFS__H__
#include "PHY/defs_nr_UE.h" #include "PHY/defs_nr_UE.h"
#include "PHY/defs_gNB.h" //#include "PHY/defs_gNB.h"
/** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_ /** @addtogroup _PHY_PARAMETER_ESTIMATION_BLOCKS_
* @{ * @{
*/ */
...@@ -42,13 +42,15 @@ ...@@ -42,13 +42,15 @@
\param l symbol within slot \param l symbol within slot
\param symbol symbol within frame \param symbol symbol within frame
*/ */
int nr_dl_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
uint8_t eNB_id, uint8_t eNB_id,
uint8_t eNB_offset, uint8_t eNB_offset,
unsigned char Ns, unsigned char Ns,
unsigned char p, unsigned char p,
unsigned char l, unsigned char l,
unsigned char symbol); unsigned char symbol,
unsigned short coreset_start_subcarrier,
unsigned short nb_rb_coreset);
int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
uint8_t eNB_id, uint8_t eNB_id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment