Commit 9c8bdd6d authored by Sakthivel Velumani's avatar Sakthivel Velumani Committed by francescomani

Add PUSCH timing stats

parent 9126e3dd
......@@ -116,6 +116,7 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
&harq_process->Z,
&harq_process->F,
harq_process->BG);
stop_meas_nr_ue_phy(ue, ULSCH_SEGMENTATION_STATS);
impp.n_segments = harq_process->C;
impp.K = harq_process->K;
impp.Kr = impp.K;
......@@ -126,7 +127,6 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
LOG_E(PHY, "nr_segmentation.c: too many segments %d, B %d\n", impp.n_segments, B);
return(-1);
}
stop_meas_nr_ue_phy(ue, ULSCH_SEGMENTATION_STATS);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_SEGMENTATION, VCD_FUNCTION_OUT);
#ifdef DEBUG_ULSCH_CODING
......@@ -149,19 +149,22 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_IN);
}
start_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
if (ldpc_interface_offload.LDPCencoder) {
for (int j = 0; j < impp.n_segments; j++) {
impp.perCB[j].E_cb = nr_get_E(G, impp.n_segments, impp.Qm, ulsch->pusch_pdu.nrOfLayers, j);
}
start_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
ldpc_interface_offload.LDPCencoder(harq_process->c, &harq_process->f, &impp);
stop_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
} else {
if (ulsch->pusch_pdu.pusch_data.new_data_indicator) {
start_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
for (int j = 0; j < (impp.n_segments / 8 + 1); j++) {
impp.macro_num = j;
impp.Kr = impp.K;
ldpc_interface.LDPCencoder(harq_process->c, harq_process->d, &impp);
}
stop_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_LDPC_ENCODER_OPTIM, VCD_FUNCTION_OUT);
#ifdef DEBUG_ULSCH_CODING
......@@ -169,7 +172,6 @@ int nr_ulsch_encoding(PHY_VARS_NR_UE *ue,
write_output("ulsch_enc_output0.m", "enc0", &harq_process->d[0][0], (3 * 8 * Kr_bytes) + 12, 1, 4);
#endif
}
stop_meas_nr_ue_phy(ue, ULSCH_LDPC_ENCODING_STATS);
///////////////////////////////////////////////////////////////////////////////
for (int r = 0; r < impp.n_segments; r++) { // looping over C segments
if (impp.F > 0) {
......
......@@ -45,11 +45,13 @@
FN(PHY_RX_PDCCH_STATS),\
FN(DLSCH_PROCEDURES_STATS),\
FN(PHY_PROC_TX),\
FN(PUSCH_PROC_STATS),\
FN(ULSCH_SEGMENTATION_STATS),\
FN(ULSCH_LDPC_ENCODING_STATS),\
FN(ULSCH_RATE_MATCHING_STATS),\
FN(ULSCH_INTERLEAVING_STATS),\
FN(ULSCH_ENCODING_STATS)
FN(ULSCH_ENCODING_STATS),\
FN(OFDM_MOD_STATS)
typedef enum {
FOREACH_NR_PHY_CPU_MEAS(NOOP),
......
......@@ -287,21 +287,26 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, n
start_meas_nr_ue_phy(ue, PHY_PROC_TX);
int harq_pid = phy_data->ulsch.pusch_pdu.pusch_data.harq_process_id;
if (ue->ul_harq_processes[harq_pid].ULstatus == ACTIVE)
const int harq_pid = phy_data->ulsch.pusch_pdu.pusch_data.harq_process_id;
if (ue->ul_harq_processes[harq_pid].ULstatus == ACTIVE) {
start_meas_nr_ue_phy(ue, PUSCH_PROC_STATS);
nr_ue_ulsch_procedures(ue, harq_pid, frame_tx, slot_tx, gNB_id, phy_data, (c16_t **)&txdataF);
stop_meas_nr_ue_phy(ue, PUSCH_PROC_STATS);
}
ue_srs_procedures_nr(ue, proc, (c16_t **)&txdataF);
pucch_procedures_ue_nr(ue, proc, phy_data, (c16_t **)&txdataF);
LOG_D(PHY, "Sending Uplink data \n");
start_meas_nr_ue_phy(ue, OFDM_MOD_STATS);
nr_ue_pusch_common_procedures(ue,
proc->nr_slot_tx,
&ue->frame_parms,
ue->frame_parms.nb_antennas_tx,
(c16_t **)txdataF,
link_type_ul);
stop_meas_nr_ue_phy(ue, OFDM_MOD_STATS);
nr_ue_prach_procedures(ue, proc);
......
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