nr,test: ensure phy metrics are generated in nr_phy_test when real mac is used

master
Francisco 3 years ago committed by Francisco Paisana
parent ca7a3cf201
commit 5979f98a8e

@ -621,14 +621,13 @@ public:
{ {
if (not use_dummy_mac) { if (not use_dummy_mac) {
mac->pucch_info(slot_cfg, pucch_info); mac->pucch_info(slot_cfg, pucch_info);
return SRSRAN_SUCCESS; } else {
}
// Handle UCI data // Handle UCI data
if (not handle_uci_data(pucch_info.uci_data.cfg, pucch_info.uci_data.value)) { if (not handle_uci_data(pucch_info.uci_data.cfg, pucch_info.uci_data.value)) {
logger.error("Error handling UCI data from PUCCH reception"); logger.error("Error handling UCI data from PUCCH reception");
return SRSRAN_ERROR; return SRSRAN_ERROR;
} }
}
// Skip next steps if uci data is invalid // Skip next steps if uci data is invalid
if (not pucch_info.uci_data.value.valid) { if (not pucch_info.uci_data.value.valid) {
@ -658,8 +657,7 @@ public:
{ {
if (not use_dummy_mac) { if (not use_dummy_mac) {
mac->pusch_info(slot_cfg, pusch_info); mac->pusch_info(slot_cfg, pusch_info);
} } else {
// Handle UCI data // Handle UCI data
if (not handle_uci_data(pusch_info.uci_cfg, pusch_info.pusch_data.uci)) { if (not handle_uci_data(pusch_info.uci_cfg, pusch_info.pusch_data.uci)) {
logger.error("Error handling UCI data from PUCCH reception"); logger.error("Error handling UCI data from PUCCH reception");
@ -673,6 +671,7 @@ public:
} }
metrics.mac.rx_brate += rx_harq_proc[pusch_info.pid].get_tbs(); metrics.mac.rx_brate += rx_harq_proc[pusch_info.pid].get_tbs();
metrics.mac.rx_pkts++; metrics.mac.rx_pkts++;
}
// Handle PHY metrics // Handle PHY metrics
metrics.pusch.epre_db_avg = SRSRAN_VEC_CMA(pusch_info.csi.epre_dB, metrics.pusch.epre_db_avg, metrics.pusch.count); metrics.pusch.epre_db_avg = SRSRAN_VEC_CMA(pusch_info.csi.epre_dB, metrics.pusch.epre_db_avg, metrics.pusch.count);

Loading…
Cancel
Save