Commit 6234b0f2 authored by Navid Nikaein's avatar Navid Nikaein

update dlsim/ulsim stats and the python test02 script

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6233 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 5e4d7475
......@@ -360,7 +360,7 @@ int main(int argc, char **argv) {
snr0 = 0;
num_layers = 1;
while ((c = getopt (argc, argv, "hadpDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:")) != -1) {
while ((c = getopt (argc, argv, "ahdpDe:m:n:o:s:f:t:c:g:r:F:x:y:z:AM:N:I:i:O:R:S:C:T:b:u:v:w:B:PLl:")) != -1) {
switch (c)
{
case 'a':
......@@ -3259,6 +3259,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
double rx_median = table_rx[time_vector_rx.size/2];
double rx_q1 = table_rx[time_vector_rx.size/4];
double rx_q3 = table_rx[3*time_vector_rx.size/4];
double std_phy_proc_tx=0;
double std_phy_proc_rx=0;
effective_rate = ((double)(round_trials[0]-dci_errors)/((double)round_trials[0] + round_trials[1] + round_trials[2] + round_trials[3]));
......@@ -3292,7 +3294,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
if (print_perf==1) {
printf("eNB TX function statistics (per 1ms subframe)\n\n");
double std_phy_proc_tx = sqrt((double)PHY_vars_eNB->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_eNB->phy_proc_tx.trials - pow((double)PHY_vars_eNB->phy_proc_tx.diff/PHY_vars_eNB->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
std_phy_proc_tx = sqrt((double)PHY_vars_eNB->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_eNB->phy_proc_tx.trials - pow((double)PHY_vars_eNB->phy_proc_tx.diff/PHY_vars_eNB->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
printf("Total PHY proc tx :%f us (%d trials)\n",(double)PHY_vars_eNB->phy_proc_tx.diff/PHY_vars_eNB->phy_proc_tx.trials/cpu_freq_GHz/1000.0,PHY_vars_eNB->phy_proc_tx.trials);
printf("|__ Statistcs %f std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n",std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
printf("OFDM_mod time :%f us (%d trials)\n",(double)PHY_vars_eNB->ofdm_mod_stats.diff/PHY_vars_eNB->ofdm_mod_stats.trials/cpu_freq_GHz/1000.0,PHY_vars_eNB->ofdm_mod_stats.trials);
......@@ -3304,7 +3306,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
printf("|__ DLSCH sub-block interleaving time :%f us (%d trials)\n",((double)PHY_vars_eNB->dlsch_interleaving_stats.trials/PHY_vars_eNB->dlsch_encoding_stats.trials)*(double)PHY_vars_eNB->dlsch_interleaving_stats.diff/PHY_vars_eNB->dlsch_interleaving_stats.trials/cpu_freq_GHz/1000.0,PHY_vars_eNB->dlsch_interleaving_stats.trials);
printf("\n\nUE RX function statistics (per 1ms subframe)\n\n");
double std_phy_proc_rx = sqrt((double)PHY_vars_UE->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_UE->phy_proc_rx.trials - pow((double)PHY_vars_UE->phy_proc_rx.diff/PHY_vars_UE->phy_proc_rx.trials/cpu_freq_GHz/1000,2));
std_phy_proc_rx = sqrt((double)PHY_vars_UE->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_UE->phy_proc_rx.trials - pow((double)PHY_vars_UE->phy_proc_rx.diff/PHY_vars_UE->phy_proc_rx.trials/cpu_freq_GHz/1000,2));
printf("Total PHY proc rx :%f us (%d trials)\n",(double)PHY_vars_UE->phy_proc_rx.diff/PHY_vars_UE->phy_proc_rx.trials/cpu_freq_GHz/1000.0,PHY_vars_UE->phy_proc_rx.trials*2/3);
printf("|__Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
printf("DLSCH OFDM demodulation and channel_estimation time :%f us (%d trials)\n",(nsymb)*(double)PHY_vars_UE->ofdm_demod_stats.diff/PHY_vars_UE->ofdm_demod_stats.trials/cpu_freq_GHz/1000.0,PHY_vars_UE->ofdm_demod_stats.trials*2/3);
......@@ -3501,7 +3503,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
PHY_vars_UE->dlsch_unscrambling_stats.trials,
PHY_vars_UE->dlsch_decoding_stats.trials
);
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;",
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;\n",
get_time_meas_us(&PHY_vars_eNB->phy_proc_tx),
get_time_meas_us(&PHY_vars_eNB->ofdm_mod_stats),
get_time_meas_us(&PHY_vars_eNB->dlsch_modulation_stats),
......@@ -3514,6 +3516,12 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
get_time_meas_us(&PHY_vars_UE->dlsch_unscrambling_stats),
get_time_meas_us(&PHY_vars_UE->dlsch_decoding_stats)
);
fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MAX;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;\n", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
fprintf(time_meas_fd,"UE_PROC_RX_STD;UE_PROC_RX_MAX;UE_PROC_RX_MAX;UE_PROC_RX_MED;UE_PROC_RX_Q1;UE_PROC_RX_Q3;UE_PROC_RX_DROPPED;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;\n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
/*
fprintf(time_meas_fd,"%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;%d;",
PHY_vars_eNB->phy_proc_tx.trials,
......
......@@ -1331,7 +1331,8 @@ int main(int argc, char **argv) {
double rx_median = table_rx[time_vector_rx.size/2];
double rx_q1 = table_rx[time_vector_rx.size/4];
double rx_q3 = table_rx[3*time_vector_rx.size/4];
double std_phy_proc_tx=0;
double std_phy_proc_rx=0;
printf("\n**********rb: %d ***mcs : %d *********SNR = %f dB (%f): TX %d dB (gain %f dB), N0W %f dB, I0 %d dB, delta_IF %d [ (%d,%d) dB / (%d,%d) dB ]**************************\n",
nb_rb,mcs,SNR,SNR2,
tx_lev_dB,
......@@ -1394,7 +1395,7 @@ int main(int argc, char **argv) {
if (dump_perf==1) {
printf("UE TX function statistics (per 1ms subframe)\n\n");
double std_phy_proc_tx = sqrt((double)PHY_vars_UE->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_UE->phy_proc_tx.trials - pow((double)PHY_vars_UE->phy_proc_tx.diff/PHY_vars_UE->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
std_phy_proc_tx = sqrt((double)PHY_vars_UE->phy_proc_tx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_UE->phy_proc_tx.trials - pow((double)PHY_vars_UE->phy_proc_tx.diff/PHY_vars_UE->phy_proc_tx.trials/cpu_freq_GHz/1000,2));
printf("Total PHY proc tx :%f us (%d trials)\n",(double)PHY_vars_UE->phy_proc_tx.diff/PHY_vars_UE->phy_proc_tx.trials/cpu_freq_GHz/1000.0,PHY_vars_UE->phy_proc_tx.trials);
printf("|__ Statistics std: %f us max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n",std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
printf("OFDM_mod time :%f us (%d trials)\n",(double)PHY_vars_UE->ofdm_mod_stats.diff/PHY_vars_UE->ofdm_mod_stats.trials/cpu_freq_GHz/1000.0,PHY_vars_UE->ofdm_mod_stats.trials);
......@@ -1407,7 +1408,7 @@ int main(int argc, char **argv) {
printf("|__ ULSCH multiplexing time :%f us (%d trials)\n",((double)PHY_vars_UE->ulsch_multiplexing_stats.trials/PHY_vars_UE->ulsch_encoding_stats.trials)*(double)PHY_vars_UE->ulsch_multiplexing_stats.diff/PHY_vars_UE->ulsch_multiplexing_stats.trials/cpu_freq_GHz/1000.0,PHY_vars_UE->ulsch_multiplexing_stats.trials);
printf("\n\neNB RX function statistics (per 1ms subframe)\n\n");
double std_phy_proc_rx = sqrt((double)PHY_vars_eNB->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_eNB->phy_proc_rx.trials - pow((double)PHY_vars_eNB->phy_proc_rx.diff/PHY_vars_eNB->phy_proc_rx.trials/cpu_freq_GHz/1000,2));
std_phy_proc_rx = sqrt((double)PHY_vars_eNB->phy_proc_rx.diff_square/pow(cpu_freq_GHz,2)/pow(1000,2)/PHY_vars_eNB->phy_proc_rx.trials - pow((double)PHY_vars_eNB->phy_proc_rx.diff/PHY_vars_eNB->phy_proc_rx.trials/cpu_freq_GHz/1000,2));
printf("Total PHY proc rx :%f us (%d trials)\n",(double)PHY_vars_eNB->phy_proc_rx.diff/PHY_vars_eNB->phy_proc_rx.trials/cpu_freq_GHz/1000.0,PHY_vars_eNB->phy_proc_rx.trials);
printf("|__ Statistcs std: %fus max: %fus min: %fus median %fus q1 %fus q3 %fus n_dropped: %d packet \n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
......@@ -1526,7 +1527,7 @@ int main(int argc, char **argv) {
PHY_vars_eNB->ulsch_demodulation_stats.trials,
PHY_vars_eNB->ulsch_decoding_stats.trials
);
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f",
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;\n",
get_time_meas_us(&PHY_vars_UE->phy_proc_tx),
get_time_meas_us(&PHY_vars_UE->ofdm_mod_stats),
get_time_meas_us(&PHY_vars_UE->ulsch_modulation_stats),
......@@ -1537,6 +1538,14 @@ int main(int argc, char **argv) {
get_time_meas_us(&PHY_vars_eNB->ulsch_decoding_stats)
);
fprintf(time_meas_fd,"UE_PROC_TX_STD;UE_PROC_TX_MAX;UE_PROC_TX_MAX;UE_PROC_TX_MED;UE_PROC_TX_Q1;UE_PROC_TX_Q3;UE_PROC_TX_DROPPED;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;\n", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MAX;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;\n", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
printf("[passed] effective rate : %f (%2.1f%%,%f)): log and break \n",rate*effective_rate, 100*effective_rate, rate );
break;
} else if (test_perf !=0 ){
......
......@@ -44,7 +44,7 @@ import os
import shutil # copy file
NUM_UE=2
NUM_UE=1
NUM_eNB=1
NUM_TRIALS=3
......@@ -53,13 +53,13 @@ MCS=[0,4,9,10,13,16,17,22,27]
ANT_TX=2 # 2
ANT_RX=2 # 2
PDCCH=2 #, 2, 3, 4
CHANNEL=["N"] # A,B,C,D,E,F,
CHANNEL=["N","I"] # A,B,C,D,E,F, H(Rayleigh8), L(Rice8)
TX_MODE=2 # 2,
MIN_SNR=2
MAX_SNR=34
PERF=75
OPT="-L"
FRAME=500
FRAME=1000
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE
......@@ -97,12 +97,12 @@ def execute(oai, user, pw, host, logfile,logdir,debug):
name = 'Run oai.dlsim.perf.'+str(PERF)+'%'
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
for o in range(len(CHANNEL)):
MIN_SNR = 0
for j in range(len(MCS)):
for k in range(1,ANT_TX):
for m in range (1,ANT_RX):
for n in range(1,PDCCH):
for o in range(len(CHANNEL)):
for p in range(1,TX_MODE):
for q in range(MIN_SNR,MAX_SNR):
#if if PRB[i] :
......
......@@ -44,7 +44,7 @@ import os
import shutil # copy file
NUM_UE=2
NUM_UE=1
NUM_eNB=1
NUM_TRIALS=3
......@@ -52,13 +52,13 @@ PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27]
ANT_TX=1 # 2
ANT_RX=2 # 2
CHANNEL=["N"] # A,B,C,D,E,F,
CHANNEL=["N","I"] # A,B,C,D,E,F,
TX_MODE=2 # 2,
MIN_SNR=2
MAX_SNR=34
PERF=75
OPT="-L"
FRAME=500
FRAME=1000
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE
......@@ -94,10 +94,10 @@ def execute(oai, user, pw, host,logfile,logdir,debug):
name = 'Run oai.ulsim.perf.'+str(PERF)+'%'
diag = 'no diagnostic is available, check the log file'
for i in range(len(PRB)):
for o in range(len(CHANNEL)):
MIN_SNR=0
for j in range(len(MCS)):
for m in range (1,ANT_RX):
for o in range(len(CHANNEL)):
for p in range(1,TX_MODE):
for q in range(MIN_SNR,MAX_SNR):
#if if PRB[i] :
......
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