From 6373645c358b597fa58319dae710a64169e452bb Mon Sep 17 00:00:00 2001 From: villa Date: Mon, 2 Sep 2013 12:46:55 +0000 Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4132 818b1a75-f10b-46b9-bf7c-635c3b92a50f --- openair1/SIMULATION/LTE_FEMTO/femtoUtils.c | 2 +- openair1/SIMULATION/LTE_FEMTO/femtosim.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/openair1/SIMULATION/LTE_FEMTO/femtoUtils.c b/openair1/SIMULATION/LTE_FEMTO/femtoUtils.c index 4d61e9d720..e3a2e5c108 100644 --- a/openair1/SIMULATION/LTE_FEMTO/femtoUtils.c +++ b/openair1/SIMULATION/LTE_FEMTO/femtoUtils.c @@ -510,7 +510,7 @@ void _makeOutputDir(options_t *opts) sprintf(auxFile,"OutputBlerRound_%d.m",opts->testNumber); opts->outputBler =fopen(auxFile,"w"); - fprintf( opts->outputBler,"SNR; rate1; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err\n"); + fprintf( opts->outputBler,"SNR; rate1; MCS; TBS; rate; err0; trials0; err1; trials1; err2; trials2; err3; trials3; dci_err; nprb1; nprb2\n"); sprintf(auxFile,"OutputBER_%d.m",opts->testNumber); opts->outputBer =fopen(auxFile,"w"); diff --git a/openair1/SIMULATION/LTE_FEMTO/femtosim.c b/openair1/SIMULATION/LTE_FEMTO/femtosim.c index 506117e96d..a809a48573 100644 --- a/openair1/SIMULATION/LTE_FEMTO/femtosim.c +++ b/openair1/SIMULATION/LTE_FEMTO/femtosim.c @@ -220,7 +220,7 @@ void _initDefaults(options_t *opts) { opts->snr_init =0; opts->snr_max=20; - opts->snr_step=1; + opts->snr_step=0.1; opts->nframes=1; opts->nsymb=14; @@ -1072,7 +1072,7 @@ void _makeSimulation(data_t data,options_t opts,DCI_ALLOC_t *dci_alloc,DCI_ALLOC //Index and counters int aa; //Antennas index - int i,j,prb2,ind,mcsi[1]={3}; //General index for arrays + int i,j,prb2,ind,mcsi[2]={3,4}; //General index for arrays u32 round; double SNR; u32 dci_errors=0; @@ -1137,17 +1137,17 @@ void _makeSimulation(data_t data,options_t opts,DCI_ALLOC_t *dci_alloc,DCI_ALLOC _initErrsRoundsTrials(&errs,&round_trials,1, opts); - for (ind=1; ind<2; ind++) + for (ind=1; ind<3; ind++) { opts.mcs=mcsi[ind-1]; _get_nprb1(&opts); - + opts.nprb2=PHY_vars_eNB->lte_frame_parms.N_RB_DL; for (SNR=opts.snr_init; SNR<=opts.snr_max; SNR+=opts.snr_step) { - opts.nprb2=PHY_vars_eNB->lte_frame_parms.N_RB_DL; + //opts.nprb2=PHY_vars_eNB->lte_frame_parms.N_RB_DL; - printf("snr_init %f, snr_max %f, nprb1: %d, nprb2: %d, mcs: %d\n",opts.snr_init,opts.snr_max,opts.nprb1,opts.nprb2,opts.mcs); - for(prb2=1; prb2<=PHY_vars_eNB->lte_frame_parms.N_RB_DL; prb2++){ + printf("\n\nsnr: %f, nprb1: %d, nprb2: %d, mcs: %d\n",SNR,opts.nprb1,opts.nprb2,opts.mcs); + for(prb2=1; prb2lte_frame_parms.N_RB_DL; prb2++){ _initErrsRoundsTrials(&errs,&round_trials,0,opts); dci_errors=0; @@ -1941,7 +1941,7 @@ void _makeSimulation(data_t data,options_t opts,DCI_ALLOC_t *dci_alloc,DCI_ALLOC } //cont_frames - printf("nprb1: %d, nprb2: %d, mcs: %d, mcs2: %d\n",opts.nprb1,opts.nprb2,opts.mcs, opts.mcs2); + //printf("nprb1: %d, nprb2: %d, mcs: %d, mcs2: %d\n",opts.nprb1,opts.nprb2,opts.mcs, opts.mcs2); printf("\n---------------------------------------------------------------------\n"); printf("SNR = %f dB (tx_lev %f, sigma2_dB %f) BER (%f/%d=%f) BLER(%d/%d=%f)\n\t T (%d/%d = %f ) \n", SNR,(double)tx_lev_dB+10*log10(numOFDMSymbSubcarrier),