SRSUE PHY: Add extra debugging information to errors

master
Xavier Arteaga 5 years ago committed by Xavier Arteaga
parent 5ee96079a2
commit f3f03ad12d

@ -224,7 +224,7 @@ SRSLTE_API uint32_t srslte_dci_format_sizeof(const srslte_cell_t* cell,
SRSLTE_API void srslte_dci_dl_fprint(FILE* f, srslte_dci_dl_t* dci, uint32_t nof_prb);
SRSLTE_API uint32_t srslte_dci_dl_info(srslte_dci_dl_t* dci_dl, char* str, uint32_t str_len);
SRSLTE_API uint32_t srslte_dci_dl_info(const srslte_dci_dl_t* dci_dl, char* str, uint32_t str_len);
SRSLTE_API uint32_t srslte_dci_ul_info(srslte_dci_ul_t* dci_ul, char* info_str, uint32_t len);

@ -1551,7 +1551,7 @@ void srslte_dci_dl_fprint(FILE* f, srslte_dci_dl_t* dci, uint32_t nof_prb)
}
}
static uint32_t print_multi(char* info_str, uint32_t n, uint32_t len, srslte_dci_dl_t* dci_dl, uint32_t value_id)
static uint32_t print_multi(char* info_str, uint32_t n, uint32_t len, const srslte_dci_dl_t* dci_dl, uint32_t value_id)
{
uint32_t nof_tb = 1;
if (dci_dl->format >= SRSLTE_DCI_FORMAT2) {
@ -1576,7 +1576,7 @@ static uint32_t print_multi(char* info_str, uint32_t n, uint32_t len, srslte_dci
return n;
}
uint32_t srslte_dci_dl_info(srslte_dci_dl_t* dci_dl, char* info_str, uint32_t len)
uint32_t srslte_dci_dl_info(const srslte_dci_dl_t* dci_dl, char* info_str, uint32_t len)
{
uint32_t n = 0;
n = srslte_print_check(info_str,

@ -432,7 +432,9 @@ static int dl_dci_compute_tb(bool pdsch_use_tbs_index_alt, const srslte_dci_dl_t
if (grant->tb[i].enabled) {
grant->tb[i].tbs = srslte_dl_fill_ra_mcs(&grant->tb[i], grant->last_tbs[i], n_prb, pdsch_use_tbs_index_alt);
if (grant->tb[i].tbs < 0) {
ERROR("Computing TBS from MCS=%d, n_prb=%d\n", grant->tb[i].mcs_idx, n_prb);
char str[128];
srslte_dci_dl_info(dci, str, sizeof(str));
ERROR("Computing TBS from %s\n", str);
return SRSLTE_ERROR;
}
} else {

@ -331,4 +331,4 @@ uint32_t srslte_ra_ul_info(const srslte_pusch_grant_t* grant, char* info_str, ui
grant->tb.tbs / 8,
srslte_mod_bits_x_symbol(grant->tb.mod),
grant->tb.rv);
}
}

@ -240,7 +240,7 @@ int srslte_ue_dl_set_cell(srslte_ue_dl_t* q, srslte_cell_t cell)
}
ret = SRSLTE_SUCCESS;
} else {
ERROR("Invalid cell properties ue_dl: Id=%d, Ports=%d, PRBs=%d\n", q->cell.id, q->cell.nof_ports, q->cell.nof_prb);
ERROR("Invalid cell properties ue_dl: Id=%d, Ports=%d, PRBs=%d\n", cell.id, cell.nof_ports, cell.nof_prb);
}
return ret;
}

@ -208,7 +208,9 @@ int srslte_ue_ul_dci_to_pusch_grant(srslte_ue_ul_t* q,
srslte_pusch_grant_t* grant)
{
if (srslte_ra_ul_dci_to_grant(&q->cell, sf, &cfg->ul_cfg.hopping, dci, grant)) {
ERROR("Converting DCI to UL grant\n");
char str[128];
srslte_dci_ul_info(dci, str, sizeof(str));
ERROR("Converting DCI to UL grant from %s\n", str);
return SRSLTE_ERROR;
}

@ -662,6 +662,9 @@ bool cc_worker::work_ul(srslte_uci_data_t* uci_data)
if (srslte_ue_ul_dci_to_pusch_grant(&ue_ul, &sf_cfg_ul, &ue_ul_cfg, &dci_ul, &ue_ul_cfg.ul_cfg.pusch.grant)) {
Error("Converting DCI message to UL dci\n");
ul_grant_available = false;
} else if (ue_ul_cfg.ul_cfg.pusch.grant.tb.mod == SRSLTE_MOD_BPSK) {
Error("UL retransmission without valid stored grant.\n");
ul_grant_available = false;
} else {
// Save TBS info for next retx
phy->last_ul_tb[pid][cc_idx] = ue_ul_cfg.ul_cfg.pusch.grant.tb;

Loading…
Cancel
Save