Add ulsch decoding statistics measurements
Add ulsch decoding measurements, which are reported by nr_ulsim. Start ulsch_decoding_stats measurement before nr_ulsch_decoding is called and stop it after collection of all decoder tasks from Tpool. In the context of nr_ulsim, ULSCH_id is allways == 0, testing is performed per one TB, therefore measurement is started and stopped only once per trial. Reported ulsch decoding statistics show the mean ulsch decoding time over x trials (specified by -n command line option of nr_ulsim). This measurement does not provide valid information in case of nr-softmodem, when the loop is done over multiple ULSCH IDs - start of the measurement is done multiple times and stops only once in this case. For unitary physical simulators, ULSCH processing loop is executed only once - the max number of PUSCH is set to 1. This ensures exactly one start and stop of the ULSCH decoding time measurement per processed TB. Note: ulsch decoding statistics reports average time of segmentation, rate matching, interleaving and decoding of the TB
This commit is contained in:
@@ -690,6 +690,7 @@ typedef struct PHY_VARS_gNB_s {
|
||||
time_stats_t ul_indication_stats;
|
||||
time_stats_t slot_indication_stats;
|
||||
time_stats_t schedule_response_stats;
|
||||
time_stats_t ulsch_decoding_stats;
|
||||
time_stats_t ulsch_ldpc_decoding_stats;
|
||||
time_stats_t ulsch_deinterleaving_stats;
|
||||
time_stats_t ulsch_channel_estimation_stats;
|
||||
|
||||
@@ -428,7 +428,12 @@ static int nr_ulsch_procedures(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx, int
|
||||
//----------------------------------------------------------
|
||||
//--------------------- ULSCH decoding ---------------------
|
||||
//----------------------------------------------------------
|
||||
|
||||
/* Do ULSCH decoding time measurement only when number of PUSCH is limited to 1
|
||||
* (valid for unitary physical simulators). ULSCH processing lopp is then executed
|
||||
* only once, which ensures exactly one start and stop of the ULSCH decoding time
|
||||
* measurement per processed TB.*/
|
||||
if (gNB->max_nb_pusch == 1)
|
||||
start_meas(&gNB->ulsch_decoding_stats);
|
||||
int nbDecode =
|
||||
nr_ulsch_decoding(gNB, ULSCH_id, gNB->pusch_vars[ULSCH_id].llr, frame_parms, pusch_pdu, frame_rx, slot_rx, harq_pid, G);
|
||||
|
||||
@@ -916,6 +921,12 @@ int phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
|
||||
delNotifiedFIFO_elt(req);
|
||||
totalDecode--;
|
||||
}
|
||||
/* Do ULSCH decoding time measurement only when number of PUSCH is limited to 1
|
||||
* (valid for unitary physical simulators). ULSCH processing loop is then executed
|
||||
* only once, which ensures exactly one start and stop of the ULSCH decoding time
|
||||
* measurement per processed TB.*/
|
||||
if (gNB->max_nb_pusch == 1)
|
||||
stop_meas(&gNB->ulsch_decoding_stats);
|
||||
for (int i = 0; i < gNB->max_nb_srs; i++) {
|
||||
NR_gNB_SRS_t *srs = &gNB->srs[i];
|
||||
if (srs) {
|
||||
|
||||
@@ -924,6 +924,7 @@ int main(int argc, char *argv[])
|
||||
reset_meas(&gNB->rx_pusch_stats);
|
||||
reset_meas(&gNB->rx_pusch_init_stats);
|
||||
reset_meas(&gNB->rx_pusch_symbol_processing_stats);
|
||||
reset_meas(&gNB->ulsch_decoding_stats);
|
||||
reset_meas(&gNB->ulsch_channel_estimation_stats);
|
||||
reset_meas(&UE->ulsch_ldpc_encoding_stats);
|
||||
reset_meas(&UE->ulsch_rate_matching_stats);
|
||||
@@ -1548,6 +1549,7 @@ int main(int argc, char *argv[])
|
||||
printStatIndent2(&gNB->ulsch_channel_estimation_stats, "ULSCH channel estimation time");
|
||||
printStatIndent2(&gNB->rx_pusch_init_stats, "RX PUSCH Initialization time");
|
||||
printStatIndent2(&gNB->rx_pusch_symbol_processing_stats, "RX PUSCH Symbol Processing time");
|
||||
printStatIndent(&gNB->ulsch_decoding_stats,"ULSCH total decoding time");
|
||||
|
||||
printf("\nUE TX\n");
|
||||
printStatIndent(&UE->ulsch_encoding_stats,"ULSCH total encoding time");
|
||||
|
||||
Reference in New Issue
Block a user