From c01359215da96795f5bd665d95e447b003a9d464 Mon Sep 17 00:00:00 2001 From: Thomas Schlichter Date: Mon, 24 Jul 2023 11:46:24 +0200 Subject: [PATCH] NR_UE: improve NFAPI_NR_DMRS_TYPE1_linear_interp() The DL filter was shifted relative to the contributing DM-RS pilots. This is fixed by using the UL filter from gNB. --- openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h | 7 +------ .../PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c | 10 ++++++---- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h b/openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h index 2ab6b7e63b..3f0f70526e 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h +++ b/openair1/PHY/NR_UE_ESTIMATION/filt16a_32.h @@ -252,12 +252,7 @@ static const short filt8_rep4[8] = {16384, 16384, 16384, 16384, 0, 0, 0, 0}; // DL // DMRS_Type1 -static const short filt16_dl_first[16] = {12228, 12228, 12228, 12228, 8192, 8192, 8192, 8192, 4096, 4096, 4096, 4096, 0, 0, 0, 0}; - -static const short filt16_dl_middle[16] = - {2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048}; - -static const short filt16_dl_last[16] = {4096, 4096, 4096, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +// using UL filter // DMRS_Type2 static const short filt16_dl_first_type2[16] = {16384, 16384, 16384, 8192, 8192, 8192, 8192, 8192, 8192, 0, 0, 0, 0, 0, 0}; 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 1dc97cc674..60d2368a48 100644 --- a/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c +++ b/openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c @@ -1300,13 +1300,15 @@ void NFAPI_NR_DMRS_TYPE1_linear_interp(NR_DL_FRAME_PARMS *frame_parms, #endif if (pilot_cnt == 0) { // Treat first pilot - c16multaddVectRealComplex(filt16_dl_first, &ch, dl_ch, 16); + c16multaddVectRealComplex(filt16_ul_p0, &ch, dl_ch, 16); + } else if (pilot_cnt == 1 || pilot_cnt == 2) { + c16multaddVectRealComplex(filt16_ul_p1p2, &ch, dl_ch, 16); } else if (pilot_cnt == 6 * nb_rb_pdsch - 1) { // Treat last pilot - c16multaddVectRealComplex(filt16_dl_last, &ch, dl_ch, 16); + c16multaddVectRealComplex(filt16_ul_last, &ch, dl_ch, 16); } else { // Treat middle pilots - c16multaddVectRealComplex(filt16_dl_middle, &ch, dl_ch, 16); + c16multaddVectRealComplex(filt16_ul_middle, &ch, dl_ch, 16); if (pilot_cnt % 2 == 0) { - dl_ch += 4; + dl_ch += 4; } } }