Improved pdcch decoding

This commit is contained in:
Ismael Gomez 2016-05-19 12:40:31 +02:00
parent e9d242f6b4
commit 3af3d12dff
4 changed files with 9 additions and 6 deletions

View File

@ -40,7 +40,7 @@
#define TB_ITER 3 #define TB_ITER 3
#define DEFAULT_GAIN 20 #define DEFAULT_GAIN 16
//#undef LV_HAVE_SSE //#undef LV_HAVE_SSE

View File

@ -145,7 +145,7 @@ bool srslte_cqi_send(uint32_t I_cqi_pmi, uint32_t tti) {
//static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 23.45, 25.0, 27.30, 29}; //static float cqi_to_snr_table[15] = { 1.95, 4, 6, 8, 10, 11.95, 14.05, 16, 17.9, 19.9, 21.5, 23.45, 25.0, 27.30, 29};
// From experimental measurements @ 5 MHz // From experimental measurements @ 5 MHz
static float cqi_to_snr_table[15] = { 0, 1.25, 2.5, 3.75, 5, 6, 7.5, 9, 11.5, 13.0, 15.0, 18, 20, 22.5, 26.5}; static float cqi_to_snr_table[15] = { 1, 1.75, 3, 4, 5, 6, 7.5, 9, 11.5, 13.0, 15.0, 18, 20, 22.5, 26.5};
uint8_t srslte_cqi_from_snr(float snr) uint8_t srslte_cqi_from_snr(float snr)
{ {

View File

@ -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);

View File

@ -402,7 +402,7 @@ int srslte_ue_dl_decode_rnti_rv(srslte_ue_dl_t *q, cf_t *input, uint8_t *data, u
return ret; return ret;
} }
if (srslte_pdcch_extract_llr(&q->pdcch, q->sf_symbols, q->ce, 0, sf_idx, q->cfi)) { if (srslte_pdcch_extract_llr(&q->pdcch, q->sf_symbols, q->ce, srslte_chest_dl_get_noise_estimate(&q->chest), sf_idx, q->cfi)) {
fprintf(stderr, "Error extracting LLRs\n"); fprintf(stderr, "Error extracting LLRs\n");
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }