add harqid in wireshark traces, refactir the trace_pdu parameters

This commit is contained in:
Laurent THOMAS
2024-07-31 09:40:07 +02:00
parent bd721c3bdb
commit 0e7e66ecd8
17 changed files with 396 additions and 263 deletions
+15 -2
View File
@@ -276,8 +276,21 @@ int nr_dlsch_encoding(PHY_VARS_gNB *gNB,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_gNB_DLSCH_ENCODING, VCD_FUNCTION_IN);
uint32_t A = rel15->TBSize[0]<<3;
unsigned char *a=harq->pdu;
if (rel15->rnti != SI_RNTI)
trace_NRpdu(DIRECTION_DOWNLINK, a, rel15->TBSize[0], WS_C_RNTI, rel15->rnti, frame, slot,0, 0);
if (rel15->rnti != SI_RNTI) {
ws_trace_t tmp = {.nr = true,
.direction = DIRECTION_DOWNLINK,
.pdu_buffer = a,
.pdu_buffer_size = rel15->TBSize[0],
.ueid = 0,
.rntiType = WS_C_RNTI,
.rnti = rel15->rnti,
.sysFrame = frame,
.subframe = slot,
.harq_pid = 0, // difficult to find the harq pid here
.oob_event = 0,
.oob_event_value = 0};
trace_pdu(&tmp);
}
NR_gNB_PHY_STATS_t *phy_stats = NULL;
if (rel15->rnti != 0xFFFF)
+13 -2
View File
@@ -183,8 +183,19 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
unav_res,
mod_order,
Nl);
trace_NRpdu(DIRECTION_UPLINK, harq_process_ul_ue->payload_AB, tb_size, WS_C_RNTI, rnti, frame, slot, 0, 0);
ws_trace_t tmp = {.nr = true,
.direction = DIRECTION_UPLINK,
.pdu_buffer = harq_process_ul_ue->payload_AB,
.pdu_buffer_size = tb_size,
.ueid = 0,
.rntiType = WS_C_RNTI,
.rnti = rnti,
.sysFrame = frame,
.subframe = slot,
.harq_pid = harq_pid,
.oob_event = 0,
.oob_event_value = 0};
trace_pdu(&tmp);
if (nr_ulsch_encoding(UE, ulsch_ue, frame_parms, harq_pid, tb_size, G) == -1)
return;
+11 -1
View File
@@ -146,7 +146,17 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
t = WS_RA_RNTI;
if (pdu_type == FAPI_NR_RX_PDU_TYPE_SIB)
t = WS_SI_RNTI;
trace_NRpdu(DIRECTION_DOWNLINK, b, rx->pdsch_pdu.pdu_length, t, dlsch0->rnti, proc->frame_rx, proc->nr_slot_rx, 0, 0);
ws_trace_t tmp = {.nr = true,
.direction = DIRECTION_DOWNLINK,
.pdu_buffer = b,
.pdu_buffer_size = rx->pdsch_pdu.pdu_length,
.ueid = 0,
.rntiType = t,
.rnti = dlsch0->rnti,
.sysFrame = proc->frame_rx,
.subframe = proc->nr_slot_rx,
.harq_pid = dlsch0->dlsch_config.harq_process_nbr};
trace_pdu(&tmp);
}
}
if(dlsch1) {
+9 -2
View File
@@ -2336,8 +2336,15 @@ if((ue->frame_parms.FeMBMS_active == 0)|| is_fembms_cas_subframe(frame_rx,subfra
dummy[0] = ue->pbch_vars[eNB_id]->decoded_output[2];
dummy[1] = ue->pbch_vars[eNB_id]->decoded_output[1];
dummy[2] = ue->pbch_vars[eNB_id]->decoded_output[0];
trace_pdu( DIRECTION_DOWNLINK, dummy, WS_C_RNTI, ue->Mod_id, 0, 0,
frame_rx, subframe_rx, 0, 0);
ws_trace_t tmp = {.direction = DIRECTION_DOWNLINK,
.pdu_buffer = dummy,
.pdu_buffer_size = sizeof(dummy),
.ueid = ue->Mod_id,
.rntiType = WS_C_RNTI,
.rnti = ue->Mod_id,
.sysFrame = frame_rx,
.subframe = subframe_rx};
trace_pdu(&tmp);
}
if (pbch_tx_ant>2) {