diff --git a/lib/include/srsran/phy/ue/ue_dl_nr.h b/lib/include/srsran/phy/ue/ue_dl_nr.h index f1f1240ce..4bd69e5da 100644 --- a/lib/include/srsran/phy/ue/ue_dl_nr.h +++ b/lib/include/srsran/phy/ue/ue_dl_nr.h @@ -112,11 +112,11 @@ SRSRAN_API int srsran_ue_dl_nr_decode_pdsch(srsran_ue_dl_nr_t* q, const srsran_sch_cfg_nr_t* cfg, srsran_pdsch_res_nr_t* res); -SRSRAN_API int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q, - const srsran_sch_cfg_nr_t* cfg, - const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], - char* str, - uint32_t str_len); +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_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], + char* str, + uint32_t str_len); SRSRAN_API int srsran_ue_dl_nr_csi_measure_trs(const srsran_ue_dl_nr_t* q, diff --git a/lib/src/phy/gnb/gnb_ul.c b/lib/src/phy/gnb/gnb_ul.c index 94259e69b..bf09799d5 100644 --- a/lib/src/phy/gnb/gnb_ul.c +++ b/lib/src/phy/gnb/gnb_ul.c @@ -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_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; } \ No newline at end of file diff --git a/lib/src/phy/phch/pdsch_nr.c b/lib/src/phy/phch/pdsch_nr.c index b047b1ceb..22076a106 100644 --- a/lib/src/phy/phch/pdsch_nr.c +++ b/lib/src/phy/phch/pdsch_nr.c @@ -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 len = srsran_print_check(str, str_len, diff --git a/lib/src/phy/phch/pusch_nr.c b/lib/src/phy/phch/pusch_nr.c index 9950a57a4..c7ab719d7 100644 --- a/lib/src/phy/phch/pusch_nr.c +++ b/lib/src/phy/phch/pusch_nr.c @@ -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 len = srsran_print_check(str, str_len, diff --git a/lib/src/phy/ue/ue_dl_nr.c b/lib/src/phy/ue/ue_dl_nr.c index e83fdf474..fb0a851f7 100644 --- a/lib/src/phy/ue/ue_dl_nr.c +++ b/lib/src/phy/ue/ue_dl_nr.c @@ -375,7 +375,7 @@ static int ue_dl_nr_find_dci_ss(srsran_ue_dl_nr_t* q, // Calculate possible PDCCH DCI candidates uint32_t candidates[SRSRAN_SEARCH_SPACE_MAX_NOF_CANDIDATES_NR] = {}; int nof_candidates = srsran_pdcch_nr_locations_coreset( - coreset, search_space, rnti, L, SRSRAN_SLOT_NR_MOD(q->carrier.scs, slot_cfg->idx), candidates); + coreset, search_space, rnti, L, SRSRAN_SLOT_NR_MOD(q->carrier.scs, slot_cfg->idx), candidates); if (nof_candidates < SRSRAN_SUCCESS) { ERROR("Error calculating DCI candidate location"); return SRSRAN_ERROR; @@ -576,19 +576,19 @@ int srsran_ue_dl_nr_decode_pdsch(srsran_ue_dl_nr_t* q, return SRSRAN_SUCCESS; } -int srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q, - const srsran_sch_cfg_nr_t* cfg, - const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], - char* str, - uint32_t str_len) +uint32_t srsran_ue_dl_nr_pdsch_info(const srsran_ue_dl_nr_t* q, + const srsran_sch_cfg_nr_t* cfg, + const srsran_pdsch_res_nr_t res[SRSRAN_MAX_CODEWORDS], + char* str, + uint32_t str_len) { - int len = 0; + uint32_t len = 0; // Append PDSCH info len += srsran_pdsch_nr_rx_info(&q->pdsch, cfg, &cfg->grant, res, &str[len], str_len - len); // 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; } diff --git a/srsenb/src/phy/nr/slot_worker.cc b/srsenb/src/phy/nr/slot_worker.cc index 2ff2880c1..dbdf5d5f7 100644 --- a/srsenb/src/phy/nr/slot_worker.cc +++ b/srsenb/src/phy/nr/slot_worker.cc @@ -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()); if (logger.debug.enabled()) { - std::array str_extra; + std::array str_extra = {}; 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()); } else {