Add wideband SNR based on SRS in MAC stats
This commit is contained in:
@@ -907,8 +907,19 @@ void handle_nr_srs_measurements(const module_id_t module_id,
|
||||
}
|
||||
#endif
|
||||
|
||||
int ul_prbblack_SNR_threshold = RC.nrmac[module_id]->ul_prbblack_SNR_threshold;
|
||||
uint16_t *ulprbbl = RC.nrmac[module_id]->ulprbbl;
|
||||
const int UE_id = find_nr_UE_id(module_id,rnti);
|
||||
if (UE_id < 0) {
|
||||
LOG_W(NR_MAC, "Could not find UE for RNTI 0x%04x\n", rnti);
|
||||
return;
|
||||
}
|
||||
|
||||
gNB_MAC_INST *nr_mac = RC.nrmac[module_id];
|
||||
NR_UE_info_t *UE_info = &nr_mac->UE_info;
|
||||
NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id];
|
||||
stats->srs_wide_band_snr = (wide_band_snr>>1)-64;
|
||||
|
||||
int ul_prbblack_SNR_threshold = nr_mac->ul_prbblack_SNR_threshold;
|
||||
uint16_t *ulprbbl = nr_mac->ulprbbl;
|
||||
|
||||
memset(ulprbbl, 0, reported_symbol_list[0].num_rbs*sizeof(uint16_t));
|
||||
for (int rb = 0; rb < reported_symbol_list[0].num_rbs; rb++) {
|
||||
|
||||
@@ -84,7 +84,7 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
|
||||
const NR_UE_sched_ctrl_t *sched_ctrl = &UE_info->UE_sched_ctrl[UE_id];
|
||||
NR_mac_stats_t *stats = &UE_info->mac_stats[UE_id];
|
||||
const int avg_rsrp = stats->num_rsrp_meas > 0 ? stats->cumul_rsrp / stats->num_rsrp_meas : 0;
|
||||
stroff+=sprintf(output+stroff,"UE ID %d RNTI %04x (%d/%d) PH %d dB PCMAX %d dBm, average RSRP %d (%d meas)\n",
|
||||
stroff+=sprintf(output+stroff,"UE ID %d RNTI %04x (%d/%d) PH %d dB PCMAX %d dBm, average RSRP %d (%d meas), UL-SNR %d dB\n",
|
||||
UE_id,
|
||||
UE_info->rnti[UE_id],
|
||||
num++,
|
||||
@@ -92,7 +92,8 @@ void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp
|
||||
sched_ctrl->ph,
|
||||
sched_ctrl->pcmax,
|
||||
avg_rsrp,
|
||||
stats->num_rsrp_meas);
|
||||
stats->num_rsrp_meas,
|
||||
stats->srs_wide_band_snr);
|
||||
stroff+=sprintf(output+stroff,"UE %d: CQI %d, RI %d, PMI (%d,%d)\n",
|
||||
UE_id,
|
||||
UE_info->UE_sched_ctrl[UE_id].CSI_report.cri_ri_li_pmi_cqi_report.wb_cqi_1tb,
|
||||
|
||||
@@ -690,6 +690,7 @@ typedef struct {
|
||||
uint32_t pucch0_DTX;
|
||||
int cumul_rsrp;
|
||||
uint8_t num_rsrp_meas;
|
||||
int8_t srs_wide_band_snr;
|
||||
} NR_mac_stats_t;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user