Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG UE
Commits
ad6f0918
Commit
ad6f0918
authored
Jan 06, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up nr_pbchsim program options
parent
8762d5d8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
80 additions
and
80 deletions
+80
-80
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+80
-80
No files found.
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
ad6f0918
...
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
...
@@ -211,7 +211,7 @@ int main(int argc, char **argv)
randominit
(
0
);
randominit
(
0
);
while
((
c
=
getopt
(
argc
,
argv
,
"
f:hA:pf:g:i:j:n:o:s:S:t:x:y:z:M:N:F:GR:dP:IL:m
:"
))
!=
-
1
)
{
while
((
c
=
getopt
(
argc
,
argv
,
"
F:g:hIL:m:M:n:N:o:P:R:s:S:x:y:z
:"
))
!=
-
1
)
{
switch
(
c
)
{
switch
(
c
)
{
/*case 'f':
/*case 'f':
write_output_file=1;
write_output_file=1;
...
@@ -228,6 +228,14 @@ int main(int argc, char **argv)
...
@@ -228,6 +228,14 @@ int main(int argc, char **argv)
frame_type = 1;
frame_type = 1;
break;*/
break;*/
case
'F'
:
input_fd
=
fopen
(
optarg
,
"r"
);
if
(
input_fd
==
NULL
)
{
printf
(
"Problem with filename %s. Exiting.
\n
"
,
optarg
);
exit
(
-
1
);
}
break
;
case
'g'
:
case
'g'
:
switch
((
char
)
*
optarg
)
{
switch
((
char
)
*
optarg
)
{
case
'A'
:
case
'A'
:
...
@@ -265,18 +273,42 @@ int main(int argc, char **argv)
...
@@ -265,18 +273,42 @@ int main(int argc, char **argv)
break
;
break
;
/*case 'i':
/*
case 'i':
interf1=atoi(optarg);
interf1=atoi(optarg);
break;
break;
*/
case
'I'
:
run_initial_sync
=
1
;
target_error_rate
=
0
.
1
;
break
;
/*
case 'j':
case 'j':
interf2=atoi(optarg);
interf2=atoi(optarg);
break;*/
break;*/
case
'L'
:
loglvl
=
atoi
(
optarg
);
break
;
case
'm'
:
mu
=
atoi
(
optarg
);
break
;
case
'M'
:
SSB_positions
=
atoi
(
optarg
);
break
;
case
'n'
:
case
'n'
:
n_trials
=
atoi
(
optarg
);
n_trials
=
atoi
(
optarg
);
break
;
break
;
case
'N'
:
Nid_cell
=
atoi
(
optarg
);
break
;
case
'o'
:
case
'o'
:
cfo
=
atof
(
optarg
);
cfo
=
atof
(
optarg
);
#ifdef DEBUG_NR_PBCHSIM
#ifdef DEBUG_NR_PBCHSIM
...
@@ -284,6 +316,30 @@ int main(int argc, char **argv)
...
@@ -284,6 +316,30 @@ int main(int argc, char **argv)
#endif
#endif
break
;
break
;
/*case 'p':
extended_prefix_flag=1;
break;*/
case
'P'
:
pbch_phase
=
atoi
(
optarg
);
if
(
pbch_phase
>
3
)
printf
(
"Illegal PBCH phase (0-3) got %d
\n
"
,
pbch_phase
);
break
;
/*
case 'r':
ricean_factor = pow(10,-.1*atof(optarg));
if (ricean_factor>1) {
printf("Ricean factor must be between 0 and 1\n");
exit(-1);
}
break;
*/
case
'R'
:
N_RB_DL
=
atoi
(
optarg
);
break
;
case
's'
:
case
's'
:
snr0
=
atof
(
optarg
);
snr0
=
atof
(
optarg
);
#ifdef DEBUG_NR_PBCHSIM
#ifdef DEBUG_NR_PBCHSIM
...
@@ -304,19 +360,7 @@ int main(int argc, char **argv)
...
@@ -304,19 +360,7 @@ int main(int argc, char **argv)
Td= atof(optarg);
Td= atof(optarg);
break;
break;
*/
*/
/*case 'p':
extended_prefix_flag=1;
break;*/
/*
case 'r':
ricean_factor = pow(10,-.1*atof(optarg));
if (ricean_factor>1) {
printf("Ricean factor must be between 0 and 1\n");
exit(-1);
}
break;
*/
case
'x'
:
case
'x'
:
transmission_mode
=
atoi
(
optarg
);
transmission_mode
=
atoi
(
optarg
);
...
@@ -329,94 +373,50 @@ int main(int argc, char **argv)
...
@@ -329,94 +373,50 @@ int main(int argc, char **argv)
case
'y'
:
case
'y'
:
n_tx
=
atoi
(
optarg
);
n_tx
=
atoi
(
optarg
);
if
((
n_tx
==
0
)
||
(
n_tx
>
2
))
{
if
((
n_tx
==
0
)
||
(
n_tx
>
2
))
{
printf
(
"Unsupported number of TX antennas %d. Exiting.
\n
"
,
n_tx
);
printf
(
"Unsupported number of TX antennas %d. Exiting.
\n
"
,
n_tx
);
exit
(
-
1
);
exit
(
-
1
);
}
}
break
;
break
;
case
'z'
:
case
'z'
:
n_rx
=
atoi
(
optarg
);
n_rx
=
atoi
(
optarg
);
if
((
n_rx
==
0
)
||
(
n_rx
>
2
))
{
if
((
n_rx
==
0
)
||
(
n_rx
>
2
))
{
printf
(
"Unsupported number of RX antennas %d. Exiting.
\n
"
,
n_rx
);
printf
(
"Unsupported number of RX antennas %d. Exiting.
\n
"
,
n_rx
);
exit
(
-
1
);
exit
(
-
1
);
}
}
break
;
case
'M'
:
SSB_positions
=
atoi
(
optarg
);
break
;
case
'N'
:
Nid_cell
=
atoi
(
optarg
);
break
;
case
'R'
:
N_RB_DL
=
atoi
(
optarg
);
break
;
case
'F'
:
input_fd
=
fopen
(
optarg
,
"r"
);
if
(
input_fd
==
NULL
)
{
printf
(
"Problem with filename %s. Exiting.
\n
"
,
optarg
);
exit
(
-
1
);
}
break
;
case
'P'
:
pbch_phase
=
atoi
(
optarg
);
if
(
pbch_phase
>
3
)
printf
(
"Illegal PBCH phase (0-3) got %d
\n
"
,
pbch_phase
);
break
;
case
'I'
:
run_initial_sync
=
1
;
target_error_rate
=
0
.
1
;
break
;
case
'L'
:
loglvl
=
atoi
(
optarg
);
break
;
case
'm'
:
mu
=
atoi
(
optarg
);
break
;
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
"
,
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 RBs -s snr0 -S snr1 -x transmission_mode -y TXant -z RXant
\n
"
,
argv
[
0
]);
argv
[
0
]);
printf
(
"-h This messag
e
\n
"
);
//printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in fil
e\n");
//printf("-
p Use extended prefix mode
\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("-d Use TDD\n");
printf
(
"-n Number of frames to simulate
\n
"
);
//printf("-f Output filename (.txt format) for Pe/SNR results\n");
printf
(
"-m Numerology index
\n
"
);
printf
(
"-F Input filename (.txt format) for RX conformance testing
\n
"
);
printf
(
"-s Starting SNR, runs from SNR0 to SNR0 + 5 dB. If n_frames is 1 then just SNR is simulated
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
printf
(
"-t Delay spread for multipath channel
\n
"
);
printf
(
"-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)
\n
"
);
printf
(
"-g [A,B,C,D,E,F,G] Use 3GPP SCM (A,B,C,D) or 36-101 (E-EPA,F-EVA,G-ETU) models (ignores delay spread and Ricean factor)
\n
"
);
printf
(
"-x Transmission mode (1,2,6 for the moment)
\n
"
);
printf
(
"-h This message
\n
"
);
printf
(
"-y Number of TX antennas used in eNB
\n
"
);
printf
(
"-z Number of RX antennas used in UE
\n
"
);
//printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n");
//printf("-i Relative strength of first intefering eNB (in dB) - cell_id mod 3 = 1\n");
printf
(
"-I run initial sync with target error rate 0.1
\n
"
);
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
//printf("-j Relative strength of second intefering eNB (in dB) - cell_id mod 3 = 2\n");
printf
(
"-o Carrier frequency offset in Hz
\n
"
);
printf
(
"-L set the log level (-1 disable, 0 error, 1 warning, 2 info, 3 debug, 4 trace)
\n
"
);
printf
(
"-m Numerology index
\n
"
);
printf
(
"-M Multiple SSB positions in burst
\n
"
);
printf
(
"-M Multiple SSB positions in burst
\n
"
);
printf
(
"-n Number of frames to simulate
\n
"
);
printf
(
"-N Nid_cell
\n
"
);
printf
(
"-N Nid_cell
\n
"
);
printf
(
"-o Carrier frequency offset in Hz
\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
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-O oversampling factor (1,2,4,8,16)
\n
"
);
printf
(
"-s Starting SNR, runs from SNR0 to SNR0 + 10 dB if not -S given. If -n 1, then just SNR is simulated
\n
"
);
printf
(
"-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
//printf("-t Delay spread for multipath channel\n");
//printf("-f Output filename (.txt format) for Pe/SNR results\n");
printf
(
"-x Transmission mode (1,2,6 for the moment)
\n
"
);
printf
(
"-F Input filename (.txt format) for RX conformance testing
\n
"
);
printf
(
"-y Number of TX antennas used in eNB
\n
"
);
printf
(
"-z Number of RX antennas used in UE
\n
"
);
exit
(
-
1
);
exit
(
-
1
);
break
;
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment