get execution time_stats_t from Tpool job
This commit is contained in:
@@ -169,6 +169,18 @@ static inline notifiedFIFO_elt_t *pollNotifiedFIFO(notifiedFIFO_t *nf) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline time_stats_t exec_time_stats_NotifiedFIFO(const notifiedFIFO_elt_t* elt)
|
||||||
|
{
|
||||||
|
time_stats_t ts = {0};
|
||||||
|
ts.in = elt->startProcessingTime;
|
||||||
|
ts.diff = elt->endProcessingTime - ts.in;
|
||||||
|
ts.p_time = ts.diff;
|
||||||
|
ts.diff_square = ts.diff * ts.diff;
|
||||||
|
ts.max = ts.diff;
|
||||||
|
ts.trials = 1;
|
||||||
|
return ts;
|
||||||
|
}
|
||||||
|
|
||||||
// This function aborts all messages matching the key
|
// This function aborts all messages matching the key
|
||||||
// If the queue is used in thread pools, it doesn't cancels already running processing
|
// If the queue is used in thread pools, it doesn't cancels already running processing
|
||||||
// because the message has already been picked
|
// because the message has already been picked
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ static inline void copy_meas(time_stats_t *dst_ts,time_stats_t *src_ts) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void merge_meas(time_stats_t *dst_ts, time_stats_t *src_ts)
|
static inline void merge_meas(time_stats_t *dst_ts, const time_stats_t *src_ts)
|
||||||
{
|
{
|
||||||
if (!opp_enabled)
|
if (!opp_enabled)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ void init_gNB_Tpool(int inst) {
|
|||||||
s_offset += 3;
|
s_offset += 3;
|
||||||
}
|
}
|
||||||
if (getenv("noThreads")) strcpy(pool, "n");
|
if (getenv("noThreads")) strcpy(pool, "n");
|
||||||
initTpool(pool, gNB->threadPool, false);
|
initTpool(pool, gNB->threadPool, true);
|
||||||
// ULSCH decoder result FIFO
|
// ULSCH decoder result FIFO
|
||||||
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
gNB->respDecode = (notifiedFIFO_t*) malloc(sizeof(notifiedFIFO_t));
|
||||||
initNotifiedFIFO(gNB->respDecode);
|
initNotifiedFIFO(gNB->respDecode);
|
||||||
|
|||||||
@@ -973,7 +973,6 @@ typedef struct processingData_L1tx {
|
|||||||
uint16_t num_pdsch_slot;
|
uint16_t num_pdsch_slot;
|
||||||
int num_dl_pdcch;
|
int num_dl_pdcch;
|
||||||
int num_ul_pdcch;
|
int num_ul_pdcch;
|
||||||
time_stats_t phy_proc_tx;
|
|
||||||
} processingData_L1tx_t;
|
} processingData_L1tx_t;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -165,8 +165,8 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
|
|||||||
notifiedFIFO_elt_t *res;
|
notifiedFIFO_elt_t *res;
|
||||||
res = pullTpool(gNB->L1_tx_free, gNB->threadPool);
|
res = pullTpool(gNB->L1_tx_free, gNB->threadPool);
|
||||||
processingData_L1tx_t *msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
|
processingData_L1tx_t *msgTx = (processingData_L1tx_t *)NotifiedFifoData(res);
|
||||||
|
const time_stats_t ts = exec_time_stats_NotifiedFIFO(res);
|
||||||
merge_meas(&gNB->phy_proc_tx, &msgTx->phy_proc_tx);
|
merge_meas(&gNB->phy_proc_tx, &ts);
|
||||||
|
|
||||||
msgTx->num_pdsch_slot=0;
|
msgTx->num_pdsch_slot=0;
|
||||||
msgTx->num_dl_pdcch=0;
|
msgTx->num_dl_pdcch=0;
|
||||||
|
|||||||
@@ -134,11 +134,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
|||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,1);
|
||||||
|
|
||||||
if (do_meas==1) {
|
|
||||||
reset_meas(&msgTx->phy_proc_tx);
|
|
||||||
start_meas(&msgTx->phy_proc_tx);
|
|
||||||
}
|
|
||||||
|
|
||||||
// clear the transmit data array and beam index for the current slot
|
// clear the transmit data array and beam index for the current slot
|
||||||
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
for (aa=0; aa<cfg->carrier_config.num_tx_ant.value; aa++) {
|
||||||
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
|
memset(&gNB->common_vars.txdataF[aa][txdataF_offset],0,fp->samples_per_slot_wCP*sizeof(int32_t));
|
||||||
@@ -196,8 +191,6 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_gNB_TX+offset,0);
|
||||||
|
|
||||||
if (do_meas==1) stop_meas(&msgTx->phy_proc_tx);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
void nr_postDecode(PHY_VARS_gNB *gNB, notifiedFIFO_elt_t *req) {
|
||||||
|
|||||||
@@ -999,7 +999,6 @@ int main(int argc, char **argv)
|
|||||||
msgDataTx->slot = slot;
|
msgDataTx->slot = slot;
|
||||||
msgDataTx->frame = frame;
|
msgDataTx->frame = frame;
|
||||||
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
|
memset(msgDataTx->ssb, 0, 64*sizeof(NR_gNB_SSB_t));
|
||||||
reset_meas(&msgDataTx->phy_proc_tx);
|
|
||||||
|
|
||||||
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
for (SNR = snr0; SNR < snr1; SNR += .2) {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user