Merge remote-tracking branch 'origin/fix-ttracer-nrue' into integration_2025_w43 (!3709)
Fixes for T-Tracer to work with NR-UE Fixes to align NR UE events with their definitions in T_messages.txt and match the expected format in the tracer GUI parser. Also fixes DL SNR to work in tracer GUI.
This commit is contained in:
+25
-25
@@ -196,7 +196,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
view *v;
|
||||
logger *l;
|
||||
|
||||
main_window = new_toplevel_window(g, 1200, 900, "eNB tracer");
|
||||
main_window = new_toplevel_window(g, 1200, 900, "UE tracer");
|
||||
top_container = new_container(g, VERTICAL);
|
||||
widget_add_child(g, main_window, top_container, -1);
|
||||
|
||||
@@ -207,7 +207,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
/* logo */
|
||||
widget_add_child(g, line, logo, -1);
|
||||
|
||||
input_signal_plot = new_xy_plot(g, 256, 55, "input signal", 20);
|
||||
input_signal_plot = new_xy_plot(g, 512, 110, "input signal", 20);
|
||||
widget_add_child(g, line, input_signal_plot, -1);
|
||||
xy_plot_set_range(g, input_signal_plot, 0, 7680*10, 20, 70);
|
||||
input_signal_log = new_framelog(h, database,
|
||||
@@ -221,7 +221,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
logger_add_view(input_signal_log, input_signal_view);
|
||||
|
||||
/* UE x PDSCH IQ data */
|
||||
w = new_xy_plot(g, 55, 55, "", 50);
|
||||
w = new_xy_plot(g, 110, 110, "", 50);
|
||||
e->pdsch_iq_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -500, 500, -500, 500);
|
||||
@@ -232,7 +232,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->pdsch_iq_ue_logger = l;
|
||||
|
||||
/* UE x estimated DL channel */
|
||||
w = new_xy_plot(g, 280, 55, "", 50);
|
||||
w = new_xy_plot(g, 560, 110, "", 50);
|
||||
e->dl_estimate_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 512*10, -10, 80);
|
||||
@@ -245,7 +245,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->dl_estimate_ue_logger = l;
|
||||
|
||||
/* PHY Meas */
|
||||
w = new_xy_plot(g, 128, 55, "", 50);
|
||||
w = new_xy_plot(g, 256, 110, "", 50);
|
||||
e->phy_meas_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -130, 35);
|
||||
@@ -271,7 +271,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
/* UE x DL mcs */
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
w = new_xy_plot(g, 128, 55, "", 20);
|
||||
w = new_xy_plot(g, 192, 110, "", 20);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -2, 30);
|
||||
e->dl_mcs_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
@@ -282,7 +282,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->dl_mcs_logger = l;
|
||||
|
||||
/* UE x UL mcs */
|
||||
w = new_xy_plot(g, 128, 55, "", 20);
|
||||
w = new_xy_plot(g, 192, 110, "", 20);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -2, 30);
|
||||
e->ul_mcs_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
@@ -295,7 +295,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
/* UE x PUSCH TX Power */
|
||||
// line = new_container(g, HORIZONTAL);
|
||||
// widget_add_child(g, top_container, line, -1);
|
||||
w = new_xy_plot(g, 128, 55, "", 20);
|
||||
w = new_xy_plot(g, 192, 110, "", 20);
|
||||
e->pusch_power_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -30, 50);
|
||||
@@ -313,7 +313,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
/* UE x PUCCH TX Power */
|
||||
// line = new_container(g, HORIZONTAL);
|
||||
// widget_add_child(g, top_container, line, -1);
|
||||
w = new_xy_plot(g, 128, 55, "", 20);
|
||||
w = new_xy_plot(g, 192, 110, "", 20);
|
||||
e->pucch_power_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -30, 50);
|
||||
@@ -329,7 +329,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->pucch_ampl_logger = l;
|
||||
|
||||
/* UE x PDSCH energy */
|
||||
w = new_xy_plot(g, 128, 55, "", 50);
|
||||
w = new_xy_plot(g, 192, 110, "", 50);
|
||||
e->pdsch_energy_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -10, 80);
|
||||
@@ -355,7 +355,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->pdsch_energy_logger = l;
|
||||
|
||||
/* UE x PDCCH energy */
|
||||
w = new_xy_plot(g, 128, 55, "", 50);
|
||||
w = new_xy_plot(g, 192, 110, "", 50);
|
||||
e->pdcch_energy_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, 0, 1024*10, -10, 80);
|
||||
@@ -381,7 +381,7 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
e->pdcch_energy_logger = l;
|
||||
|
||||
/* UE x PDCCH IQ data */
|
||||
w = new_xy_plot(g, 55, 55, "", 50);
|
||||
w = new_xy_plot(g, 110, 110, "", 50);
|
||||
e->pdcch_iq_ue_xy_plot = w;
|
||||
widget_add_child(g, line, w, -1);
|
||||
xy_plot_set_range(g, w, -100, 100, -100, 100);
|
||||
@@ -544,16 +544,16 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
/* phy/mac/rlc/pdcp/rrc textlog */
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
container_set_child_growable(g, top_container, line, 1);
|
||||
container_set_child_growable(g, top_container, line, 0);
|
||||
|
||||
/* phy */
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, line, col, -1);
|
||||
container_set_child_growable(g, line, col, 1);
|
||||
widget_add_child(g, col, new_label(g, "PHY"), -1);
|
||||
text = new_textlist(g, 100, 10, new_color(g, "#afa"));
|
||||
text = new_textlist(g, 100, 5, new_color(g, "#afa"));
|
||||
widget_add_child(g, col, text, -1);
|
||||
container_set_child_growable(g, col, text, 1);
|
||||
container_set_child_growable(g, col, text, 0);
|
||||
textview = new_view_textlist(10000, 10, g, text);
|
||||
e->phyview = textview;
|
||||
|
||||
@@ -562,24 +562,24 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
widget_add_child(g, line, col, -1);
|
||||
container_set_child_growable(g, line, col, 1);
|
||||
widget_add_child(g, col, new_label(g, "MAC"), -1);
|
||||
text = new_textlist(g, 100, 10, new_color(g, "#adf"));
|
||||
text = new_textlist(g, 100, 5, new_color(g, "#adf"));
|
||||
widget_add_child(g, col, text, -1);
|
||||
container_set_child_growable(g, col, text, 1);
|
||||
container_set_child_growable(g, col, text, 0);
|
||||
textview = new_view_textlist(10000, 10, g, text);
|
||||
e->macview = textview;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
container_set_child_growable(g, top_container, line, 1);
|
||||
container_set_child_growable(g, top_container, line, 0);
|
||||
|
||||
/* rlc */
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, line, col, -1);
|
||||
container_set_child_growable(g, line, col, 1);
|
||||
widget_add_child(g, col, new_label(g, "RLC"), -1);
|
||||
text = new_textlist(g, 100, 10, new_color(g, "#aff"));
|
||||
text = new_textlist(g, 100, 5, new_color(g, "#aff"));
|
||||
widget_add_child(g, col, text, -1);
|
||||
container_set_child_growable(g, col, text, 1);
|
||||
container_set_child_growable(g, col, text, 0);
|
||||
textview = new_view_textlist(10000, 10, g, text);
|
||||
e->rlcview = textview;
|
||||
|
||||
@@ -588,24 +588,24 @@ static void ue_main_gui(ue_gui *e, gui *g, event_handler *h, void *database,
|
||||
widget_add_child(g, line, col, -1);
|
||||
container_set_child_growable(g, line, col, 1);
|
||||
widget_add_child(g, col, new_label(g, "PDCP"), -1);
|
||||
text = new_textlist(g, 100, 10, new_color(g, "#ed9"));
|
||||
text = new_textlist(g, 100, 5, new_color(g, "#ed9"));
|
||||
widget_add_child(g, col, text, -1);
|
||||
container_set_child_growable(g, col, text, 1);
|
||||
container_set_child_growable(g, col, text, 0);
|
||||
textview = new_view_textlist(10000, 10, g, text);
|
||||
e->pdcpview = textview;
|
||||
|
||||
line = new_container(g, HORIZONTAL);
|
||||
widget_add_child(g, top_container, line, -1);
|
||||
container_set_child_growable(g, top_container, line, 1);
|
||||
container_set_child_growable(g, top_container, line, 0);
|
||||
|
||||
/* rrc */
|
||||
col = new_container(g, VERTICAL);
|
||||
widget_add_child(g, line, col, -1);
|
||||
container_set_child_growable(g, line, col, 1);
|
||||
widget_add_child(g, col, new_label(g, "RRC"), -1);
|
||||
text = new_textlist(g, 100, 10, new_color(g, "#fdb"));
|
||||
text = new_textlist(g, 100, 5, new_color(g, "#fdb"));
|
||||
widget_add_child(g, col, text, -1);
|
||||
container_set_child_growable(g, col, text, 1);
|
||||
container_set_child_growable(g, col, text, 0);
|
||||
textview = new_view_textlist(10000, 10, g, text);
|
||||
e->rrcview = textview;
|
||||
|
||||
|
||||
@@ -125,8 +125,9 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
|
||||
for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
|
||||
|
||||
ue->measurements.rx_power_avg_dB[gNB_id] = dB_fixed( ue->measurements.rx_power_avg[gNB_id]);
|
||||
ue->measurements.n0_power_avg_dB = dB_fixed(ue->measurements.n0_power_avg);
|
||||
ue->measurements.wideband_cqi_tot[gNB_id] = ue->measurements.rx_power_tot_dB[gNB_id] - ue->measurements.n0_power_tot_dB;
|
||||
ue->measurements.wideband_cqi_avg[gNB_id] = ue->measurements.rx_power_avg_dB[gNB_id] - dB_fixed(ue->measurements.n0_power_avg);
|
||||
ue->measurements.wideband_cqi_avg[gNB_id] = ue->measurements.rx_power_avg_dB[gNB_id] - ue->measurements.n0_power_avg_dB;
|
||||
ue->measurements.rx_rssi_dBm[gNB_id] = ue->measurements.rx_power_avg_dB[gNB_id] + 30 - SQ15_SQUARED_NORM_FACTOR_DB
|
||||
- ((int)ue->openair0_cfg[0].rx_gain[0] - (int)ue->openair0_cfg[0].rx_gain_offset[0])
|
||||
- dB_fixed(ue->frame_parms.ofdm_symbol_size);
|
||||
|
||||
@@ -372,7 +372,14 @@ void nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||
LOG_D(NR_PHY_DCI, "slot %d: pdcch log2_maxh = %d (%d,%d)\n", proc->nr_slot_rx, log2_maxh, avgP[0], avgs);
|
||||
#endif
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_PDCCH_ENERGY, T_INT(0), T_INT(0), T_INT(proc->frame_rx % 1024), T_INT(proc->nr_slot_rx), T_INT(avgs));
|
||||
T(T_UE_PHY_PDCCH_ENERGY,
|
||||
T_INT(0),
|
||||
T_INT(proc->frame_rx % 1024),
|
||||
T_INT(proc->nr_slot_rx),
|
||||
T_INT(avg[0]),
|
||||
T_INT(antRx > 1 ? avg[1] : 0),
|
||||
T_INT(antRx > 2 ? avg[2] : 0),
|
||||
T_INT(antRx > 3 ? avg[3] : 0));
|
||||
#endif
|
||||
LOG_D(NR_PHY_DCI, "we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n", log2_maxh);
|
||||
LOG_D(NR_PHY_DCI, "in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n");
|
||||
|
||||
@@ -540,6 +540,16 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
}
|
||||
*log2_maxh = (log2_approx(avgs) / 2) + 1;
|
||||
LOG_D(PHY, "[DLSCH] AbsSubframe %d.%d log2_maxh = %d (%d)\n", frame % 1024, nr_slot_rx, *log2_maxh, avgs);
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_PDSCH_ENERGY,
|
||||
T_INT(gNB_id),
|
||||
T_INT(frame % 1024),
|
||||
T_INT(nr_slot_rx),
|
||||
T_INT(avg[0]), // layer 0, antenna 0
|
||||
T_INT(n_rx > 1 ? avg[1] : 0), // layer 0, antenna 1
|
||||
T_INT(nl > 1 ? avg[n_rx] : 0), // layer 1, antenna 0
|
||||
T_INT(nl > 1 && n_rx > 1 ? avg[n_rx + 1] : 0)); // layer 1, antenna 1
|
||||
#endif
|
||||
}
|
||||
stop_meas_nr_ue_phy(ue, DLSCH_CHANNEL_LEVEL_STATS);
|
||||
if (meas_enabled) {
|
||||
@@ -552,9 +562,6 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
first_symbol_flag,
|
||||
ue->phy_cpu_stats.cpu_time_stats[DLSCH_CHANNEL_LEVEL_STATS].p_time / (cpuf * 1000.0));
|
||||
}
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_PDSCH_ENERGY, T_INT(gNB_id), T_INT(0), T_INT(frame % 1024), T_INT(nr_slot_rx));
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------
|
||||
//--------------------- channel compensation ---------------
|
||||
@@ -746,13 +753,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_PDSCH_IQ,
|
||||
T_INT(gNB_id),
|
||||
T_INT(ue->Mod_id),
|
||||
T_INT(frame % 1024),
|
||||
T_INT(nr_slot_rx),
|
||||
T_INT(nb_rb_pdsch),
|
||||
T_INT(fp->N_RB_UL),
|
||||
T_INT(fp->symbols_per_slot),
|
||||
T_BUFFER(&rxdataF_comp[gNB_id][0], 2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ fp->N_RB_UL * 12 * 2));
|
||||
T_BUFFER(&rxdataF_comp[gNB_id][0], 2 * fp->N_RB_UL * 12 * fp->symbols_per_slot * 2));
|
||||
#endif
|
||||
|
||||
if (ue->phy_sim_pdsch_rxdataF_comp)
|
||||
|
||||
@@ -372,6 +372,9 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n
|
||||
AssertFatal(ue->CC_id == 0, "Transmission on secondary CCs is not supported yet\n");
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_TX,VCD_FUNCTION_IN);
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_UL_TICK, T_INT(ue->Mod_id), T_INT(frame_tx % 1024), T_INT(slot_tx));
|
||||
#endif
|
||||
|
||||
const int samplesF_per_slot = NR_SYMBOLS_PER_SLOT * ue->frame_parms.ofdm_symbol_size;
|
||||
c16_t txdataF_buf[ue->frame_parms.nb_antennas_tx * samplesF_per_slot] __attribute__((aligned(32)));
|
||||
@@ -440,7 +443,6 @@ static void nr_ue_measurement_procedures(uint16_t l,
|
||||
if(nr_slot_rx == 0)
|
||||
T(T_UE_PHY_MEAS,
|
||||
T_INT(gNB_id),
|
||||
T_INT(ue->Mod_id),
|
||||
T_INT(proc->frame_rx % 1024),
|
||||
T_INT(nr_slot_rx),
|
||||
T_INT((int)(10 * log10(ue->measurements.rsrp[0]) - ue->rx_total_gain_dB)),
|
||||
@@ -448,7 +450,8 @@ static void nr_ue_measurement_procedures(uint16_t l,
|
||||
T_INT((int)(ue->measurements.rx_power_avg_dB[0] - ue->measurements.n0_power_avg_dB)),
|
||||
T_INT((int)ue->measurements.rx_power_avg_dB[0]),
|
||||
T_INT((int)ue->measurements.n0_power_avg_dB),
|
||||
T_INT((int)ue->measurements.wideband_cqi_avg[0]));
|
||||
T_INT((int)ue->measurements.wideband_cqi_avg[0]),
|
||||
T_INT((int)ue->common_vars.freq_offset));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -1039,6 +1042,9 @@ int pbch_pdcch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_
|
||||
nr_ue_dlsch_init(phy_data->dlsch, NR_MAX_NB_LAYERS>4 ? 2:1, ue->max_ldpc_iterations);
|
||||
|
||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_UE_RX, VCD_FUNCTION_IN);
|
||||
#if T_TRACER
|
||||
T(T_UE_PHY_DL_TICK, T_INT(ue->Mod_id), T_INT(frame_rx % 1024), T_INT(nr_slot_rx));
|
||||
#endif
|
||||
|
||||
LOG_D(PHY," ****** start RX-Chain for Frame.Slot %d.%d ****** \n",
|
||||
frame_rx%1024, nr_slot_rx);
|
||||
|
||||
Reference in New Issue
Block a user