From 6d13f28bc059793c7650f2e2cf18effb321cc179 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 16 Feb 2023 19:55:00 +0100 Subject: [PATCH] physical simulators compilation warnings --- common/utils/LOG/vcd_signal_dumper.c | 4 + openair1/PHY/CODING/TESTBENCH/polartest.c | 48 +++++----- .../lte_dl_channel_estimation.c | 2 +- openair1/SIMULATION/LTE_PHY/dlsim.c | 90 +++++++++---------- openair1/SIMULATION/LTE_PHY/ulsim.c | 72 +++++++-------- openair1/SIMULATION/NR_PHY/pucchsim.c | 2 +- 6 files changed, 111 insertions(+), 107 deletions(-) diff --git a/common/utils/LOG/vcd_signal_dumper.c b/common/utils/LOG/vcd_signal_dumper.c index 5bf9759933..841f2889b6 100644 --- a/common/utils/LOG/vcd_signal_dumper.c +++ b/common/utils/LOG/vcd_signal_dumper.c @@ -555,7 +555,9 @@ struct vcd_module_s vcd_modules[] = { }; FILE *vcd_fd = NULL; +#if defined(ENABLE_VCD_FIFO) static inline unsigned long long int vcd_get_time(void); +#endif #if defined(ENABLE_USE_CPU_EXECUTION_TIME) struct timespec g_time_start; @@ -809,6 +811,7 @@ static inline void vcd_signal_dumper_print_time_since_start(void) } } +#if defined(ENABLE_VCD_FIFO) static inline unsigned long long int vcd_get_time(void) { #if defined(ENABLE_USE_CPU_EXECUTION_TIME) @@ -821,6 +824,7 @@ static inline unsigned long long int vcd_get_time(void) #endif return 0; } +#endif void vcd_signal_dumper_create_header(void) { diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 18946dac90..9dd5e45958 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -33,7 +33,7 @@ int main(int argc, char *argv[]) uint8_t aggregation_level = 8, decoderListSize = 8, logFlag = 0; uint16_t rnti=0; - while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) + while ((arguments = getopt (argc, argv, "s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { switch (arguments) { case 's': SNRstart = atof(optarg); @@ -105,14 +105,14 @@ int main(int argc, char *argv[]) exit(-1); break; } - + } //Initiate timing. (Results depend on CPU Frequency. Therefore, might change due to performance variances during simulation.) - time_stats_t timeEncoder,timeDecoder; - opp_enabled=1; - reset_meas(&timeEncoder); - reset_meas(&timeDecoder); - randominit(0); - crcTableInit(); + time_stats_t timeEncoder,timeDecoder; + opp_enabled=1; + reset_meas(&timeEncoder); + reset_meas(&timeDecoder); + randominit(0); + crcTableInit(); if (polarMessageType == 0) { //PBCH aggregation_level = NR_POLAR_PBCH_AGGREGATION_LEVEL; @@ -132,31 +132,31 @@ int main(int argc, char *argv[]) /*folderName=getenv("HOME"); strcat(folderName,"/Desktop/polartestResults");*/ -if (logFlag){ - time (¤tTime); + if (logFlag){ + time (¤tTime); #ifdef DEBUG_POLAR_TIMING - sprintf(fileName,"%s/TIMING_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); + sprintf(fileName,"%s/TIMING_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); #else - sprintf(fileName,"%s/_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); + sprintf(fileName,"%s/_ListSize_%d_Payload_%d_Itr_%d", folderName, decoderListSize, testLength, iterations); #endif - strftime(currentTimeInfo, 25, "_%Y-%m-%d-%H-%M-%S.csv", localtime(¤tTime)); - strcat(fileName,currentTimeInfo); - //Create "~/Desktop/polartestResults" folder if it doesn't already exist. - /*struct stat folder = {0}; + strftime(currentTimeInfo, 25, "_%Y-%m-%d-%H-%M-%S.csv", localtime(¤tTime)); + strcat(fileName,currentTimeInfo); + //Create "~/Desktop/polartestResults" folder if it doesn't already exist. + /*struct stat folder = {0}; if (stat(folderName, &folder) == -1) mkdir(folderName, S_IRWXU | S_IRWXG | S_IRWXO);*/ - logFile = fopen(fileName, "w"); + logFile = fopen(fileName, "w"); - if (logFile==NULL) { - fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); - exit(-1); - } + if (logFile==NULL) { + fprintf(stderr,"[polartest.c] Problem creating file %s with fopen\n",fileName); + exit(-1); + } #ifdef DEBUG_POLAR_TIMING - fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); + fprintf(logFile,",timeEncoderCRCByte[us],timeEncoderCRCBit[us],timeEncoderInterleaver[us],timeEncoderBitInsertion[us],timeEncoder1[us],timeEncoder2[us],timeEncoderRateMatching[us],timeEncoderByte2Bit[us]\n"); #else - fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); + fprintf(logFile,",SNR,nBitError,blockErrorState,t_encoder[us],t_decoder[us]\n"); #endif -} + } const uint8_t testArrayLength = ceil(testLength / 32.0); const uint8_t coderArrayLength = ceil(coderLength / 32.0); diff --git a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c index fc77d4ae18..1e27e99166 100644 --- a/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c +++ b/openair1/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c @@ -555,7 +555,7 @@ int lte_dl_channel_estimation(PHY_VARS_UE *ue, 32767-ue->ch_est_alpha, dl_ch-(ue->frame_parms.ofdm_symbol_size<<1),0,ue->frame_parms.ofdm_symbol_size); } else { // high_speed_flag == 1 - if ((symbol == 0)) { + if (symbol == 0) { // printf("Interpolating %d->0\n",4-ue->frame_parms.Ncp); // dl_ch_prev = (int16_t *)&dl_ch_estimates[(p<<1)+aarx][(4-ue->frame_parms.Ncp)*(ue->frame_parms.ofdm_symbol_size)]; if(((Ns>>1)!=0) || ( ((Ns>>1)==0) && interpolateS11S12)) { diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 307b127e1a..e8a06f9e88 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -629,51 +629,51 @@ int main(int argc, char **argv) { // num_layers = 1; perfect_ce = 0; static paramdef_t options[] = { - { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, iptr:&awgn_flag, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 }, - { "bTDD", "Set the tdd configuration mode",0, iptr:&tdd_config, defintval:3, TYPE_INT, 0 }, - { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 }, - { "cPdcch", "Number of PDCCH symbols",0, iptr:&num_pdcch_symbols, defintval:1, TYPE_INT, 0 }, - { "CnidCell", "The cell id ",0, iptr:&Nid_cell, defintval:0, TYPE_INT, 0 }, - { "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, iptr:&dci_flag, defintval:0, TYPE_INT, 0 }, - { "Dtdd", "Enable tdd", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "eRounds", "Number of rounds",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 }, - { "f_snr_step", "step size of SNR, default value is 1.",0, dblptr:&input_snr_step, defdblval:1, TYPE_DOUBLE, 0 }, - { "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, dblptr:&forgetting_factor, defdblval:0.0, TYPE_DOUBLE, 0 }, - { "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Input_file_trch", " Input filename for TrCH data (binary)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, iptr:&two_thread_flag, defintval:0, TYPE_INT, 0 }, - { "lMuMimo", "offset_mumimo_llr_drange_fix",0, u8ptr:&offset_mumimo_llr_drange_fix, defintval:0, TYPE_UINT8, 0 }, - { "mcs1", "The MCS for TB 1", 0, iptr:&mcs1, defintval:0, TYPE_INT, 0 }, - { "Mcs2", "The MCS for TB 2", 0, iptr:&mcs2, defintval:0, TYPE_INT, 0 }, - { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 }, - { "tmcs_i", "MCS of interfering UE",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, - { "offsetRxSample", "Sample offset for receiver", 0, iptr:&rx_sample_offset, defintval:0, TYPE_INT, 0 }, - { "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", dblptr:&snr0, defdblval:-2.0, TYPE_DOUBLE, 0 }, - { "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, - { "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 }, - { "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 }, - { "RNumRound", "Number of HARQ rounds (fixed)",0, iptr:&num_rounds, defintval:4, TYPE_INT, 0 }, - { "Subframe", "subframe ",0, iptr:&subframe, defintval:7, TYPE_INT, 0 }, - { "Trnti", "rnti",0, u16ptr:&n_rnti, defuintval:0x1234, TYPE_UINT16, 0 }, - { "vi_mod", "i_mod",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Qparallel", "Enable parallel execution",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:&print_perf, defintval:0, TYPE_INT, 0 }, - { "q_tx_port", "Number of TX antennas ports used in eNB",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "yn_tx_phy","Number of TX antennas used in eNB",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, iptr:&perfect_ce, defintval:0, TYPE_INT, 0 }, - { "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 }, - { "Loglvl", "log level",0, iptr:&loglvl, defintval:OAILOG_INFO, TYPE_INT, 0 }, - { "zn_rx", "Number of RX antennas used in UE",0, iptr:NULL, defintval:2, TYPE_INT, 0 }, - { "gchannel", "[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')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 }, - { "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 }, - { "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, .iptr=&awgn_flag, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "Abstx", "Turns on calibration mode for abstraction.", PARAMFLAG_BOOL, .iptr=&abstx, .defintval=0, TYPE_INT, 0 }, + { "bTDD", "Set the tdd configuration mode",0, .iptr=&tdd_config, .defintval=3, TYPE_INT, 0 }, + { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, .iptr=&N_RB_DL, .defintval=25, TYPE_INT, 0 }, + { "cPdcch", "Number of PDCCH symbols",0, .iptr=&num_pdcch_symbols, .defintval=1, TYPE_INT, 0 }, + { "CnidCell", "The cell id ",0, .iptr=&Nid_cell, .defintval=0, TYPE_INT, 0 }, + { "dciFlag", "Transmit the DCI and compute its error statistics", PARAMFLAG_BOOL, .iptr=&dci_flag, .defintval=0, TYPE_INT, 0 }, + { "Dtdd", "Enable tdd", PARAMFLAG_BOOL, .strptr=NULL, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "eRounds", "Number of rounds",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, .iptr=&threequarter_fs, .defintval=0, TYPE_INT, 0 }, + { "f_snr_step", "step size of SNR, default value is 1.",0, .dblptr=&input_snr_step, .defdblval=1, TYPE_DOUBLE, 0 }, + { "Forgetting", "forgetting factor (0 new channel every trial, 1 channel constant)",0, .dblptr=&forgetting_factor, .defdblval=0.0, TYPE_DOUBLE, 0 }, + { "input_file", "input IQ data file",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Input_file_trch", " Input filename for TrCH data (binary)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "WtwoThreads", "two_thread_flag", PARAMFLAG_BOOL, .iptr=&two_thread_flag, .defintval=0, TYPE_INT, 0 }, + { "lMuMimo", "offset_mumimo_llr_drange_fix",0, .u8ptr=&offset_mumimo_llr_drange_fix, .defintval=0, TYPE_UINT8, 0 }, + { "mcs1", "The MCS for TB 1", 0, .iptr=&mcs1, .defintval=0, TYPE_INT, 0 }, + { "Mcs2", "The MCS for TB 2", 0, .iptr=&mcs2, .defintval=0, TYPE_INT, 0 }, + { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "tmcs_i", "MCS of interfering UE",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, + { "offsetRxSample", "Sample offset for receiver", 0, .iptr=&rx_sample_offset, .defintval=0, TYPE_INT, 0 }, + { "rballocset", "ressource block allocation (see section 7.1.6.3 in 36.213)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "snr", "Starting SNR, runs from SNR to SNR+%.1fdB in steps of %.1fdB. If n_frames is 1 then just SNR is simulated and MATLAB/OCTAVE output is generated", .dblptr=&snr0, .defdblval=-2.0, TYPE_DOUBLE, 0 }, + { "wsnrInterrupt", "snr int ?", 0, .dblptr=&snr_int, .defdblval=30, TYPE_DOUBLE, 0 }, + { "N_ch_rlzN0", "Determines the number of Channel Realizations in Abstraction mode. Default value is 1",0, .iptr=&n_ch_rlz, .defintval=1, TYPE_INT, 0 }, + { "prefix_extended","Enable extended prefix", PARAMFLAG_BOOL, .iptr=&extended_prefix_flag, .defintval=0, TYPE_INT, 0 }, + { "RNumRound", "Number of HARQ rounds (fixed)",0, .iptr=&num_rounds, .defintval=4, TYPE_INT, 0 }, + { "Subframe", "subframe ",0, .iptr=&subframe, .defintval=7, TYPE_INT, 0 }, + { "Trnti", "rnti",0, .u16ptr=&n_rnti, .defuintval=0x1234, TYPE_UINT16, 0 }, + { "vi_mod", "i_mod",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Qparallel", "Enable parallel execution",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, .iptr=&print_perf, .defintval=0, TYPE_INT, 0 }, + { "q_tx_port", "Number of TX antennas ports used in eNB",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "uEdual", "Enables the Interference Aware Receiver for TM5 (default is normal receiver)",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "xTransmission","Transmission mode (1,2,6,7 for the moment)",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "yn_tx_phy","Number of TX antennas used in eNB",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "Yperfect_ce","Perfect CE", PARAMFLAG_BOOL, .iptr=&perfect_ce, .defintval=0, TYPE_INT, 0 }, + { "Zdump", "dump table",PARAMFLAG_BOOL, .iptr=&dump_table, .defintval=0, TYPE_INT, 0 }, + { "Loglvl", "log level",0, .iptr=&loglvl, .defintval=OAILOG_INFO, TYPE_INT, 0 }, + { "zn_rx", "Number of RX antennas used in UE",0, .iptr=NULL, .defintval=2, TYPE_INT, 0 }, + { "gchannel", "[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')",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "verbose", "display debug text", PARAMFLAG_BOOL, .iptr=&verbose, .defintval=0, TYPE_INT, 0 }, + { "help", "display help and exit", PARAMFLAG_BOOL, .iptr=&help, .defintval=0, TYPE_INT, 0 }, + { "", "",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, }; struct option *long_options = parse_oai_options(options); int option_index; diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index dc83ce57bf..8be518e14a 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -407,42 +407,42 @@ int main(int argc, char **argv) { // set_glog(LOG_DEBUG,LOG_HIGH); //hapZEbm: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:LF static paramdef_t options[] = { - { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, strptr:NULL, defintval:0, TYPE_INT, 0, NULL, NULL }, - { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, iptr:&N_RB_DL, defintval:25, TYPE_INT, 0 }, - { "mcs", "The MCS to use", 0, iptr:&mcs, defintval:10, TYPE_INT, 0 }, - { "nb_frame", "number of frame in a test",0, iptr:&n_frames, defintval:1, TYPE_INT, 0 }, - { "snr", "starting snr", 0, dblptr:&snr0, defdblval:-2.9, TYPE_DOUBLE, 0 }, - { "wsnrInterrupt", "snr int ?", 0, dblptr:&snr_int, defdblval:30, TYPE_DOUBLE, 0 }, - { "e_snr_step", "step increasing snr",0, dblptr:&input_snr_step, defdblval:0.2, TYPE_DOUBLE, 0 }, - { "rb_dynamic", "number of rb in dynamic allocation",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "first_rb", "first rb used in dynamic allocation",0, iptr:&first_rb, defintval:0, TYPE_INT, 0 }, - { "osrs", "enable srs generation",PARAMFLAG_BOOL, iptr:&srs_flag, defintval:0, TYPE_INT, 0 }, - { "gchannel", "[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')",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "delay_chan", "Channel delay",0, iptr:&delay, defintval:0, TYPE_INT, 0 }, - { "Doppler", "Maximum doppler shift",0, dblptr:&maxDoppler, defdblval:0.0, TYPE_DOUBLE, 0 }, - { "Zdump", "dump table",PARAMFLAG_BOOL, iptr:&dump_table, defintval:0, TYPE_INT, 0 }, - { "Lparallel", "Enable parallel execution",0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0 }, - { "Iterations", "Number of iterations of turbo decoder", 0, iptr:&max_turbo_iterations, defintval:4, TYPE_INT, 0 }, - { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, iptr:&cqi_flag, defintval:0, TYPE_INT, 0 }, - { "prefix_extended","Extended prefix", PARAMFLAG_BOOL, iptr:&extended_prefix_flag, defintval:0, TYPE_INT, 0 }, - { "RI_beta", "TBD", 0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "CQI_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "ACK_beta", "TBD",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "input_file", "input IQ data file",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, - { "N0", "N0",0, iptr:&N0, defintval:30, TYPE_INT, 0 }, - { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, iptr:&threequarter_fs, defintval:0, TYPE_INT, 0 }, - { "TDD", "Enable TDD and set the tdd configuration mode",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "Subframe", "subframe to use",0, iptr:&subframe, defintval:3, TYPE_INT, 0 }, - { "xTransmission","transmission mode (1 or 2 are supported)",0, iptr:NULL, defintval:25, TYPE_INT, 0 }, - { "yN_rx", "TBD: n_rx",0, iptr:&n_rx, defintval:1, TYPE_INT, 0 }, - { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, iptr:&disable_bundling, defintval:0, TYPE_INT, 0 }, - { "Y", "n_ch_rlz",0, iptr:&n_ch_rlz, defintval:1, TYPE_INT, 0 }, - { "X", "abstx", PARAMFLAG_BOOL, iptr:&abstx, defintval:0, TYPE_INT, 0 }, - { "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, iptr:&test_perf, defintval:0, TYPE_INT, 0 }, - { "verbose", "display debug text", PARAMFLAG_BOOL, iptr:&verbose, defintval:0, TYPE_INT, 0 }, - { "help", "display help and exit", PARAMFLAG_BOOL, iptr:&help, defintval:0, TYPE_INT, 0 }, - { "", "",0, iptr:NULL, defintval:0, TYPE_INT, 0 }, + { "awgn", "Use AWGN channel and not multipath", PARAMFLAG_BOOL, .strptr=NULL, .defintval=0, TYPE_INT, 0, NULL, NULL }, + { "BnbRBs", "The LTE bandwith in RBs (100 is 20MHz)",0, .iptr=&N_RB_DL, .defintval=25, TYPE_INT, 0 }, + { "mcs", "The MCS to use", 0, .iptr=&mcs, .defintval=10, TYPE_INT, 0 }, + { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, + { "snr", "starting snr", 0, .dblptr=&snr0, .defdblval=-2.9, TYPE_DOUBLE, 0 }, + { "wsnrInterrupt", "snr int ?", 0, .dblptr=&snr_int, .defdblval=30, TYPE_DOUBLE, 0 }, + { "e_snr_step", "step increasing snr",0, .dblptr=&input_snr_step, .defdblval=0.2, TYPE_DOUBLE, 0 }, + { "rb_dynamic", "number of rb in dynamic allocation",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "first_rb", "first rb used in dynamic allocation",0, .iptr=&first_rb, .defintval=0, TYPE_INT, 0 }, + { "osrs", "enable srs generation",PARAMFLAG_BOOL, .iptr=&srs_flag, .defintval=0, TYPE_INT, 0 }, + { "gchannel", "[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')",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "delay_chan", "Channel delay",0, .iptr=&delay, .defintval=0, TYPE_INT, 0 }, + { "Doppler", "Maximum doppler shift",0, .dblptr=&maxDoppler, .defdblval=0.0, TYPE_DOUBLE, 0 }, + { "Zdump", "dump table",PARAMFLAG_BOOL, .iptr=&dump_table, .defintval=0, TYPE_INT, 0 }, + { "Lparallel", "Enable parallel execution",0, .strptr=NULL, .defstrval=NULL, TYPE_STRING, 0 }, + { "Iterations", "Number of iterations of turbo decoder", 0, .iptr=&max_turbo_iterations, .defintval=4, TYPE_INT, 0 }, + { "Performance", "Display CPU perfomance of each L1 piece", PARAMFLAG_BOOL, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "Q_cqi", "Enable CQI", PARAMFLAG_BOOL, .iptr=&cqi_flag, .defintval=0, TYPE_INT, 0 }, + { "prefix_extended","Extended prefix", PARAMFLAG_BOOL, .iptr=&extended_prefix_flag, .defintval=0, TYPE_INT, 0 }, + { "RI_beta", "TBD", 0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "CQI_beta", "TBD",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "ACK_beta", "TBD",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "input_file", "input IQ data file",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, + { "N0", "N0",0, .iptr=&N0, .defintval=30, TYPE_INT, 0 }, + { "EsubSampling","three quarters sub-sampling",PARAMFLAG_BOOL, .iptr=&threequarter_fs, .defintval=0, TYPE_INT, 0 }, + { "TDD", "Enable TDD and set the tdd configuration mode",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "Subframe", "subframe to use",0, .iptr=&subframe, .defintval=3, TYPE_INT, 0 }, + { "xTransmission","transmission mode (1 or 2 are supported)",0, .iptr=NULL, .defintval=25, TYPE_INT, 0 }, + { "yN_rx", "TBD: n_rx",0, .iptr=&n_rx, .defintval=1, TYPE_INT, 0 }, + { "bundling_disable", "bundling disable",PARAMFLAG_BOOL, .iptr=&disable_bundling, .defintval=0, TYPE_INT, 0 }, + { "Y", "n_ch_rlz",0, .iptr=&n_ch_rlz, .defintval=1, TYPE_INT, 0 }, + { "X", "abstx", PARAMFLAG_BOOL, .iptr=&abstx, .defintval=0, TYPE_INT, 0 }, + { "Operf", "Set the percentage of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "verbose", "display debug text", PARAMFLAG_BOOL, .iptr=&verbose, .defintval=0, TYPE_INT, 0 }, + { "help", "display help and exit", PARAMFLAG_BOOL, .iptr=&help, .defintval=0, TYPE_INT, 0 }, + { "", "",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, }; struct option *long_options = parse_oai_options(options); int option_index; diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 57575f18ef..29a8b7cbe6 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -589,7 +589,7 @@ int main(int argc, char **argv) rxdataF[aarx][i].r = (int16_t)(100.0*(rxr + nr)/sqrt((double)txlev)); rxdataF[aarx][i].i=(int16_t)(100.0*(rxi + ni)/sqrt((double)txlev)); - if (n_trials==1 && abs(txr) > 0) printf("symb %d, re %d , aarx %d : txr %f, txi %f, chr %f, chi %f, nr %f, ni %f, rxr %f, rxi %f => %d,%d\n", + if (n_trials==1 && fabs(txr) > 0) printf("symb %d, re %d , aarx %d : txr %f, txi %f, chr %f, chi %f, nr %f, ni %f, rxr %f, rxi %f => %d,%d\n", symb, re, aarx, txr,txi, UE2gNB->chF[aarx][re].r,UE2gNB->chF[aarx][re].i, nr,ni, rxr,rxi,