Improved RI selection

(cherry picked from commit 034025d)
master
Xavier Arteaga 7 years ago
parent d9d72e8f7b
commit b872f84255

@ -683,7 +683,7 @@ int srslte_pdsch_pmi_select(srslte_pdsch_t *q,
uint32_t pmi[SRSLTE_MAX_LAYERS], float sinr[SRSLTE_MAX_LAYERS][SRSLTE_MAX_CODEBOOKS]) { uint32_t pmi[SRSLTE_MAX_LAYERS], float sinr[SRSLTE_MAX_LAYERS][SRSLTE_MAX_CODEBOOKS]) {
if (q->cell.nof_ports == 2 && q->nof_rx_antennas == 2) { if (q->cell.nof_ports == 2 && q->nof_rx_antennas == 2) {
for (int nof_layers = 1; nof_layers <= cfg->nof_layers; nof_layers++ ) { for (int nof_layers = 1; nof_layers <= 2; nof_layers++ ) {
if (sinr[nof_layers - 1] && pmi) { if (sinr[nof_layers - 1] && pmi) {
if (srslte_precoding_pmi_select(ce, nof_ce, noise_estimate, nof_layers, &pmi[nof_layers - 1], if (srslte_precoding_pmi_select(ce, nof_ce, noise_estimate, nof_layers, &pmi[nof_layers - 1],
sinr[nof_layers - 1]) < 0) { sinr[nof_layers - 1]) < 0) {

@ -439,8 +439,14 @@ int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_POR
noise_estimate, noise_estimate,
rnti, data, acks); rnti, data, acks);
for (int tb = 0; tb < q->pdsch_cfg.grant.nof_tb; tb++) {
if (!acks[tb]) {
q->pkt_errors++;
}
q->pkts_total++;
}
if (ret == SRSLTE_ERROR) { if (ret == SRSLTE_ERROR) {
q->pkt_errors++;
} else if (ret == SRSLTE_ERROR_INVALID_INPUTS) { } else if (ret == SRSLTE_ERROR_INVALID_INPUTS) {
fprintf(stderr, "Error calling srslte_pdsch_decode()\n"); fprintf(stderr, "Error calling srslte_pdsch_decode()\n");
} }
@ -458,8 +464,6 @@ int srslte_ue_dl_decode_rnti_multi(srslte_ue_dl_t *q, cf_t *input[SRSLTE_MAX_POR
} }
q->pkts_total++;
if (found_dci == 1 && ret == SRSLTE_SUCCESS) { if (found_dci == 1 && ret == SRSLTE_SUCCESS) {
return q->pdsch_cfg.grant.mcs[0].tbs; return q->pdsch_cfg.grant.mcs[0].tbs;
} else { } else {
@ -485,10 +489,11 @@ int srslte_ue_dl_ri_pmi_select(srslte_ue_dl_t *q, uint32_t *ri, uint32_t *pmi, f
} }
/* Select the best Rank indicator (RI) and Precoding Matrix Indicator (PMI) */ /* Select the best Rank indicator (RI) and Precoding Matrix Indicator (PMI) */
for (uint32_t nof_layers = 1; nof_layers <= q->pdsch_cfg.nof_layers; nof_layers++ ) { for (uint32_t nof_layers = 1; nof_layers <= 2; nof_layers++) {
if (q->sinr[nof_layers][q->pmi[nof_layers]] > best_sinr + 0.1) { float _sinr = q->sinr[nof_layers - 1][q->pmi[nof_layers - 1]] * nof_layers;
best_sinr = q->sinr[nof_layers][q->pmi[nof_layers]]*nof_layers; if (_sinr > best_sinr + 0.1) {
best_pmi = q->pmi[nof_layers]; best_sinr = _sinr;
best_pmi = q->pmi[nof_layers - 1];
best_ri = nof_layers; best_ri = nof_layers;
} }
} }

Loading…
Cancel
Save