diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index aa9065ce7a0bf36a7172590a6944af79bb58b793..38400cab51aaaf8c74b5561eeb1aff093eb8323c 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -41,6 +41,7 @@ #include "PHY/MODULATION/nr_modulation.h" #include "PHY/MODULATION/modulation_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_UE_TRANSPORT/nr_transport_proto_ue.h" #include "SCHED_NR/fapi_nr_l1.h" diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 28abf27ab7a57b8e72989bc14aa03ef4428dffea..687e2e92e2dc65607e32c8bba7bc3f0a292569b3 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -162,12 +162,12 @@ int main(int argc, char **argv) int rv_index = 0; float roundStats[50]; float effRate; - float eff_tp_check = 0.7; + //float eff_tp_check = 0.7; uint8_t snrRun; UE_nr_rxtx_proc_t UE_proc; FILE *scg_fd=NULL; - int file_offset; + int file_offset = 0; double DS_TDL = .03; int pusch_tgt_snrx10 = 200; @@ -310,10 +310,12 @@ int main(int argc, char **argv) snr0 = atof(optarg); printf("Setting SNR0 to %f\n", snr0); break; - + +/* case 't': eff_tp_check = (float)atoi(optarg)/100; break; +*/ /* case 'r': ricean_factor = pow(10,-.1*atof(optarg)); @@ -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)); snrRun = 0; - int n_errs; - - double factor = 1; - 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 n_errs = 0; - int slot_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0);// - (int)(800*factor); + int slot_offset = frame_parms->get_samples_slot_timestamp(slot,frame_parms,0); int slot_length = slot_offset - frame_parms->get_samples_slot_timestamp(slot-1,frame_parms,0); if (input_fd != NULL) { @@ -659,8 +655,6 @@ int main(int argc, char **argv) // 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); - // slot_offset -= (int)(800*factor); - fseek(input_fd,file_offset*((slot_length<<2)+4000+16),SEEK_SET); fread((void*)&n_rnti,sizeof(int16_t),1,input_fd); printf("rnti %x\n",n_rnti); @@ -990,7 +984,7 @@ int main(int argc, char **argv) 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++) {