Fixed pdsch_ue Rank indicator error messages for 4 antenna port cells

master
Xavier Arteaga 7 years ago
parent 415b528aff
commit a4c0cda237

@ -685,21 +685,22 @@ int main(int argc, char **argv) {
/* Transmission mode 1 */
n = srslte_ue_dl_decode(&ue_dl, data, 0, sfn*10+srslte_ue_sync_get_sfidx(&ue_sync), acks);
} else {
if (prog_args.rf_nof_rx_ant == 1) {
/* Transmission mode 2 */
n = srslte_ue_dl_decode(&ue_dl, data, 1, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks);
} else {
if (n < 1) {
/* Transmission mode 3 */
n = srslte_ue_dl_decode(&ue_dl, data, 2, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks);
}
if (n < 1) {
/* Transmission mode 4 */
n = srslte_ue_dl_decode(&ue_dl, data, 3, sfn * 10 + srslte_ue_sync_get_sfidx(&ue_sync),
acks);
}
}
}
// Feed-back ue_sync with chest_dl CFO estimation
if (sfidx == 5 && prog_args.enable_cfo_ref) {
@ -817,18 +818,21 @@ int main(int argc, char **argv) {
/* MIMO: if tx and rx antennas are bigger than 1 */
if (cell.nof_ports > 1 && ue_dl.pdsch.nof_rx_antennas > 1) {
/* Compute condition number */
srslte_ue_dl_ri_select(&ue_dl, NULL, &cn);
if (srslte_ue_dl_ri_select(&ue_dl, NULL, &cn)) {
/* Condition number calculation is not supported for the number of tx & rx antennas*/
PRINT_LINE(" κ: NA");
} else {
/* Print condition number */
PRINT_LINE(" κ: %.1f dB (Condition number, 0 dB => Best)", cn);
}
}
PRINT_LINE("");
/* Spatial multiplex only */
if (ue_dl.pdsch_cfg.mimo_type == SRSLTE_MIMO_TYPE_SPATIAL_MULTIPLEX) {
/* Compute Rank Indicator (RI) and Precoding Matrix Indicator (PMI) */
srslte_ue_dl_ri_pmi_select(&ue_dl, &ri, &pmi, NULL);
if (!srslte_ue_dl_ri_pmi_select(&ue_dl, &ri, &pmi, NULL)) {
for (uint32_t nl = 0; nl < SRSLTE_MAX_LAYERS; nl++) {
for (uint32_t cb = 0; cb < SRSLTE_MAX_CODEBOOKS; cb++) {
sinr[nl][cb] = SRSLTE_VEC_EMA(ue_dl.sinr[nl][cb], sinr[nl][cb], 0.5f);
@ -847,6 +851,7 @@ int main(int argc, char **argv) {
PRINT_LINE(" | 3 | %5.2f%c| ", 10 * log10(sinr[0][3]), (ri == 1 && pmi == 3) ? '*' : ' ');
PRINT_LINE("");
}
}
PRINT_LINE("Press enter maximum printing debug log of 1 subframe.");
PRINT_LINE("");
PRINT_LINE_RESET_CURSOR();

@ -689,13 +689,13 @@ int srslte_predecoding_ccd_zf(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[SRSLTE_MAX_PORT
#endif /* LV_HAVE_SSE */
#endif /* LV_HAVE_AVX */
} else {
fprintf(stderr, "Error predecoding CCD: Invalid number of layers %d\n", nof_layers);
DEBUG("Error predecoding CCD: Invalid number of layers %d\n", nof_layers);
return -1;
}
} else if (nof_ports == 4) {
fprintf(stderr, "Error predecoding CCD: Only 2 ports supported\n");
DEBUG("Error predecoding CCD: Only 2 ports supported\n");
} else {
fprintf(stderr, "Error predecoding CCD: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant);
DEBUG("Error predecoding CCD: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant);
}
return SRSLTE_ERROR;
}
@ -816,13 +816,13 @@ int srslte_predecoding_ccd_mmse(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[SRSLTE_MAX_PO
#endif /* LV_HAVE_SSE */
#endif /* LV_HAVE_AVX */
} else {
fprintf(stderr, "Error predecoding CCD: Invalid number of layers %d\n", nof_layers);
DEBUG("Error predecoding CCD: Invalid number of layers %d\n", nof_layers);
return -1;
}
} else if (nof_ports == 4) {
fprintf(stderr, "Error predecoding CCD: Only 2 ports supported\n");
DEBUG("Error predecoding CCD: Only 2 ports supported\n");
} else {
fprintf(stderr, "Error predecoding CCD: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant);
DEBUG("Error predecoding CCD: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant);
}
return SRSLTE_ERROR;
}
@ -843,7 +843,7 @@ int srslte_predecoding_multiplex_2x2_zf_avx(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[S
norm = 2.0f / scaling;
break;
default:
ERROR("Wrong codebook_idx=%d", codebook_idx);
DEBUG("Wrong codebook_idx=%d", codebook_idx);
return SRSLTE_ERROR;
}
@ -874,7 +874,7 @@ int srslte_predecoding_multiplex_2x2_zf_avx(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[S
h11 = _mm256_sub_ps(_h01, _MM256_MULJ_PS(_h11));
break;
default:
fprintf(stderr, "Wrong codebook_idx=%d\n", codebook_idx);
DEBUG("Wrong codebook_idx=%d\n", codebook_idx);
return SRSLTE_ERROR;
}
@ -1405,9 +1405,9 @@ int srslte_predecoding_multiplex(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[SRSLTE_MAX_P
#endif /* LV_HAVE_AVX */
}
} else if (nof_ports == 4) {
ERROR("Error predecoding multiplex: not implemented for %d Tx ports", nof_ports);
DEBUG("Error predecoding multiplex: not implemented for %d Tx ports", nof_ports);
} else {
ERROR("Error predecoding multiplex: Invalid combination of ports %d and rx antennas %d\n", nof_ports, nof_rxant);
DEBUG("Error predecoding multiplex: Invalid combination of ports %d and rx antennas %d\n", nof_ports, nof_rxant);
}
return SRSLTE_ERROR;
}
@ -1445,8 +1445,7 @@ int srslte_predecoding_type(cf_t *y[SRSLTE_MAX_PORTS], cf_t *h[SRSLTE_MAX_PORTS]
break;
}
} else {
fprintf(stderr,
"Invalid number of layers %d\n", nof_layers);
DEBUG("Invalid number of layers %d\n", nof_layers);
return -1;
}
return -1;
@ -1611,7 +1610,7 @@ int srslte_precoding_cdd(cf_t *x[SRSLTE_MAX_LAYERS], cf_t *y[SRSLTE_MAX_PORTS],
{
if (nof_ports == 2) {
if (nof_layers != 2) {
fprintf(stderr, "Invalid number of layers %d for 2 ports\n", nof_layers);
DEBUG("Invalid number of layers %d for 2 ports\n", nof_layers);
return -1;
}
#ifdef LV_HAVE_AVX
@ -1624,10 +1623,10 @@ int srslte_precoding_cdd(cf_t *x[SRSLTE_MAX_LAYERS], cf_t *y[SRSLTE_MAX_PORTS],
#endif /* LV_HAVE_SSE */
#endif /* LV_HAVE_AVX */
} else if (nof_ports == 4) {
fprintf(stderr, "Not implemented\n");
DEBUG("Not implemented\n");
return -1;
} else {
fprintf(stderr, "Number of ports must be 2 or 4 for transmit diversity (nof_ports=%d)\n", nof_ports);
DEBUG("Number of ports must be 2 or 4 for transmit diversity (nof_ports=%d)\n", nof_ports);
return -1;
}
}
@ -2557,7 +2556,7 @@ int srslte_precoding_cn(cf_t *h[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS], uint32_t no
*cn = srslte_precoding_2x2_cn_gen(h, nof_symbols);
return SRSLTE_SUCCESS;
} else {
ERROR("MIMO Condition Number calculation not implemented for %d×%d", nof_tx_antennas, nof_rx_antennas);
DEBUG("MIMO Condition Number calculation not implemented for %d×%d", nof_tx_antennas, nof_rx_antennas);
return SRSLTE_ERROR;
}
}

@ -702,8 +702,8 @@ int srslte_pdsch_decode(srslte_pdsch_t *q,
// Pre-decoder
if (srslte_predecoding_type(q->symbols, q->ce, x, q->nof_rx_antennas, q->cell.nof_ports, cfg->nof_layers,
cfg->codebook_idx, cfg->nbits[0].nof_re, cfg->mimo_type, pdsch_scaling, noise_estimate)<0) {
printf("Error predecoding\n");
return -1;
DEBUG("Error predecoding\n");
return SRSLTE_ERROR;
}
// Layer demapping only if necessary
@ -765,7 +765,7 @@ int srslte_pdsch_pmi_select(srslte_pdsch_t *q,
}
}
} else {
ERROR("Not implemented configuration");
DEBUG("Not implemented configuration");
return SRSLTE_ERROR_INVALID_INPUTS;
}

@ -718,7 +718,7 @@ int srslte_ue_dl_ri_pmi_select(srslte_ue_dl_t *q, uint8_t *ri, uint8_t *pmi, flo
} else {
if (srslte_pdsch_pmi_select(&q->pdsch, &q->pdsch_cfg, q->ce_m, noise_estimate,
SRSLTE_SF_LEN_RE(q->cell.nof_prb, q->cell.cp), q->pmi, q->sinr)) {
ERROR("SINR calculation error");
DEBUG("SINR calculation error");
return SRSLTE_ERROR;
}

Loading…
Cancel
Save