Commit d78d39e6 authored by Florian Kaltenberger's avatar Florian Kaltenberger

code cleanup for abstraction


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5112 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 6969100a
......@@ -185,7 +185,7 @@ int main(int argc, char **argv) {
int s,Kr,Kr_bytes;
double sigma2, sigma2_dB=10,SNR,snr0=-2.0,snr1,rate,saving_bler=1;
double sigma2, sigma2_dB=10,SNR,snr0=-2.0,snr1,rate;
double snr_step=1,input_snr_step=1, snr_int=30;
LTE_DL_FRAME_PARMS *frame_parms;
......@@ -1213,7 +1213,6 @@ int main(int argc, char **argv) {
for (ch_realization=0;ch_realization<n_ch_rlz;ch_realization++){
if(abstx){
printf("**********************Channel Realization Index = %d **************************\n", ch_realization);
saving_bler=1;
}
for (SNR=snr0;SNR<snr1;SNR+=snr_step) {
......@@ -1664,7 +1663,6 @@ int main(int argc, char **argv) {
if(abstx){
if(saving_bler==0)
if (trials==0 && round==0) {
// calculate freq domain representation to compute SINR
freq_channel(eNB2UE[0], NB_RB,2*NB_RB + 1);
......@@ -1720,8 +1718,6 @@ int main(int argc, char **argv) {
}
}
//AWGN
// This is the SNR on the PDSCH for OFDM symbols without pilots -> rho_A
sigma2_dB = 10*log10((double)tx_lev) +10*log10((double)PHY_vars_eNB->lte_frame_parms.ofdm_symbol_size/(double)(NB_RB*12)) - SNR - get_pa_dB(PHY_vars_eNB->pdsch_config_dedicated);
......@@ -2131,7 +2127,6 @@ int main(int argc, char **argv) {
//saving PMI in case of Transmission Mode > 5
if(abstx){
if(saving_bler==0)
if (trials==0 && round==0 && transmission_mode>=5){
for (iii=0; iii<NB_RB; iii++){
//fprintf(csv_fd, "%d, %d", (PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->pmi_ext[iii]),(PHY_vars_UE->lte_ue_pdsch_vars[eNB_id_i]->pmi_ext[iii]));
......@@ -2395,22 +2390,11 @@ int main(int argc, char **argv) {
blerr[3] = (double)errs[3]/(round_trials[3]);
fprintf(csv_fd,"%e,%e,%e,%e;\n",blerr[0],blerr[1],blerr[2],blerr[3]);
}
else
{
if(saving_bler==0)
else {
fprintf(csv_fd,"%e;\n",blerr[0]);
}
} //ABStraction
if(num_rounds==1){
bler= (double)errs[0]/(round_trials[0]);
if (bler<1)
{snr_step = input_snr_step; saving_bler = 0;}
else
{snr_step = 1; saving_bler = 1;}
}
if (((double)errs[0]/(round_trials[0]))<1e-2)
break;
}// SNR
......
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