Commit 02f9d220 authored by Sakthivel Velumani's avatar Sakthivel Velumani

changed ulsim to test with SMBV signal

parent 96e393d8
...@@ -183,6 +183,7 @@ int main(int argc, char **argv) ...@@ -183,6 +183,7 @@ int main(int argc, char **argv)
int pucch_tgt_snrx10 = 200; int pucch_tgt_snrx10 = 200;
int ibwps=24; int ibwps=24;
int ibwp_rboffset=41; int ibwp_rboffset=41;
int params_from_file = 0;
if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) { if ( load_configmodule(argc,argv,CONFIG_ENABLECMDLINEONLY) == 0 ) {
exit_fun("[NR_ULSIM] Error, configuration module init failed\n"); exit_fun("[NR_ULSIM] Error, configuration module init failed\n");
} }
...@@ -419,6 +420,10 @@ int main(int argc, char **argv) ...@@ -419,6 +420,10 @@ int main(int argc, char **argv)
} }
break; break;
case 'Q':
params_from_file = 1;
break;
default: default:
case 'h': case 'h':
printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]); printf("%s -h(elp) -p(extended_prefix) -N cell_id -f output_filename -F input_filename -g channel_model -n n_frames -t Delayspread -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant -i Intefrence0 -j Interference1 -A interpolation_file -C(alibration offset dB) -N CellId\n", argv[0]);
...@@ -450,6 +455,7 @@ int main(int argc, char **argv) ...@@ -450,6 +455,7 @@ int main(int argc, char **argv)
printf("-P Print ULSCH performances\n"); printf("-P Print ULSCH performances\n");
printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n"); printf("-T Enable PTRS, arguments list L_PTRS{0,1,2} K_PTRS{2,4}, e.g. -T 2 0 2 \n");
printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:3}, e.g. -U 2 0 2 \n"); printf("-U Change DMRS Config, arguments list DMRS TYPE{0=A,1=B} DMRS AddPos{0:3}, e.g. -U 2 0 2 \n");
printf("-Q If -F used, read parameters from file\n");
exit(-1); exit(-1);
break; break;
...@@ -732,6 +738,7 @@ int main(int argc, char **argv) ...@@ -732,6 +738,7 @@ 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);
if (params_from_file) {
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);
...@@ -753,6 +760,8 @@ int main(int argc, char **argv) ...@@ -753,6 +760,8 @@ int main(int argc, char **argv)
// fread((void*)&harq_pid,sizeof(int16_t),1,input_fd); // fread((void*)&harq_pid,sizeof(int16_t),1,input_fd);
fread((void*)&dummy,sizeof(int16_t),1,input_fd); fread((void*)&dummy,sizeof(int16_t),1,input_fd);
printf("harq_pid %d\n",harq_pid); printf("harq_pid %d\n",harq_pid);
}
fseek(input_fd,file_offset*sizeof(int16_t)*2,SEEK_SET);
fread((void*)&gNB->common_vars.rxdata[0][slot_offset-delay], fread((void*)&gNB->common_vars.rxdata[0][slot_offset-delay],
sizeof(int16_t), sizeof(int16_t),
slot_length<<1, slot_length<<1,
......
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