set correct type on qpsk modulation table

This commit is contained in:
Laurent THOMAS
2025-01-28 09:50:29 +01:00
parent c73353bed3
commit f272d7d1cc
4 changed files with 31 additions and 45 deletions
@@ -94,7 +94,8 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
int slot_prs =
(proc->nr_slot_rx - rep_num * prs_cfg->PRSResourceTimeGap + frame_params->slots_per_frame) % frame_params->slots_per_frame;
int16_t *rxF, *pil, mod_prs[NR_MAX_PRS_LENGTH << 1];
int16_t *rxF, *pil;
c16_t mod_prs[NR_MAX_PRS_LENGTH];
const int16_t *fl, *fm, *fmm, *fml, *fmr, *fr;
int16_t ch[2] = {0}, noiseFig[2] = {0};
int16_t k_prime = 0, k = 0;
@@ -138,8 +139,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
for (int m = 0; m < num_pilots; m++)
{
idx = (((gold_prs[(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];
mod_prs[m] = nr_qpsk_mod_table[idx];
}
for (rxAnt=0; rxAnt < frame_params->nb_antennas_rx; rxAnt++)
@@ -152,7 +152,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
k = (prs_cfg->REOffset + k_prime) % prs_cfg->CombSize + prs_cfg->RBOffset * 12 + frame_params->first_carrier_offset;
// Channel estimation and interpolation
pil = (int16_t *)&mod_prs[0];
pil = (int16_t *)mod_prs;
rxF = (int16_t *)&rxdataF[rxAnt][l*frame_params->ofdm_symbol_size + k];
if(prs_cfg->CombSize == 2)
@@ -520,7 +520,7 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
#ifdef DEBUG_PRS_CHEST
sprintf(filename, "%s%i%s", "PRSpilot_", rxAnt, ".m");
LOG_M(filename, "prs_loc", &mod_prs[0], num_pilots,1,1);
LOG_M(filename, "prs_loc", mod_prs, num_pilots, 1, 1);
sprintf(filename, "%s%i%s", "rxSigF_", rxAnt, ".m");
sprintf(varname, "%s%i", "rxF_", rxAnt);
LOG_M(filename, varname, &rxdataF[rxAnt][0], prs_cfg->NumPRSSymbols*frame_params->ofdm_symbol_size,1,1);