Commit db775166 authored by Thomas Schlichter's avatar Thomas Schlichter

fix some compile warnings for nr_dlsim and nr_ulsim

parent 3faeff23
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/nr_modulation.h"
#include "PHY/MODULATION/modulation_UE.h" #include "PHY/MODULATION/modulation_UE.h"
#include "PHY/NR_REFSIG/refsig_defs_ue.h" #include "PHY/NR_REFSIG/refsig_defs_ue.h"
#include "PHY/NR_TRANSPORT/nr_dlsch.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h" #include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h" #include "PHY/NR_UE_TRANSPORT/nr_transport_proto_ue.h"
#include "SCHED_NR/fapi_nr_l1.h" #include "SCHED_NR/fapi_nr_l1.h"
......
...@@ -162,12 +162,12 @@ int main(int argc, char **argv) ...@@ -162,12 +162,12 @@ int main(int argc, char **argv)
int rv_index = 0; int rv_index = 0;
float roundStats[50]; float roundStats[50];
float effRate; float effRate;
float eff_tp_check = 0.7; //float eff_tp_check = 0.7;
uint8_t snrRun; uint8_t snrRun;
UE_nr_rxtx_proc_t UE_proc; UE_nr_rxtx_proc_t UE_proc;
FILE *scg_fd=NULL; FILE *scg_fd=NULL;
int file_offset; int file_offset = 0;
double DS_TDL = .03; double DS_TDL = .03;
int pusch_tgt_snrx10 = 200; int pusch_tgt_snrx10 = 200;
...@@ -311,9 +311,11 @@ int main(int argc, char **argv) ...@@ -311,9 +311,11 @@ int main(int argc, char **argv)
printf("Setting SNR0 to %f\n", snr0); printf("Setting SNR0 to %f\n", snr0);
break; break;
/*
case 't': case 't':
eff_tp_check = (float)atoi(optarg)/100; eff_tp_check = (float)atoi(optarg)/100;
break; break;
*/
/* /*
case 'r': case 'r':
ricean_factor = pow(10,-.1*atof(optarg)); ricean_factor = pow(10,-.1*atof(optarg));
...@@ -643,15 +645,9 @@ int main(int argc, char **argv) ...@@ -643,15 +645,9 @@ int main(int argc, char **argv)
//for (int i=0;i<16;i++) printf("%f\n",gaussdouble(0.0,1.0)); //for (int i=0;i<16;i++) printf("%f\n",gaussdouble(0.0,1.0));
snrRun = 0; snrRun = 0;
int n_errs; int n_errs = 0;
double factor = 1; int slot_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);
if (openair0_cfg[0].threequarter_fs== 1) factor =.75;
int ta_offset=1600;
if (N_RB_DL <217) ta_offset=800;
else if (N_RB_DL < 106) ta_offset = 400;
int slot_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);// - (int)(800*factor);
int slot_length = slot_offset - frame_parms->get_samples_slot_timestamp(slot-1,frame_parms,0); int slot_length = slot_offset - frame_parms->get_samples_slot_timestamp(slot-1,frame_parms,0);
if (input_fd != NULL) { if (input_fd != NULL) {
...@@ -659,8 +655,6 @@ int main(int argc, char **argv) ...@@ -659,8 +655,6 @@ int main(int argc, char **argv)
// 800 samples is N_TA_OFFSET for FR1 @ 30.72 Ms/s, // 800 samples is N_TA_OFFSET for FR1 @ 30.72 Ms/s,
AssertFatal(frame_parms->subcarrier_spacing==30000,"only 30 kHz for file input for now (%d)\n",frame_parms->subcarrier_spacing); AssertFatal(frame_parms->subcarrier_spacing==30000,"only 30 kHz for file input for now (%d)\n",frame_parms->subcarrier_spacing);
// slot_offset -= (int)(800*factor);
fseek(input_fd,file_offset*((slot_length<<2)+4000+16),SEEK_SET); fseek(input_fd,file_offset*((slot_length<<2)+4000+16),SEEK_SET);
fread((void*)&n_rnti,sizeof(int16_t),1,input_fd); fread((void*)&n_rnti,sizeof(int16_t),1,input_fd);
printf("rnti %x\n",n_rnti); printf("rnti %x\n",n_rnti);
...@@ -990,7 +984,7 @@ int main(int argc, char **argv) ...@@ -990,7 +984,7 @@ int main(int argc, char **argv)
if (n_trials == 1 && errors_scrambling[0] > 0) { if (n_trials == 1 && errors_scrambling[0] > 0) {
printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %u\n" "\x1B[0m", frame, trial, errors_scrambling); printf("\x1B[31m""[frame %d][trial %d]\tnumber of errors in unscrambling = %u\n" "\x1B[0m", frame, trial, errors_scrambling[0]);
} }
for (i = 0; i < TBS; i++) { for (i = 0; i < TBS; i++) {
......
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