diff --git a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c index 36e737f0e6..9ca768f690 100644 --- a/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c +++ b/openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c @@ -110,8 +110,16 @@ int nr_pusch_channel_estimation(PHY_VARS_gNB *gNB, } if (pusch_pdu->transform_precoding == transformPrecoder_disabled) { - nr_pusch_dmrs_rx(gNB, Ns, gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], (int32_t *)pilot, (1000+p), 0, nb_rb_pusch, - (pusch_pdu->bwp_start + pusch_pdu->rb_start)*NR_NB_SC_PER_RB, pusch_pdu->dmrs_config_type); + // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS + nr_pusch_dmrs_rx(gNB, + Ns, + gNB->nr_gold_pusch_dmrs[pusch_pdu->scid][Ns][symbol], + (int32_t *)pilot, + (1000 + p), + 0, + nb_rb_pusch, + (pusch_pdu->bwp_start + pusch_pdu->rb_start) * NR_NB_SC_PER_RB, + pusch_pdu->dmrs_config_type); } else { // if transform precoding or SC-FDMA is enabled in Uplink // NR_SC_FDMA supports type1 DMRS so only 6 DMRS REs per RB possible const uint16_t index = get_index_for_dmrs_lowpapr_seq(nb_rb_pusch * (NR_NB_SC_PER_RB/2)); diff --git a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c index 5da33435ed..726d116457 100644 --- a/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c +++ b/openair1/PHY/NR_REFSIG/nr_dmrs_rx.c @@ -195,9 +195,7 @@ int nr_pdcch_dmrs_rx(PHY_VARS_NR_UE *ue, } -int nr_pbch_dmrs_rx(int symbol, - unsigned int *nr_gold_pbch, - int32_t *output) +int nr_pbch_dmrs_rx(int symbol, unsigned int *nr_gold_pbch, int32_t *output) { int m,m0,m1; uint8_t idx=0; @@ -257,14 +255,14 @@ void nr_gen_ref_conj_symbols(uint32_t *in, uint32_t length, int16_t *output, uin } int nr_pusch_lowpaprtype1_dmrs_rx(PHY_VARS_gNB *gNB, - unsigned int Ns, - int16_t *dmrs_seq, - int32_t *output, - unsigned short p, - unsigned char lp, - unsigned short nb_pusch_rb, - uint32_t re_offset, - uint8_t dmrs_type) + unsigned int Ns, + int16_t *dmrs_seq, + int32_t *output, + unsigned short p, + unsigned char lp, + unsigned short nb_pusch_rb, + uint32_t re_offset, + uint8_t dmrs_type) { int8_t w, nb_dmrs; int k; diff --git a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c index a310e7d127..7cae5c135d 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -658,7 +658,8 @@ int nr_pbch_dmrs_correlation(PHY_VARS_NR_UE *ue, #endif // generate pilot - nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]); + // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS + nr_pbch_dmrs_rx(dmrss, ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]); for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { @@ -898,7 +899,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue, } // generate pilot - nr_pbch_dmrs_rx(dmrss,ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]); + // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS + nr_pbch_dmrs_rx(dmrss, ue->nr_gold_pbch[n_hf][ssb_index], &pilot[0]); for (int aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { @@ -1111,7 +1113,8 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue, dmrs_ref = BWPStart; // generate pilot int pilot[(nb_rb_coreset + dmrs_ref) * 3] __attribute__((aligned(16))); - nr_pdcch_dmrs_rx(ue,Ns,ue->nr_gold_pdcch[gNB_id][Ns][symbol], &pilot[0],2000,(nb_rb_coreset+dmrs_ref)); + // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS + nr_pdcch_dmrs_rx(ue, Ns, ue->nr_gold_pdcch[gNB_id][Ns][symbol], &pilot[0], 2000, (nb_rb_coreset + dmrs_ref)); for (aarx=0; aarxframe_parms.nb_antennas_rx; aarx++) { @@ -1648,7 +1651,15 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue, } c16_t pilot[3280] __attribute__((aligned(16))); - nr_pdsch_dmrs_rx(ue, Ns, ue->nr_gold_pdsch[gNB_id][Ns][symbol][nscid], (int32_t *)pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type); + // Note: pilot returned by the following function is already the complex conjugate of the transmitted DMRS + nr_pdsch_dmrs_rx(ue, + Ns, + ue->nr_gold_pdsch[gNB_id][Ns][symbol][nscid], + (int32_t *)pilot, + 1000 + p, + 0, + nb_rb_pdsch + rb_offset, + config_type); uint8_t nushift = 0; if (config_type == NFAPI_NR_DMRS_TYPE1) {