diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 856b39c9fd849247f2cee1db1bca509bd6122775..fc24b48f1189d5054e99245a2b5a18dc2a48afdf 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -116,7 +116,7 @@ <main_exec>nr_pbchsim</main_exec> <main_exec_args>-s-11 -S-8 -n10 -R106 -N2 -s-11 -S-8 -n10 -o8000 -I -R106 - -s-11 -S-8 -n10 -R106 -O6</main_exec_args> + -s-11 -S-8 -n10 -R106 -c6</main_exec_args> <tags>test1 test2 test3</tags> <search_expr_true>PBCH test OK</search_expr_true> <search_expr_false>segmentation fault|assertion|exiting|fatal</search_expr_false> diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index d294bd6052526080009a530c7adb8fdd80e289c1..716cf5e2fc8634e21d4715ccfe0700cd74a63fea 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -244,15 +244,20 @@ int main(int argc, char **argv) exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); } - while ((c = getopt (argc, argv, "--:F:g:hIL:m:M:n:N:o:O:P:r:R:s:S:x:y:z:")) != -1) { + while ((c = getopt (argc, argv, "--:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { - /* ignore long options starting with '--' and their arguments that are handled by configmodule */ + /* ignore long options starting with '--', option '-O' and their arguments that are handled by configmodule */ /* with this opstring getopt returns 1 for non-option arguments, refer to 'man 3 getopt' */ if (c == 1 || c == '-') continue; printf("handling optarg %c\n",c); switch (c) { + + case 'c': + ssb_subcarrier_offset = atoi(optarg); + break; + /*case 'f': write_output_file=1; output_fd = fopen(optarg,"w"); @@ -349,10 +354,6 @@ int main(int argc, char **argv) Nid_cell = atoi(optarg); break; - case 'O': - ssb_subcarrier_offset = atoi(optarg); - break; - case 'o': cfo = atof(optarg); #ifdef DEBUG_NR_PBCHSIM @@ -440,6 +441,7 @@ int main(int argc, char **argv) printf("%s -F input_filename -g channel_mod -h(elp) -I(nitial sync) -L log_lvl -n n_frames -M SSBs -n frames -N cell_id -o FO -P phase -r seed -R RBs -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant\n", argv[0]); //printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n"); + printf("-c SSB subcarrier offset\n"); //printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n"); //printf("-d Use TDD\n"); //printf("-f Output filename (.txt format) for Pe/SNR results\n"); @@ -455,7 +457,6 @@ int main(int argc, char **argv) printf("-n Number of frames to simulate\n"); printf("-N Nid_cell\n"); printf("-o Carrier frequency offset in Hz\n"); - printf("-O SSB subcarrier offset\n"); //printf("-O oversampling factor (1,2,4,8,16)\n"); //printf("-p Use extended prefix mode\n"); printf("-P PBCH phase, allowed values 0-3\n");