From edcd0019d2d4dbaa37ee897432140ab12046740f Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:29:29 +0200 Subject: [PATCH 1/3] fix(nr_pbchsim): replace option -O by option -c --- cmake_targets/autotests/test_case_list.xml | 2 +- openair1/SIMULATION/NR_PHY/pbchsim.c | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index 856b39c9fd..fc24b48f11 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -116,7 +116,7 @@ nr_pbchsim -s-11 -S-8 -n10 -R106 -N2 -s-11 -S-8 -n10 -o8000 -I -R106 - -s-11 -S-8 -n10 -R106 -O6 + -s-11 -S-8 -n10 -R106 -c6 test1 test2 test3 PBCH test OK segmentation fault|assertion|exiting|fatal diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index d294bd6052..716cf5e2fc 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"); From a476e18120cc06403b8214514301ac4131301087 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:35:10 +0200 Subject: [PATCH 2/3] fix(phy_simulators): replace option -Operf by option -Tperf in LTE ulsim and dlsim --- cmake_targets/autotests/test_case_list.xml | 40 +++++++++++----------- openair1/SIMULATION/LTE_PHY/dlsim.c | 2 +- openair1/SIMULATION/LTE_PHY/ulsim.c | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/cmake_targets/autotests/test_case_list.xml b/cmake_targets/autotests/test_case_list.xml index fc24b48f11..885158a84d 100755 --- a/cmake_targets/autotests/test_case_list.xml +++ b/cmake_targets/autotests/test_case_list.xml @@ -12,15 +12,15 @@ (Test 10b: 5 MHz, R6-1.FDD (MCS 24,18 PRB), EVA5, 17.5dB (70%)), (Test 11: 10 MHz, R7.FDD (MCS 25), EVA5, 17.7dB (70%)) dlsim - -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 - -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -O=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 - -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=60 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=25 - -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -O=25 - -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -O=60 - -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -O=60 - -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -O=60 + -m=5 -g=F -s=-1 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 + -m=4 -g=F -s=0 -w=1.0 -f=.2 -n=500 -B=6 -c=4 -z=2 -Tperf=60 + -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 + -m=15 -g=F -s=6.7 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=60 + -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=25 + -m=15 -g=G -s=1.4 -w=1.0 -f=.2 -n=500 -B=25 -c=2 -z=2 -Tperf=25 + -m=25 -g=F -s=17.4 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -Tperf=60 + -m=25 -g=F -s=17.5 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -z=2 -r=1022 -Tperf=60 + -m=26 -g=F -s=17.7 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -z=2 -Tperf=60 test1 test5 test6 test6b test7 test7b test10 test10b test11 "passed" segmentation fault|assertion|exiting|fatal @@ -34,11 +34,11 @@ (TM2 Test 1: 10 MHz, R.11 FDD (MCS 14), EVA5, 6.8 dB (70%)), (TM2 Test 1b: 5 MHz, R.11-2 FDD (MCS 13), EVA5, 5.9 dB (70%)) dlsim - -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -O=60 - -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -O=60 - -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -O=60 - -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -O=60 - -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -O=60 + -m=26 -g=F -s=17.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -Tperf=60 + -m=26 -g=F -s=17.3 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1600 -Tperf=60 + -m=26 -g=F -s=16.6 -w=1.0 -f=.2 -n=500 -B=100 -c=2 -z=2 -r=1899 -Tperf=60 + -m=14 -g=F -s=6.8 -w=1.0 -f=.2 -n=500 -B=50 -c=2 -x=2 -y=2 -z=2 -Tperf=60 + -m=13 -g=F -s=5.9 -w=1.0 -f=.2 -n=500 -B=25 -c=3 -x=2 -y=2 -z=2 -Tperf=60 test15 test15b test15c TM2_test1 TM2_test1b "passed" segmentation fault|assertion|exiting|fatal @@ -53,12 +53,12 @@ (Test 5: 20 MHz, FDD (MCS 5), AWGN, 6dB (70%)), (Test 6: 20 MHz, FDD (MCS 16), AWGN, 12 dB (70%)) ulsim - -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 - -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Operf=70 + -BnbRBs=25 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=25 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=50 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=50 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=100 -mcs=5 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=6 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 + -BnbRBs=100 -mcs=16 -yN_rx=1 -gchannel=N -xTransmission=1 -snr=12 -wsnrInterrupt=1.0 -e_snr_step=.1 -P -nb_frame=500 -Tperf=70 test1 test2 test3 test4 test5 test6 "passed" segmentation fault|assertion|exiting|fatal diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index 2f112ddc99..1d012dc352 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -630,7 +630,7 @@ int main(int argc, char **argv) { { "lMuMimo", "offset_mumimo_llr_drange_fix",0, .u8ptr=&offset_mumimo_llr_drange_fix, .defintval=0, TYPE_UINT8, 0 }, { "mcs1", "The MCS for TB 1", 0, .iptr=&mcs1, .defintval=0, TYPE_INT, 0 }, { "Mcs2", "The MCS for TB 2", 0, .iptr=&mcs2, .defintval=0, TYPE_INT, 0 }, - { "Operf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, + { "Tperf", "Set the percenatge of effective rate to testbench the modem performance (typically 30 and 70, range 1-100)",0, .iptr=&test_perf, .defintval=0, TYPE_INT, 0 }, { "tmcs_i", "MCS of interfering UE",0, .iptr=NULL, .defintval=0, TYPE_INT, 0 }, { "nb_frame", "number of frame in a test",0, .iptr=&n_frames, .defintval=1, TYPE_INT, 0 }, { "offsetRxSample", "Sample offset for receiver", 0, .iptr=&rx_sample_offset, .defintval=0, TYPE_INT, 0 }, diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 7898365e66..60d3514253 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -438,7 +438,7 @@ int main(int argc, char **argv) { { "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 }, + { "Tperf", "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 }, From 327b9a8b70c271d2e0a1e67e102a4c1b23b4fd80 Mon Sep 17 00:00:00 2001 From: Romain Beurdouche Date: Tue, 25 Jun 2024 10:38:09 +0200 Subject: [PATCH 3/3] fix(phy_simulators): enable the use of option -O to pass a configuration file to configmodule in phy simulators --- openair1/PHY/CODING/TESTBENCH/ldpctest.c | 6 +++--- openair1/PHY/CODING/TESTBENCH/polartest.c | 6 +++--- openair1/PHY/CODING/TESTBENCH/smallblocktest.c | 6 +++--- openair1/SIMULATION/NR_PHY/dlschsim.c | 4 ++-- openair1/SIMULATION/NR_PHY/dlsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/pbchsim.c | 4 ++-- openair1/SIMULATION/NR_PHY/prachsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/psbchsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/pucchsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/ulschsim.c | 6 +++--- openair1/SIMULATION/NR_PHY/ulsim.c | 6 +++--- 11 files changed, 31 insertions(+), 31 deletions(-) diff --git a/openair1/PHY/CODING/TESTBENCH/ldpctest.c b/openair1/PHY/CODING/TESTBENCH/ldpctest.c index 43a84e4b8f..d676a90264 100644 --- a/openair1/PHY/CODING/TESTBENCH/ldpctest.c +++ b/openair1/PHY/CODING/TESTBENCH/ldpctest.c @@ -430,11 +430,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((c = getopt (argc, argv, "--:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -1) { + while ((c = getopt (argc, argv, "--:O:q:r:s:S:l:G:n:d:i:t:u:hv:")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/PHY/CODING/TESTBENCH/polartest.c b/openair1/PHY/CODING/TESTBENCH/polartest.c index 78b44599fb..be7987f340 100644 --- a/openair1/PHY/CODING/TESTBENCH/polartest.c +++ b/openair1/PHY/CODING/TESTBENCH/polartest.c @@ -38,11 +38,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((arguments = getopt (argc, argv, "--:s:d:f:m:i:l:a:p:hqgFL:k:")) != -1) { + while ((arguments = getopt (argc, argv, "--:O:s:d:f:m:i:l:a:p:hqgFL:k:")) != -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 (arguments == 1 || arguments == '-') + if (arguments == 1 || arguments == '-' || arguments == 'O') continue; printf("handling optarg %c\n",arguments); diff --git a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c index d6306495a7..dfc8aadc8e 100644 --- a/openair1/PHY/CODING/TESTBENCH/smallblocktest.c +++ b/openair1/PHY/CODING/TESTBENCH/smallblocktest.c @@ -32,11 +32,11 @@ int main(int argc, char *argv[]) } logInit(); - while ((arguments = getopt(argc, argv, "--:s:d:f:l:i:mhg")) != -1) { + while ((arguments = getopt(argc, argv, "--:O:s:d:f:l:i:mhg")) != -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 (arguments == 1 || arguments == '-') + if (arguments == 1 || arguments == '-' || arguments == 'O') continue; printf("handling optarg %c\n",arguments); diff --git a/openair1/SIMULATION/NR_PHY/dlschsim.c b/openair1/SIMULATION/NR_PHY/dlschsim.c index 7466da841c..b49eed1bd6 100644 --- a/openair1/SIMULATION/NR_PHY/dlschsim.c +++ b/openair1/SIMULATION/NR_PHY/dlschsim.c @@ -146,11 +146,11 @@ int main(int argc, char **argv) // logInit(); randominit(0); - while ((c = getopt(argc, argv, "--:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) { + while ((c = getopt(argc, argv, "--:O:df:hpVg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:L:X:")) != -1) { /* ignore long options starting with '--' 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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 6f48f80ce9..728163e049 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -336,11 +336,11 @@ int main(int argc, char **argv) FILE *scg_fd=NULL; - while ((c = getopt(argc, argv, "--:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -1) { + while ((c = getopt(argc, argv, "--:O:f:hA:p:f:g:i:n:s:S:t:v:x:y:z:o:M:N:F:GR:d:PI:L:a:b:e:m:w:T:U:q:X:Y:Z:c")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index 716cf5e2fc..63546246f0 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -244,11 +244,11 @@ int main(int argc, char **argv) exit_fun("[NR_PBCHSIM] Error, configuration module init failed\n"); } - while ((c = getopt (argc, argv, "--:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { + while ((c = getopt (argc, argv, "--:O:c:F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:")) != -1) { /* 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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/prachsim.c b/openair1/SIMULATION/NR_PHY/prachsim.c index ef05cd4940..785e8bb96f 100644 --- a/openair1/SIMULATION/NR_PHY/prachsim.c +++ b/openair1/SIMULATION/NR_PHY/prachsim.c @@ -164,11 +164,11 @@ int main(int argc, char **argv){ randominit(0); - while ((c = getopt (argc, argv, "--:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -1) { + while ((c = getopt (argc, argv, "--:O:hHaA:Cc:l:r:p:g:m:n:s:S:t:x:y:v:V:z:N:F:d:Z:L:R:E")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/psbchsim.c b/openair1/SIMULATION/NR_PHY/psbchsim.c index fd96f233ca..63a4ae5ff2 100644 --- a/openair1/SIMULATION/NR_PHY/psbchsim.c +++ b/openair1/SIMULATION/NR_PHY/psbchsim.c @@ -313,11 +313,11 @@ int main(int argc, char **argv) randominit(0); - while ((c = getopt(argc, argv, "--:c:hn:o:s:FIL:N:R:S:T:")) != -1) { + while ((c = getopt(argc, argv, "--:O:c:hn:o:s:FIL:N:R:S:T:")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("SIDELINK PSBCH SIM: handling optarg %c\n", c); diff --git a/openair1/SIMULATION/NR_PHY/pucchsim.c b/openair1/SIMULATION/NR_PHY/pucchsim.c index 1609c36511..5291930c12 100644 --- a/openair1/SIMULATION/NR_PHY/pucchsim.c +++ b/openair1/SIMULATION/NR_PHY/pucchsim.c @@ -155,11 +155,11 @@ int main(int argc, char **argv) randominit(0); logInit(); - while ((c = getopt (argc, argv, "--:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -1) { + while ((c = getopt (argc, argv, "--:O:f:hA:f:g:i:I:P:B:b:t:T:m:n:r:o:s:S:x:y:z:N:F:GR:IL:q:cd:")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/ulschsim.c b/openair1/SIMULATION/NR_PHY/ulschsim.c index 1da4da5b24..ebe0ff8915 100644 --- a/openair1/SIMULATION/NR_PHY/ulschsim.c +++ b/openair1/SIMULATION/NR_PHY/ulschsim.c @@ -166,11 +166,11 @@ int main(int argc, char **argv) randominit(0); //while ((c = getopt(argc, argv, "--:df:hpg:i:j:n:l:m:r:s:S:y:z:M:N:F:R:P:")) != -1) { - while ((c = getopt(argc, argv, "--:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -1) { + while ((c = getopt(argc, argv, "--:O:hg:n:s:S:py:z:M:N:R:F:m:l:q:r:W:")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c); diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 0efdc9be39..822153fd14 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -223,11 +223,11 @@ int main(int argc, char *argv[]) /* initialize the sin-cos table */ InitSinLUT(); - while ((c = getopt(argc, argv, "--:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -1) { + while ((c = getopt(argc, argv, "--:O:a:b:c:d:ef:g:h:i:k:m:n:op:q:r:s:t:u:v:w:y:z:C:F:G:H:I:M:N:PR:S:T:U:L:ZW:E:X:")) != -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 == '-') + if (c == 1 || c == '-' || c == 'O') continue; printf("handling optarg %c\n",c);