From 8ffced7e885e9c37aaefd51f2c2191c30252cc86 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 16 Apr 2021 19:21:54 +0200 Subject: [PATCH] NR PHY logging minor corrections --- lib/include/srsran/phy/phch/sch_cfg_nr.h | 1 - lib/src/phy/phch/pdsch_nr.c | 2 +- lib/src/phy/phch/phch_cfg_nr.c | 3 +-- lib/src/phy/phch/ra_nr.c | 1 - srsue/src/phy/nr/cc_worker.cc | 19 ++++++++++++++----- 5 files changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/include/srsran/phy/phch/sch_cfg_nr.h b/lib/include/srsran/phy/phch/sch_cfg_nr.h index 9a3c580f8..8c4d8159c 100644 --- a/lib/include/srsran/phy/phch/sch_cfg_nr.h +++ b/lib/include/srsran/phy/phch/sch_cfg_nr.h @@ -31,7 +31,6 @@ typedef struct SRSRAN_API { double R; ///< Target LDPC rate int rv; ///< Redundancy version int ndi; ///< New Data Indicator - int pid; ///< HARQ Process ID uint32_t nof_re; ///< Number of available resource elements to transmit ULSCH (data) and UCI (control) uint32_t nof_bits; ///< Number of available bits to send ULSCH uint32_t cw_idx; diff --git a/lib/src/phy/phch/pdsch_nr.c b/lib/src/phy/phch/pdsch_nr.c index 924bfda4f..aac6d28e6 100644 --- a/lib/src/phy/phch/pdsch_nr.c +++ b/lib/src/phy/phch/pdsch_nr.c @@ -617,7 +617,7 @@ uint32_t srsran_pdsch_nr_rx_info(const srsran_pdsch_nr_t* q, len += pdsch_nr_grant_info(q, cfg, grant, res, &str[len], str_len - len); if (q->meas_time_en) { - len = srsran_print_check(str, str_len, len, " t=%d us", q->meas_time_us); + len = srsran_print_check(str, str_len, len, " t=%dus ", q->meas_time_us); } return len; diff --git a/lib/src/phy/phch/phch_cfg_nr.c b/lib/src/phy/phch/phch_cfg_nr.c index c4b427b3a..246367aa1 100644 --- a/lib/src/phy/phch/phch_cfg_nr.c +++ b/lib/src/phy/phch/phch_cfg_nr.c @@ -149,7 +149,6 @@ static uint32_t phch_cfg_tb_to_str(const srsran_sch_tb_t* tb, char* str, uint32_ len = srsran_print_check(str, str_len, len, " R=%.3f\n", tb->R); len = srsran_print_check(str, str_len, len, " rv=%d\n", tb->rv); len = srsran_print_check(str, str_len, len, " ndi=%d\n", tb->ndi); - len = srsran_print_check(str, str_len, len, " pid=%d\n", tb->pid); len = srsran_print_check(str, str_len, len, " nof_re=%d\n", tb->nof_re); len = srsran_print_check(str, str_len, len, " nof_bits=%d\n", tb->nof_bits); @@ -208,7 +207,7 @@ static uint32_t phch_cfg_rvd_to_str(const srsran_re_pattern_list_t* pattern_list len = srsran_print_check(str, str_len, len, " Reserved:\n"); for (uint32_t i = 0; i < pattern_list->count; i++) { - len = srsran_print_check(str, str_len, len, " %d=", i); + len = srsran_print_check(str, str_len, len, " %d: ", i); len += srsran_re_pattern_info(&pattern_list->data[i], &str[len], str_len - len); len = srsran_print_check(str, str_len, len, "\n"); } diff --git a/lib/src/phy/phch/ra_nr.c b/lib/src/phy/phch/ra_nr.c index e5f2cdae0..4fa39b0e6 100644 --- a/lib/src/phy/phch/ra_nr.c +++ b/lib/src/phy/phch/ra_nr.c @@ -791,7 +791,6 @@ int srsran_ra_ul_dci_to_grant_nr(const srsran_carrier_nr_t* carrier, pusch_grant->tb[0].rv = dci_ul->rv; pusch_grant->tb[0].mcs = dci_ul->mcs; pusch_grant->tb[0].ndi = dci_ul->ndi; - pusch_grant->tb[0].pid = dci_ul->pid; // 5.1.6.2 DM-RS reception procedure if (ra_ul_dmrs(pusch_hl_cfg, pusch_grant, pusch_cfg) < SRSRAN_SUCCESS) { diff --git a/srsue/src/phy/nr/cc_worker.cc b/srsue/src/phy/nr/cc_worker.cc index 3a899cb74..9b8935ebb 100644 --- a/srsue/src/phy/nr/cc_worker.cc +++ b/srsue/src/phy/nr/cc_worker.cc @@ -274,17 +274,24 @@ bool cc_worker::work_dl() str_info_t str; srsran_ue_dl_nr_pdsch_info(&ue_dl, &pdsch_cfg, &pdsch_res, str.data(), (uint32_t)str.size()); - if (logger.debug.enabled()) { + if (logger.info.enabled()) { str_extra_t str_extra; srsran_sch_cfg_nr_info(&pdsch_cfg, str_extra.data(), (uint32_t)str_extra.size()); logger.info(pdsch_res.tb[0].payload, pdsch_cfg.grant.tb[0].tbs / 8, - "PDSCH: cc=%d, %s\n%s", + "PDSCH: cc=%d pid=%d %s\n%s", cc_idx, + pid, str.data(), str_extra.data()); } else { - logger.info(pdsch_res.tb[0].payload, pdsch_cfg.grant.tb[0].tbs / 8, "PDSCH: cc=%d, %s", cc_idx, str.data()); + logger.info(pdsch_res.tb[0].payload, + pdsch_cfg.grant.tb[0].tbs / 8, + "PDSCH: cc=%d pid=%d %s", + pid, + cc_idx, + pid, + str.data()); } } @@ -418,16 +425,18 @@ bool cc_worker::work_ul() srsran_sch_cfg_nr_info(&pusch_cfg, str_extra.data(), (uint32_t)str_extra.size()); logger.info(ul_action.tb.payload->msg, pusch_cfg.grant.tb[0].tbs / 8, - "PUSCH: cc=%d %s tti_tx=%d\n%s", + "PUSCH: cc=%d pid=%d %s tti_tx=%d\n%s", cc_idx, + pid, str.data(), ul_slot_cfg.idx, str_extra.data()); } else { logger.info(ul_action.tb.payload->msg, pusch_cfg.grant.tb[0].tbs / 8, - "PUSCH: cc=%d %s tti_tx=%d", + "PUSCH: cc=%d pid=%d %s tti_tx=%d", cc_idx, + pid, str.data(), ul_slot_cfg.idx); }