From 409d81f43c82edf80c5298bdde2e0eb47d9ad107 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 1 Sep 2017 12:19:38 +0200 Subject: [PATCH] Corrected comments and a few lines refactor in pdsch --- lib/src/phy/mimo/precoding.c | 4 ++-- lib/src/phy/phch/pdsch.c | 18 ++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/lib/src/phy/mimo/precoding.c b/lib/src/phy/mimo/precoding.c index 02faa6e1c..f1aab3b5d 100644 --- a/lib/src/phy/mimo/precoding.c +++ b/lib/src/phy/mimo/precoding.c @@ -1406,9 +1406,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 CCD: Only 2 ports supported"); + ERROR("Error predecoding multiplex: not implemented for %d Tx ports", nof_ports); } else { - fprintf(stderr, "Error predecoding CCD: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant); + ERROR("Error predecoding multiplex: Invalid combination of ports %d and rx antennax %d\n", nof_ports, nof_rxant); } return SRSLTE_ERROR; } diff --git a/lib/src/phy/phch/pdsch.c b/lib/src/phy/phch/pdsch.c index 018fb96e5..9f0e4ed12 100644 --- a/lib/src/phy/phch/pdsch.c +++ b/lib/src/phy/phch/pdsch.c @@ -611,21 +611,19 @@ int srslte_pdsch_decode_multi(srslte_pdsch_t *q, for (i = 0; i < cfg->nof_layers; i++) { x[i] = q->d[i]; } - - srslte_predecoding_type_multi(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, noise_estimate); - } else { - /* number of layers equals number of ports */ - for (i = 0; i < cfg->nof_layers; i++) { - x[i] = q->x[i]; - } - memset(&x[cfg->nof_layers], 0, sizeof(cf_t*) * (SRSLTE_MAX_LAYERS - cfg->nof_layers)); + /* number of layers equals number of ports */ + for (i = 0; i < cfg->nof_layers; i++) { + x[i] = q->x[i]; + } + memset(&x[cfg->nof_layers], 0, sizeof(cf_t*) * (SRSLTE_MAX_LAYERS - cfg->nof_layers)); + } srslte_predecoding_type_multi(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, noise_estimate); - srslte_layerdemap_type(x, q->d, cfg->nof_layers, cfg->grant.nof_tb, + if (cfg->nof_layers != cfg->grant.nof_tb) { + srslte_layerdemap_type(x, q->d, cfg->nof_layers, cfg->grant.nof_tb, nof_symbols[0], nof_symbols, cfg->mimo_type); }