|
|
@ -273,8 +273,10 @@ static int dci_decode(srslte_pdcch_t *q, float *e, uint8_t *data, uint32_t E, ui
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bzero(q->rm_f, sizeof(float)*3 * (SRSLTE_DCI_MAX_BITS + 16));
|
|
|
|
bzero(q->rm_f, sizeof(float)*3 * (SRSLTE_DCI_MAX_BITS + 16));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t coded_len = 3 * (nof_bits + 16);
|
|
|
|
|
|
|
|
|
|
|
|
/* unrate matching */
|
|
|
|
/* unrate matching */
|
|
|
|
srslte_rm_conv_rx(e, E, q->rm_f, 3 * (nof_bits + 16));
|
|
|
|
srslte_rm_conv_rx(e, E, q->rm_f, coded_len);
|
|
|
|
|
|
|
|
|
|
|
|
/* viterbi decoder */
|
|
|
|
/* viterbi decoder */
|
|
|
|
srslte_viterbi_decode_f(&q->decoder, q->rm_f, data, nof_bits + 16);
|
|
|
|
srslte_viterbi_decode_f(&q->decoder, q->rm_f, data, nof_bits + 16);
|
|
|
@ -286,6 +288,7 @@ static int dci_decode(srslte_pdcch_t *q, float *e, uint8_t *data, uint32_t E, ui
|
|
|
|
if (crc) {
|
|
|
|
if (crc) {
|
|
|
|
*crc = p_bits ^ crc_res;
|
|
|
|
*crc = p_bits ^ crc_res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
return SRSLTE_SUCCESS;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
fprintf(stderr, "Invalid parameters: E: %d, max_bits: %d, nof_bits: %d\n", E, q->max_bits, nof_bits);
|
|
|
|
fprintf(stderr, "Invalid parameters: E: %d, max_bits: %d, nof_bits: %d\n", E, q->max_bits, nof_bits);
|
|
|
@ -399,7 +402,7 @@ int srslte_pdcch_extract_llr(srslte_pdcch_t *q, cf_t *sf_symbols, cf_t *ce[SRSLT
|
|
|
|
/* in control channels, only diversity is supported */
|
|
|
|
/* in control channels, only diversity is supported */
|
|
|
|
if (q->cell.nof_ports == 1) {
|
|
|
|
if (q->cell.nof_ports == 1) {
|
|
|
|
/* no need for layer demapping */
|
|
|
|
/* no need for layer demapping */
|
|
|
|
srslte_predecoding_single(q->symbols[0], q->ce[0], q->d, nof_symbols, noise_estimate);
|
|
|
|
srslte_predecoding_single(q->symbols[0], q->ce[0], q->d, nof_symbols, noise_estimate/2);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
srslte_predecoding_diversity(q->symbols[0], q->ce, x, q->cell.nof_ports, nof_symbols);
|
|
|
|
srslte_predecoding_diversity(q->symbols[0], q->ce, x, q->cell.nof_ports, nof_symbols);
|
|
|
|
srslte_layerdemap_diversity(x, q->d, q->cell.nof_ports, nof_symbols / q->cell.nof_ports);
|
|
|
|
srslte_layerdemap_diversity(x, q->d, q->cell.nof_ports, nof_symbols / q->cell.nof_ports);
|
|
|
|