Commit 6d13f28b authored by francescomani's avatar francescomani

physical simulators compilation warnings

parent 4065e7b4
......@@ -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)
{
......
......@@ -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 (&currentTime);
if (logFlag){
time (&currentTime);
#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(&currentTime));
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(&currentTime));
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);
......
......@@ -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)) {
......
This diff is collapsed.
......@@ -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;
......
......@@ -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,
......
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