Commit 4ad4edb8 authored by francescomani's avatar francescomani Committed by Robert Schmidt

Log arbitrary number of HARQ rounds

Contributors
  francescomani <email@francescomani.it>
  Robert Schmidt <robert.schmidt@openairinterface.org>
parent 989c22a4
...@@ -1476,7 +1476,17 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ...@@ -1476,7 +1476,17 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
if ((frame_rx%64 == 0) && (nr_slot_rx==0)) { if ((frame_rx%64 == 0) && (nr_slot_rx==0)) {
LOG_I(NR_PHY,"============================================\n"); LOG_I(NR_PHY,"============================================\n");
LOG_I(NR_PHY,"Harq round stats for Downlink: %d/%d/%d/%d DLSCH errors: %d\n",ue->dl_stats[0],ue->dl_stats[1],ue->dl_stats[2],ue->dl_stats[3],ue->dl_stats[4]); // fixed text + 8 HARQs rounds à 10 ("999999999/") + NULL
// if we use 999999999 HARQs, that should be sufficient for at least 138 hours
const size_t harq_output_len = 31 + 10 * 8 + 1;
char output[harq_output_len];
char *p = output;
const char *end = output + harq_output_len;
p += snprintf(p, end - p, "Harq round stats for Downlink: %d", ue->dl_stats[0]);
for (int round = 1; round < 16 && (round < 3 || ue->dl_stats[round] != 0); ++round)
p += snprintf(p, end - p,"/%d", ue->dl_stats[round]);
LOG_I(NR_PHY,"%s/0\n", output);
LOG_I(NR_PHY,"============================================\n"); LOG_I(NR_PHY,"============================================\n");
} }
......
...@@ -105,17 +105,21 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset ...@@ -105,17 +105,21 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
end - output, end - output,
"UE %04x: CQI %d, RI %d, PMI (%d,%d)\n", "UE %04x: CQI %d, RI %d, PMI (%d,%d)\n",
UE->rnti, UE->rnti,
UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb, sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb,
UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.ri+1, sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.ri+1,
UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1, sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x1,
UE->UE_sched_ctrl.CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2); sched_ctrl->CSI_report.cri_ri_li_pmi_cqi_report.pmi_x2);
output += snprintf(output, output += snprintf(output,
end - output, end - output,
"UE %04x: dlsch_rounds %"PRIu64"/%"PRIu64"/%"PRIu64"/%"PRIu64", dlsch_errors %"PRIu64", pucch0_DTX %d, BLER %.5f MCS %d\n", "UE %04x: dlsch_rounds ", UE->rnti);
UE->rnti, output += snprintf(output, end - output, "%"PRIu64, stats->dl.rounds[0]);
stats->dl.rounds[0], stats->dl.rounds[1], for (int i = 1; i < gNB->harq_round_max; i++)
stats->dl.rounds[2], stats->dl.rounds[3], output += snprintf(output, end - output, "/%"PRIu64, stats->dl.rounds[i]);
output += snprintf(output,
end - output,
", dlsch_errors %"PRIu64", pucch0_DTX %d, BLER %.5f MCS %d\n",
stats->dl.errors, stats->dl.errors,
stats->pucch0_DTX, stats->pucch0_DTX,
sched_ctrl->dl_bler_stats.bler, sched_ctrl->dl_bler_stats.bler,
...@@ -127,14 +131,17 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset ...@@ -127,14 +131,17 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
output += snprintf(output, output += snprintf(output,
end - output, end - output,
"UE %04x: dlsch_total_bytes %"PRIu64"\n", "UE %04x: dlsch_total_bytes %"PRIu64"\n",
UE->rnti, UE->rnti, stats->dl.total_bytes);
stats->dl.total_bytes);
output += snprintf(output, output += snprintf(output,
end - output, end - output,
"UE %04x: ulsch_rounds %"PRIu64"/%"PRIu64"/%"PRIu64"/%"PRIu64", ulsch_DTX %d, ulsch_errors %"PRIu64", BLER %.5f MCS %d\n", "UE %04x: ulsch_rounds ", UE->rnti);
UE->rnti, output += snprintf(output, end - output, "%"PRIu64, stats->ul.rounds[0]);
stats->ul.rounds[0], stats->ul.rounds[1], for (int i = 1; i < gNB->harq_round_max; i++)
stats->ul.rounds[2], stats->ul.rounds[3], output += snprintf(output, end - output, "/%"PRIu64, stats->ul.rounds[i]);
output += snprintf(output,
end - output,
", ulsch_DTX %d, ulsch_errors %"PRIu64", BLER %.5f MCS %d\n",
stats->ulsch_DTX, stats->ulsch_DTX,
stats->ul.errors, stats->ul.errors,
sched_ctrl->ul_bler_stats.bler, sched_ctrl->ul_bler_stats.bler,
...@@ -144,6 +151,7 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset ...@@ -144,6 +151,7 @@ size_t dump_mac_stats(gNB_MAC_INST *gNB, char *output, size_t strlen, bool reset
"UE %04x: ulsch_total_bytes_scheduled %"PRIu64", ulsch_total_bytes_received %"PRIu64"\n", "UE %04x: ulsch_total_bytes_scheduled %"PRIu64", ulsch_total_bytes_received %"PRIu64"\n",
UE->rnti, UE->rnti,
stats->ulsch_total_bytes_scheduled, stats->ul.total_bytes); stats->ulsch_total_bytes_scheduled, stats->ul.total_bytes);
for (int lc_id = 0; lc_id < 63; lc_id++) { for (int lc_id = 0; lc_id < 63; lc_id++) {
if (stats->dl.lc_bytes[lc_id] > 0) if (stats->dl.lc_bytes[lc_id] > 0)
output += snprintf(output, output += snprintf(output,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment