Commit d174e15a authored by Wang Tsu-Han's avatar Wang Tsu-Han

Measure timing wait for FEP and FEPTX

parent 22911600
......@@ -470,7 +470,7 @@ void *te_thread(void *param) {
if (wait_on_condition(&proc->mutex_te[0],&proc->cond_te[0],&proc->instance_cnt_te[0],"te thread")<0) break;
stop_meas(te_wakeup_stats0);
//stop_meas(te_wakeup_stats0);
dlsch_encoding_2threads0((te_params*)param);
......@@ -481,10 +481,10 @@ void *te_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return(NULL);
}
if(opp_enabled == 1 && te_wakeup_stats0->diff_now>50*3000){
/*if(opp_enabled == 1 && te_wakeup_stats0->diff_now>50*3000){
print_meas_now(te_wakeup_stats0,"coding_wakeup",stderr);
printf("frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}
printf("te_thread0 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}*/
}
return(NULL);
......@@ -509,7 +509,7 @@ void *te_thread1(void *param) {
if (wait_on_condition(&proc->mutex_te[1],&proc->cond_te[1],&proc->instance_cnt_te[1],"te thread 1")<0) break;
stop_meas(te_wakeup_stats1);
//stop_meas(te_wakeup_stats1);
dlsch_encoding_2threads1((te_params*)param);
......@@ -520,10 +520,10 @@ void *te_thread1(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return(NULL);
}
if(opp_enabled == 1 && te_wakeup_stats1->diff_now>50*3000){
/*if(opp_enabled == 1 && te_wakeup_stats1->diff_now>50*3000){
print_meas_now(te_wakeup_stats1,"coding_wakeup",stderr);
printf("delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}
printf("te_thread1 delay for waking up in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}*/
}
return(NULL);
......@@ -607,7 +607,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
exit_fun( "ERROR pthread_cond_signal" );
return (-1);
}
start_meas(te_wakeup_stats0);
//start_meas(te_wakeup_stats0);
pthread_mutex_unlock( &proc->mutex_te[0] );
////////////////////////////////////////////////////////////////
......@@ -631,7 +631,7 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
exit_fun( "ERROR pthread_cond_signal" );
return (-1);
}
start_meas(te_wakeup_stats1);
//start_meas(te_wakeup_stats1);
pthread_mutex_unlock( &proc->mutex_te[1] );
......@@ -743,9 +743,9 @@ int dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
wait_on_busy_condition(&proc->mutex_te[0],&proc->cond_te[0],&proc->instance_cnt_te[0],"te thread");
wait_on_busy_condition(&proc->mutex_te[1],&proc->cond_te[1],&proc->instance_cnt_te[1],"te thread1");
stop_meas(te_wait_stats);
if(opp_enabled == 1 && te_wait_stats->diff_now>50*3000){
if(opp_enabled == 1 && te_wait_stats->diff_now>100*3000){
print_meas_now(te_wait_stats,"coding_wait",stderr);
printf("delay in wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
printf("delay in wait on codition in frame_rx: %d \n",proc->frame_rx);
}
......
......@@ -773,6 +773,14 @@ typedef struct RU_t_s{
time_stats_t ofdm_demod_stats;
/// Timing statistics (TX)
time_stats_t ofdm_mod_stats;
/// Timing wait statistics
time_stats_t ofdm_demod_wait_stats;
/// Timing wakeup statistics
time_stats_t ofdm_demod_wakeup_stats;
/// Timing wait statistics (TX)
time_stats_t ofdm_mod_wait_stats;
/// Timing wakeup statistics (TX)
time_stats_t ofdm_mod_wakeup_stats;
/// RX and TX buffers for precoder output
RU_COMMON common;
/// beamforming weight vectors per eNB
......
......@@ -152,6 +152,7 @@ static void *feptx_thread(void *param) {
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread")<0) break;
//stop_meas(&ru->ofdm_mod_wakeup_stats);
feptx0(ru,1);
if (release_thread(&proc->mutex_feptx,&proc->instance_cnt_feptx,"feptx thread")<0) break;
......@@ -160,6 +161,10 @@ static void *feptx_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return NULL;
}
/*if(opp_enabled == 1 && ru->ofdm_mod_wakeup_stats.diff_now>30*3000){
print_meas_now(&ru->ofdm_mod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wakeup in frame_tx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
}*/
}
......@@ -204,13 +209,20 @@ void feptx_ofdm_2thread(RU_t *ru) {
exit_fun( "ERROR pthread_cond_signal" );
return;
}
//start_meas(&ru->ofdm_mod_wakeup_stats);
pthread_mutex_unlock( &proc->mutex_feptx );
}
// call first slot in this thread
feptx0(ru,0);
start_meas(&ru->ofdm_mod_wait_stats);
wait_on_busy_condition(&proc->mutex_feptx,&proc->cond_feptx,&proc->instance_cnt_feptx,"feptx thread");
stop_meas(&ru->ofdm_mod_wait_stats);
if(opp_enabled == 1 && ru->ofdm_mod_wait_stats.diff_now>30*3000){
print_meas_now(&ru->ofdm_mod_wait_stats,"fep wakeup",stderr);
printf("delay in feptx wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_tx,proc->subframe_tx);
}
stop_meas(&ru->ofdm_mod_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPTX_OFDM , 0 );
......@@ -432,6 +444,7 @@ static void *fep_thread(void *param) {
while (!oai_exit) {
if (wait_on_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread")<0) break;
//stop_meas(&ru->ofdm_demod_wakeup_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1, 1 );
fep0(ru,0);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX1, 0 );
......@@ -442,6 +455,10 @@ static void *fep_thread(void *param) {
exit_fun( "ERROR pthread_cond_signal" );
return NULL;
}
/*if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){
print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wakeup in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}*/
}
......@@ -509,13 +526,20 @@ void ru_fep_full_2thread(RU_t *ru) {
exit_fun( "ERROR pthread_cond_signal" );
return;
}
//start_meas(&ru->ofdm_demod_wakeup_stats);
pthread_mutex_unlock( &proc->mutex_fep );
// call second slot in this symbol
fep0(ru,1);
start_meas(&ru->ofdm_demod_wait_stats);
wait_on_busy_condition(&proc->mutex_fep,&proc->cond_fep,&proc->instance_cnt_fep,"fep thread");
stop_meas(&ru->ofdm_demod_wait_stats);
if(opp_enabled == 1 && ru->ofdm_demod_wakeup_stats.diff_now>30*3000){
print_meas_now(&ru->ofdm_demod_wakeup_stats,"fep wakeup",stderr);
printf("delay in fep wait on codition in frame_rx: %d subframe_rx: %d \n",proc->frame_rx,proc->subframe_rx);
}
stop_meas(&ru->ofdm_demod_stats);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_RU_FEPRX, 0 );
......
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