Merge remote-tracking branch 'origin/NR_fix_layer_port_confusion_channel_estimates' into integration_2024_w13

This commit is contained in:
Jaroslava Fiedlerova
2024-04-02 11:33:48 +02:00
8 changed files with 72 additions and 85 deletions
@@ -1500,6 +1500,7 @@ void NFAPI_NR_DMRS_TYPE2_average_prb(NR_DL_FRAME_PARMS *frame_parms,
}
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
int nl,
unsigned short p,
unsigned char symbol,
unsigned char nscid,
@@ -1544,13 +1545,6 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
// 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], pilot, 1000 + p, 0, nb_rb_pdsch + rb_offset, config_type);
uint8_t nushift = 0;
if (config_type == NFAPI_NR_DMRS_TYPE1) {
nushift = (p >> 1) & 1;
} else { // NFAPI_NR_DMRS_TYPE2
nushift = delta;
}
delay_t delay = {0};
for (int aarx = 0; aarx < ue->frame_parms.nb_antennas_rx; aarx++) {
@@ -1561,8 +1555,8 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
printf("============================================\n");
#endif
c16_t *rxF = &rxdataF[aarx][symbol_offset + nushift];
c16_t *dl_ch = (c16_t *)&dl_ch_estimates[p * ue->frame_parms.nb_antennas_rx + aarx][ch_offset];
c16_t *rxF = &rxdataF[aarx][symbol_offset + delta];
c16_t *dl_ch = (c16_t *)&dl_ch_estimates[nl * ue->frame_parms.nb_antennas_rx + aarx][ch_offset];
memset(dl_ch, 0, sizeof(*dl_ch) * ue->frame_parms.ofdm_symbol_size);
if (config_type == NFAPI_NR_DMRS_TYPE1 && ue->chest_freq == 0) {
@@ -1604,7 +1598,7 @@ int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
}
#ifdef DEBUG_PDSCH
dl_ch = (c16_t *)&dl_ch_estimates[p * ue->frame_parms.nb_antennas_rx + aarx][ch_offset];
dl_ch = (c16_t *)&dl_ch_estimates[nl * ue->frame_parms.nb_antennas_rx + aarx][ch_offset];
for (uint16_t idxP = 0; idxP < ceil((float)nb_rb_pdsch * 12 / 8); idxP++) {
for (uint8_t idxI = 0; idxI < 8; idxI++) {
printf("%4d\t%4d\t", dl_ch[idxP * 8 + idxI].r, dl_ch[idxP * 8 + idxI].i);
@@ -77,6 +77,7 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
int nr_pdsch_channel_estimation(PHY_VARS_NR_UE *ue,
const UE_nr_rxtx_proc_t *proc,
int nl,
unsigned short p,
unsigned char symbol,
unsigned char nscid,