Added CSI string in PDSCH and PUSCH decode

master
Xavier Arteaga 3 years ago
parent 003c6e524c
commit a5f6aa9f31

@ -112,7 +112,7 @@ SRSRAN_API int srsran_ue_dl_nr_decode_pdsch(srsran_ue_dl_nr_t* q,
const srsran_sch_cfg_nr_t* cfg, const srsran_sch_cfg_nr_t* cfg,
srsran_pdsch_res_nr_t* res); srsran_pdsch_res_nr_t* res);
SRSRAN_API int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q, SRSRAN_API uint32_t srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q,
const srsran_sch_cfg_nr_t* cfg, const srsran_sch_cfg_nr_t* cfg,
const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS],
char* str, char* str,

@ -333,7 +333,8 @@ uint32_t srsran_gnb_ul_pusch_info(srsran_gnb_ul_t* q,
len += srsran_pusch_nr_rx_info(&q->pusch, cfg, &cfg->grant, res, str, str_len - len); len += srsran_pusch_nr_rx_info(&q->pusch, cfg, &cfg->grant, res, str, str_len - len);
len = srsran_print_check(str, str_len, len, "snr=%+.1f", q->chest_pusch.snr_db); // Append channel estimator info
len += srsran_csi_meas_info_short(&q->dmrs.csi, &str[len], str_len - len);
return len; return len;
} }

@ -568,6 +568,10 @@ static uint32_t pdsch_nr_grant_info(const srsran_pdsch_nr_t* q,
} }
} }
// Append RNTI type and id
len =
srsran_print_check(str, str_len, len, "%s-rnti=0x%x ", srsran_rnti_type_str_short(grant->rnti_type), grant->rnti);
// Append time-domain resource mapping // Append time-domain resource mapping
len = srsran_print_check(str, len = srsran_print_check(str,
str_len, str_len,

@ -1010,6 +1010,10 @@ static uint32_t pusch_nr_grant_info(const srsran_pusch_nr_t* q,
} }
} }
// Append RNTI type and id
len =
srsran_print_check(str, str_len, len, "%s-rnti=0x%x ", srsran_rnti_type_str_short(grant->rnti_type), grant->rnti);
// Append time-domain resource mapping // Append time-domain resource mapping
len = srsran_print_check(str, len = srsran_print_check(str,
str_len, str_len,

@ -576,19 +576,19 @@ int srsran_ue_dl_nr_decode_pdsch(srsran_ue_dl_nr_t* q,
return SRSRAN_SUCCESS; return SRSRAN_SUCCESS;
} }
int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q, uint32_t srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q,
const srsran_sch_cfg_nr_t* cfg, const srsran_sch_cfg_nr_t* cfg,
const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS],
char* str, char* str,
uint32_t str_len) uint32_t str_len)
{ {
int len = 0; uint32_t len = 0;
// Append PDSCH info // Append PDSCH info
len += srsran_pdsch_nr_rx_info(&q->pdsch, cfg, &cfg->grant, res, &str[len], str_len - len); len += srsran_pdsch_nr_rx_info(&q->pdsch, cfg, &cfg->grant, res, &str[len], str_len - len);
// Append channel estimator info // Append channel estimator info
len = srsran_print_check(str, str_len, len, "SNR=%+.1f", q->chest.snr_db); len += srsran_csi_meas_info_short(&q->dmrs_pdsch.csi, &str[len], str_len - len);
return len; return len;
} }

@ -239,7 +239,7 @@ bool slot_worker::work_ul()
srsran_gnb_ul_pusch_info(&gnb_ul, &pusch.sch, &pusch_info.pusch_data, str.data(), (uint32_t)str.size()); srsran_gnb_ul_pusch_info(&gnb_ul, &pusch.sch, &pusch_info.pusch_data, str.data(), (uint32_t)str.size());
if (logger.debug.enabled()) { if (logger.debug.enabled()) {
std::array<char, 2048> str_extra; std::array<char, 1024> str_extra = {};
srsran_sch_cfg_nr_info(&pusch.sch, str_extra.data(), (uint32_t)str_extra.size()); srsran_sch_cfg_nr_info(&pusch.sch, str_extra.data(), (uint32_t)str_extra.size());
logger.info("PUSCH: %s\n%s", str.data(), str_extra.data()); logger.info("PUSCH: %s\n%s", str.data(), str_extra.data());
} else { } else {

Loading…
Cancel
Save