From cd80a89daa074456b6835dede0f2465fd2d006bd Mon Sep 17 00:00:00 2001 From: Florian Kaltenberger Date: Fri, 10 Dec 2021 16:15:23 +0100 Subject: [PATCH] fixing a bug in the modulation --- openair1/PHY/NR_TRANSPORT/nr_prs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openair1/PHY/NR_TRANSPORT/nr_prs.c b/openair1/PHY/NR_TRANSPORT/nr_prs.c index ce09751ae8..1003b2b782 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_prs.c +++ b/openair1/PHY/NR_TRANSPORT/nr_prs.c @@ -54,12 +54,12 @@ int nr_generate_prs(uint32_t **nr_gold_prs, // QPSK modulation for (int m = 0; m < (12/prs_data->CombSize) * prs_data->NumRB; m++) { - idx = nr_gold_prs[l][m]; + idx = (((nr_gold_prs[l][(m<<1)>>5])>>((m<<1)&0x1f))&3); mod_prs[m<<1] = nr_qpsk_mod_table[idx<<1]; mod_prs[(m<<1)+1] = nr_qpsk_mod_table[(idx<<1) + 1]; - #ifdef DEBUG_PRS_MOD - printf("m %d idx %d gold seq %d mod_prs %d %d\n", m, idx, nr_gold_prs[l][m], mod_prs[(idx<<1)], mod_prs[(idx<<1)+1]); +#ifdef DEBUG_PRS_MOD + printf("m %d idx %d gold seq %d mod_prs %d %d\n", m, idx, nr_gold_prs[l][(m<<1)>>5], mod_prs[m<<1], mod_prs[(m<<1)+1]); #endif #ifdef DEBUG_PRS_MAP