Commit 0efc3043 authored by Navid Nikaein's avatar Navid Nikaein

updating ulsim/dlsim testing scripts

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6286 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 7b7bfdaf
...@@ -366,7 +366,7 @@ int main(int argc, char **argv) { ...@@ -366,7 +366,7 @@ int main(int argc, char **argv) {
snr0 = 0; snr0 = 0;
num_layers = 1; num_layers = 1;
while ((c = getopt (argc, argv, "ahdpXDe: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, "ahdpZDe: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) switch (c)
{ {
case 'a': case 'a':
...@@ -561,7 +561,7 @@ int main(int argc, char **argv) { ...@@ -561,7 +561,7 @@ int main(int argc, char **argv) {
test_perf=atoi(optarg); test_perf=atoi(optarg);
//print_perf =1; //print_perf =1;
break; break;
case 'X': case 'Z':
dump_table=1; dump_table=1;
break; break;
case 'h': case 'h':
...@@ -3555,9 +3555,9 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3555,9 +3555,9 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
} //ABStraction } //ABStraction
if ( (test_perf != 0) && (100 * effective_rate > test_perf )) { if ( (test_perf != 0) && (100 * effective_rate > test_perf )) {
fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err\n"); //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err\n");
if ((transmission_mode != 3) && (transmission_mode != 4)) { if ((transmission_mode != 3) && (transmission_mode != 4)) {
fprintf(time_meas_fd,"%f;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d;%d\n", fprintf(time_meas_fd,"%f;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d;%d;",
SNR, SNR,
mcs1, mcs1,
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS, PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS,
...@@ -3572,8 +3572,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3572,8 +3572,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
round_trials[3], round_trials[3],
dci_errors); dci_errors);
fprintf(time_meas_fd,"SNR; MCS; TBS; rate; DL_DECOD_ITER; err0; trials0; err1; trials1; err2; trials2; err3; trials3; PE; dci_err;PE;ND;\n"); //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; DL_DECOD_ITER; err0; trials0; err1; trials1; err2; trials2; err3; trials3; PE; dci_err;PE;ND;\n");
fprintf(time_meas_fd,"%f;%d;%d;%f(%2.1f%%,%f);%f;%d;%d;%d;%d;%d;%d;%d;%d;(%e,%e,%e,%e);%d/%d;%e;%f(%f);\n", fprintf(time_meas_fd,"%f;%d;%d;%f; %2.1f%;%f;%f;%d;%d;%d;%d;%d;%d;%d;%d;%e;%e;%e;%e;%d;%d;%e;%f;%f;",
SNR, SNR,
mcs1, mcs1,
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS, PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS,
...@@ -3600,7 +3600,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3600,7 +3600,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
} }
else { else {
fprintf(time_meas_fd,"%f;%d;%d;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d;%d\n", fprintf(time_meas_fd,"%f;%d;%d;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d;%d;",
SNR, SNR,
mcs1,mcs2, mcs1,mcs2,
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS, PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS,
...@@ -3616,8 +3616,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3616,8 +3616,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
round_trials[3], round_trials[3],
dci_errors); dci_errors);
fprintf(time_meas_fd,"SNR; MCS; TBS; rate; DL_DECOD_ITER; err0; trials0; err1; trials1; err2; trials2; err3; trials3; PE; dci_err;PE;ND;\n"); //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; DL_DECOD_ITER; err0; trials0; err1; trials1; err2; trials2; err3; trials3; PE; dci_err;PE;ND;\n");
fprintf(time_meas_fd,"%f;%d;%d;%d;%d;%f(%2.1f%%,%f);%f;%d;%d;%d;%d;%d;%d;%d;%d;(%e,%e,%e,%e);%d/%d;%e;%f(%f);\n", fprintf(time_meas_fd,"%f;%d;%d;%d;%d;%f;%2.1f;%f;%f;%d;%d;%d;%d;%d;%d;%d;%d;%e;%e;%e;%e;%d;%d;%e;%f;%f;",
SNR, SNR,
mcs1,mcs2, mcs1,mcs2,
PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS, PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS,
...@@ -3644,7 +3644,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3644,7 +3644,8 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/(double)PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS, (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/(double)PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->TBS,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
} }
fprintf(time_meas_fd,"eNB_PROC_TX(%d); OFDM_MOD(%d); DL_MOD(%d); DL_SCR(%d); DL_ENC(%d); UE_PROC_RX(%d); OFDM_DEMOD_CH_EST(%d); RX_PDCCH(%d); CH_COMP_LLR(%d); DL_USCR(%d); DL_DECOD(%d);\n", //fprintf(time_meas_fd,"eNB_PROC_TX(%d); OFDM_MOD(%d); DL_MOD(%d); DL_SCR(%d); DL_ENC(%d); UE_PROC_RX(%d); OFDM_DEMOD_CH_EST(%d); RX_PDCCH(%d); CH_COMP_LLR(%d); DL_USCR(%d); DL_DECOD(%d);\n",
fprintf(time_meas_fd,"%d; %d; %d; %d; %d; %d; %d; %d; %d; %d; %d;",
PHY_vars_eNB->phy_proc_tx.trials, PHY_vars_eNB->phy_proc_tx.trials,
PHY_vars_eNB->ofdm_mod_stats.trials, PHY_vars_eNB->ofdm_mod_stats.trials,
PHY_vars_eNB->dlsch_modulation_stats.trials, PHY_vars_eNB->dlsch_modulation_stats.trials,
...@@ -3657,7 +3658,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3657,7 +3658,7 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols,
PHY_vars_UE->dlsch_unscrambling_stats.trials, PHY_vars_UE->dlsch_unscrambling_stats.trials,
PHY_vars_UE->dlsch_decoding_stats.trials PHY_vars_UE->dlsch_decoding_stats.trials
); );
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;\n", fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;%f;",
get_time_meas_us(&PHY_vars_eNB->phy_proc_tx), 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->ofdm_mod_stats),
get_time_meas_us(&PHY_vars_eNB->dlsch_modulation_stats), get_time_meas_us(&PHY_vars_eNB->dlsch_modulation_stats),
...@@ -3670,29 +3671,29 @@ PHY_vars_UE->lte_ue_pdcch_vars[0]->num_pdcch_symbols, ...@@ -3670,29 +3671,29 @@ 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_unscrambling_stats),
get_time_meas_us(&PHY_vars_UE->dlsch_decoding_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_MIN;eNB_PROC_TX_MED;eNB_PROC_TX_Q1;eNB_PROC_TX_Q3;eNB_PROC_TX_DROPPED;\n"); //fprintf(time_meas_fd,"eNB_PROC_TX_STD;eNB_PROC_TX_MAX;eNB_PROC_TX_MIN;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,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
fprintf(time_meas_fd,"IFFT;\n"); //fprintf(time_meas_fd,"IFFT;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
fprintf(time_meas_fd,"MOD;\n"); //fprintf(time_meas_fd,"MOD;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
fprintf(time_meas_fd,"ENC;\n"); //fprintf(time_meas_fd,"ENC;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
fprintf(time_meas_fd,"UE_PROC_RX_STD;UE_PROC_RX_MAX;UE_PROC_RX_MIN;UE_PROC_RX_MED;UE_PROC_RX_Q1;UE_PROC_RX_Q3;UE_PROC_RX_DROPPED;\n"); //fprintf(time_meas_fd,"UE_PROC_RX_STD;UE_PROC_RX_MAX;UE_PROC_RX_MIN;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,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
fprintf(time_meas_fd,"FFT;\n"); //fprintf(time_meas_fd,"FFT;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
fprintf(time_meas_fd,"DEMOD;\n"); //fprintf(time_meas_fd,"DEMOD;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3);
fprintf(time_meas_fd,"DEC;\n"); //fprintf(time_meas_fd,"DEC;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3); fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
......
...@@ -258,8 +258,8 @@ int main(int argc, char **argv) { ...@@ -258,8 +258,8 @@ int main(int argc, char **argv) {
int s,Kr,Kr_bytes; int s,Kr,Kr_bytes;
int dump_perf=0; int dump_perf=0;
int test_perf=0; int test_perf=0;
int dump_table=0; int dump_table =0;
double effective_rate=0.0; double effective_rate=0.0;
char channel_model_input[10]; char channel_model_input[10];
...@@ -277,7 +277,7 @@ int main(int argc, char **argv) { ...@@ -277,7 +277,7 @@ int main(int argc, char **argv) {
logInit(); logInit();
while ((c = getopt (argc, argv, "hapbXm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) { while ((c = getopt (argc, argv, "hapZbm:n:Y:X:x:s:w:e:q:d:D:O:c:r:i:f:y:c:oA:C:R:g:N:l:S:T:QB:PI:L")) != -1) {
switch (c) { switch (c) {
case 'a': case 'a':
channel_model = AWGN; channel_model = AWGN;
...@@ -471,6 +471,9 @@ int main(int argc, char **argv) { ...@@ -471,6 +471,9 @@ int main(int argc, char **argv) {
case 'I': case 'I':
max_turbo_iterations=atoi(optarg); max_turbo_iterations=atoi(optarg);
break; break;
case 'Z':
dump_table = 1;
break;
case 'h': case 'h':
default: default:
printf("%s -h(elp) -a(wgn on) -m mcs -n n_frames -s snr0 -t delay_spread -p (extended prefix on) -r nb_rb -f first_rb -c cyclic_shift -o (srs on) -g channel_model [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M'), -d Channel delay, -D maximum Doppler shift \n",argv[0]); printf("%s -h(elp) -a(wgn on) -m mcs -n n_frames -s snr0 -t delay_spread -p (extended prefix on) -r nb_rb -f first_rb -c cyclic_shift -o (srs on) -g channel_model [A:M] Use 3GPP 25.814 SCM-A/B/C/D('A','B','C','D') or 36-101 EPA('E'), EVA ('F'),ETU('G') models (ignores delay spread and Ricean factor), Rayghleigh8 ('H'), Rayleigh1('I'), Rayleigh1_corr('J'), Rayleigh1_anticorr ('K'), Rice8('L'), Rice1('M'), -d Channel delay, -D maximum Doppler shift \n",argv[0]);
...@@ -1574,8 +1577,8 @@ int main(int argc, char **argv) { ...@@ -1574,8 +1577,8 @@ int main(int argc, char **argv) {
} //ABStraction } //ABStraction
if ( (test_perf != 0) && (100 * effective_rate > test_perf )) { if ( (test_perf != 0) && (100 * effective_rate > test_perf )) {
fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3\n"); //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3\n");
fprintf(time_meas_fd,"%f;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d\n", fprintf(time_meas_fd,"%f;%d;%d;%f;%d;%d;%d;%d;%d;%d;%d;%d;",
SNR, SNR,
mcs, mcs,
PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS, PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS,
...@@ -1589,8 +1592,8 @@ int main(int argc, char **argv) { ...@@ -1589,8 +1592,8 @@ int main(int argc, char **argv) {
errs[3], errs[3],
round_trials[3]); round_trials[3]);
fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3;ND;\n"); //fprintf(time_meas_fd,"SNR; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3;ND;\n");
fprintf(time_meas_fd,"%f;%d;%d;%f(%2.1f%%,%f);%d;%d;%d;%d;%d;%d;%d;%d;(%e,%e,%e,%e);%f(%f);\n", fprintf(time_meas_fd,"%f;%d;%d;%f;%2.1f;%f;%d;%d;%d;%d;%d;%d;%d;%d;%e;%e;%e;%e;%f;%f;",
SNR, SNR,
mcs, mcs,
PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS, PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS,
...@@ -1612,7 +1615,8 @@ int main(int argc, char **argv) { ...@@ -1612,7 +1615,8 @@ int main(int argc, char **argv) {
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/(double)PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS, (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])/(double)PHY_vars_eNB->ulsch_eNB[0]->harq_processes[harq_pid]->TBS,
(1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0])); (1.0*(round_trials[0]-errs[0])+2.0*(round_trials[1]-errs[1])+3.0*(round_trials[2]-errs[2])+4.0*(round_trials[3]-errs[3]))/((double)round_trials[0]));
fprintf(time_meas_fd,"UE_PROC_TX(%d); OFDM_MOD(%d); UL_MOD(%d); UL_ENC(%d); eNB_PROC_RX(%d); OFDM_DEMOD(%d); UL_DEMOD(%d); UL_DECOD(%d);\n", //fprintf(time_meas_fd,"UE_PROC_TX(%d); OFDM_MOD(%d); UL_MOD(%d); UL_ENC(%d); eNB_PROC_RX(%d); OFDM_DEMOD(%d); UL_DEMOD(%d); UL_DECOD(%d);\n",
fprintf(time_meas_fd,"%d; %d; %d; %d; %d; %d; %d; %d;",
PHY_vars_UE->phy_proc_tx.trials, PHY_vars_UE->phy_proc_tx.trials,
PHY_vars_UE->ofdm_mod_stats.trials, PHY_vars_UE->ofdm_mod_stats.trials,
PHY_vars_UE->ulsch_modulation_stats.trials, PHY_vars_UE->ulsch_modulation_stats.trials,
...@@ -1622,7 +1626,7 @@ int main(int argc, char **argv) { ...@@ -1622,7 +1626,7 @@ int main(int argc, char **argv) {
PHY_vars_eNB->ulsch_demodulation_stats.trials, PHY_vars_eNB->ulsch_demodulation_stats.trials,
PHY_vars_eNB->ulsch_decoding_stats.trials PHY_vars_eNB->ulsch_decoding_stats.trials
); );
fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;\n", fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%f;%f;",
get_time_meas_us(&PHY_vars_UE->phy_proc_tx), 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->ofdm_mod_stats),
get_time_meas_us(&PHY_vars_UE->ulsch_modulation_stats), get_time_meas_us(&PHY_vars_UE->ulsch_modulation_stats),
...@@ -1633,28 +1637,28 @@ int main(int argc, char **argv) { ...@@ -1633,28 +1637,28 @@ int main(int argc, char **argv) {
get_time_meas_us(&PHY_vars_eNB->ulsch_decoding_stats) 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_MIN;UE_PROC_TX_MED;UE_PROC_TX_Q1;UE_PROC_TX_Q3;UE_PROC_TX_DROPPED;\n"); //fprintf(time_meas_fd,"UE_PROC_TX_STD;UE_PROC_TX_MAX;UE_PROC_TX_MIN;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,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_tx, t_tx_max, t_tx_min, tx_median, tx_q1, tx_q3, n_tx_dropped);
fprintf(time_meas_fd,"IFFT;\n"); //fprintf(time_meas_fd,"IFFT;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_ifft, tx_ifft_median, tx_ifft_q1, tx_ifft_q3);
fprintf(time_meas_fd,"MOD;\n"); //fprintf(time_meas_fd,"MOD;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_mod, tx_mod_median, tx_mod_q1, tx_mod_q3);
fprintf(time_meas_fd,"ENC;\n"); //fprintf(time_meas_fd,"ENC;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_tx_enc, tx_enc_median, tx_enc_q1, tx_enc_q3);
fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;eNB_PROC_RX_MED;eNB_PROC_RX_Q1;eNB_PROC_RX_Q3;eNB_PROC_RX_DROPPED;\n"); //fprintf(time_meas_fd,"eNB_PROC_RX_STD;eNB_PROC_RX_MAX;eNB_PROC_RX_MIN;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); fprintf(time_meas_fd,"%f;%f;%f;%f;%f;%f;%d;", std_phy_proc_rx, t_rx_max, t_rx_min, rx_median, rx_q1, rx_q3, n_rx_dropped);
fprintf(time_meas_fd,"FFT;\n"); //fprintf(time_meas_fd,"FFT;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_fft, rx_fft_median, rx_fft_q1, rx_fft_q3);
fprintf(time_meas_fd,"DEMOD;\n"); //fprintf(time_meas_fd,"DEMOD;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3); fprintf(time_meas_fd,"%f;%f;%f;%f;", std_phy_proc_rx_demod,rx_demod_median, rx_demod_q1, rx_demod_q3);
fprintf(time_meas_fd,"DEC;\n"); //fprintf(time_meas_fd,"DEC;\n");
fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3); fprintf(time_meas_fd,"%f;%f;%f;%f\n", std_phy_proc_rx_dec, rx_dec_median, rx_dec_q1, rx_dec_q3);
......
...@@ -50,14 +50,17 @@ NUM_TRIALS=3 ...@@ -50,14 +50,17 @@ NUM_TRIALS=3
PRB=[25,50,100] PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27] MCS=[0,4,9,10,13,16,17,22,27]
SNR=[0,0,0,0,0,0,0,0,0] #PRB=[100]
#MCS=[27]
#SNR=[0,0,0,0,0,0,0,0,0]
ANT_TX=2 # 2 ANT_TX=2 # 2
ANT_RX=2 # 2 ANT_RX=2 # 2
PDCCH=2 #, 2, 3, 4 PDCCH=2 #, 2, 3, 4
CHANNEL=["N","I"] # A,B,C,D,E,F, H(Rayleigh8), L(Rice8) CHANNEL=["N"]
#CHANNEL=["C","E","F","G","H","I","L","M"]
TX_MODE=2 # 2, TX_MODE=2 # 2,
MIN_SNR=2 MIN_SNR=0
MAX_SNR=34 MAX_SNR=40
PERF=75 PERF=75
OPT="-L" OPT="-L"
FRAME=2000 FRAME=2000
...@@ -65,7 +68,6 @@ FRAME=2000 ...@@ -65,7 +68,6 @@ FRAME=2000
#OPT="-L -d" # 8bit decoder , activate dci decoding at UE #OPT="-L -d" # 8bit decoder , activate dci decoding at UE
def execute(oai, user, pw, host, logfile,logdir,debug,cpu): def execute(oai, user, pw, host, logfile,logdir,debug,cpu):
case = '10' case = '10'
...@@ -110,7 +112,11 @@ def execute(oai, user, pw, host, logfile,logdir,debug,cpu): ...@@ -110,7 +112,11 @@ def execute(oai, user, pw, host, logfile,logdir,debug,cpu):
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) +' '+ OPT conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(k) + ' -z'+str(m) +' -c'+str(n) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -f.1 -P -n'+str(FRAME)+' -O'+str(PERF) +' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_anttx' + str(k)+ '_antrx' + str(m) + '_pdcch' + str(n) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log' trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_anttx' + str(k)+ '_antrx' + str(m) + '_pdcch' + str(n) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace tee = ' 2>&1 | tee ' + trace
cmd = 'taskset -c '+ str(cpu) + ' ./dlsim.rel8.'+ host + ' ' + conf + tee if cpu > -1 :
cmd = 'taskset -c '+ str(cpu) + ' ./dlsim.rel8.'+ host + ' ' + conf + tee
else :
cmd = './dlsim.rel8.'+ host + ' ' + conf + tee
if debug : if debug :
print cmd print cmd
......
...@@ -50,12 +50,15 @@ NUM_TRIALS=3 ...@@ -50,12 +50,15 @@ NUM_TRIALS=3
PRB=[25,50,100] PRB=[25,50,100]
MCS=[0,4,9,10,13,16,17,22,27] MCS=[0,4,9,10,13,16,17,22,27]
#PRB=[100]
#MCS=[16]
ANT_TX=1 # 2 ANT_TX=1 # 2
ANT_RX=2 # 2 ANT_RX=2 # 2
CHANNEL=["N","I"] # A,B,C,D,E,F, CHANNEL=["N"]
#CHANNEL=["C","E","F","G","H","I","L","M"] # A,B,C,D,E,F,
TX_MODE=2 # 2, TX_MODE=2 # 2,
MIN_SNR=2 MIN_SNR=0
MAX_SNR=34 MAX_SNR=40
PERF=75 PERF=75
OPT="-L" OPT="-L"
FRAME=2000 FRAME=2000
...@@ -105,7 +108,10 @@ def execute(oai, user, pw, host,logfile,logdir,debug,cpu): ...@@ -105,7 +108,10 @@ def execute(oai, user, pw, host,logfile,logdir,debug,cpu):
conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT conf = '-B' + str(PRB[i]) + ' -m'+str(MCS[j]) + ' -y'+str(m) + ' -g'+str(CHANNEL[o]) + ' -x'+str(p) + ' -s'+str(q) + ' -w1.0 -e.1 -P -n'+str(FRAME)+' -O'+str(PERF)+' '+ OPT
trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log' trace = logdir + '/time_meas' + '_prb'+str(PRB[i])+'_mcs'+ str(MCS[j])+ '_antrx' + str(m) + '_channel' +str(CHANNEL[o]) + '_tx' +str(p) + '_snr' +str(q)+'.'+case+str(test)+ '.log'
tee = ' 2>&1 | tee ' + trace tee = ' 2>&1 | tee ' + trace
cmd = 'taskset -c ' + str(cpu) + ' ./ulsim.rel8.'+ host + ' ' + conf + tee if cpu > -1 :
cmd = 'taskset -c ' + str(cpu) + ' ./ulsim.rel8.'+ host + ' ' + conf + tee
else :
cmd = './ulsim.rel8.'+ host + ' ' + conf + tee
if debug : if debug :
print cmd print cmd
......
...@@ -57,7 +57,7 @@ pw ='' ...@@ -57,7 +57,7 @@ pw =''
i = 0 i = 0
clean = 0 clean = 0
start_case = 0 start_case = 0
cpu = 0 cpu = -1
for arg in sys.argv: for arg in sys.argv:
if arg == '-d': if arg == '-d':
...@@ -109,7 +109,10 @@ oai = openair('localdomain','localhost') ...@@ -109,7 +109,10 @@ oai = openair('localdomain','localhost')
try: try:
user = getpass.getuser() user = getpass.getuser()
print '\n******* Note that the user <'+user+'> should be a sudoer *******\n' print '\n******* Note that the user <'+user+'> should be a sudoer *******\n'
print '******* Connecting to the localhost <'+host+'> to perform the test on CPU '+str(cpu)+' *******\n' if cpu > -1 :
print '******* Connecting to the localhost <'+host+'> to perform the test on CPU '+str(cpu)+' *******\n'
else :
print '******* Connecting to the localhost <'+host+'> to perform the test *******\n'
if not pw : if not pw :
print "username: " + user print "username: " + user
...@@ -146,9 +149,9 @@ if clean == 1 : ...@@ -146,9 +149,9 @@ if clean == 1 :
# start te test cases # start te test cases
#compile #compile
rv=case11.execute(oai, user, pw, host,logfile,logdir,debug) rv=1 #case11.execute(oai, user, pw, host,logfile,logdir,debug)
if rv == 1 : if rv == 1 :
case12.execute(oai, user, pw, host,logfile,logdir,debug,cpu) # case12.execute(oai, user, pw, host,logfile,logdir,debug,cpu)
case13.execute(oai, user, pw, host,logfile,logdir,debug,cpu) case13.execute(oai, user, pw, host,logfile,logdir,debug,cpu)
else : else :
print 'Compilation error: skip case 12 and 13' print 'Compilation error: skip case 12 and 13'
......
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