mirror of https://github.com/PentHertz/srsLTE.git
Improved pdcch decoding
This commit is contained in:
parent
e9d242f6b4
commit
3af3d12dff
|
@ -40,7 +40,7 @@
|
|||
|
||||
#define TB_ITER 3
|
||||
|
||||
#define DEFAULT_GAIN 20
|
||||
#define DEFAULT_GAIN 16
|
||||
|
||||
//#undef LV_HAVE_SSE
|
||||
|
||||
|
@ -248,7 +248,7 @@ int srslte_viterbi_decode_f(srslte_viterbi_t *q, float *symbols, uint8_t *data,
|
|||
} else {
|
||||
len = 3 * (frame_length + q->K - 1);
|
||||
}
|
||||
if (!q->decode_f) {
|
||||
if (!q->decode_f) {
|
||||
srslte_vec_quant_fuc(symbols, q->symbols_uc, q->gain_quant, 127.5, 255, len);
|
||||
return srslte_viterbi_decode_uc(q, q->symbols_uc, data, frame_length);
|
||||
} else {
|
||||
|
|
|
@ -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};
|
||||
|
||||
// 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)
|
||||
{
|
||||
|
|
|
@ -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));
|
||||
|
||||
uint32_t coded_len = 3 * (nof_bits + 16);
|
||||
|
||||
/* 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 */
|
||||
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) {
|
||||
*crc = p_bits ^ crc_res;
|
||||
}
|
||||
|
||||
return SRSLTE_SUCCESS;
|
||||
} else {
|
||||
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 */
|
||||
if (q->cell.nof_ports == 1) {
|
||||
/* 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 {
|
||||
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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
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");
|
||||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue