Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
lizhongxiao
OpenXG-RAN
Commits
513eebee
Commit
513eebee
authored
Jan 06, 2022
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add nr_pbchsim option to select random number seed
parent
b6b79d55
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
openair1/SIMULATION/NR_PHY/pbchsim.c
openair1/SIMULATION/NR_PHY/pbchsim.c
+11
-4
No files found.
openair1/SIMULATION/NR_PHY/pbchsim.c
View file @
513eebee
...
@@ -203,15 +203,15 @@ int main(int argc, char **argv)
...
@@ -203,15 +203,15 @@ int main(int argc, char **argv)
float
target_error_rate
=
0
.
01
;
float
target_error_rate
=
0
.
01
;
int
seed
=
0
;
cpuf
=
get_cpu_freq_GHz
();
cpuf
=
get_cpu_freq_GHz
();
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
if
(
load_configmodule
(
argc
,
argv
,
CONFIG_ENABLECMDLINEONLY
)
==
0
)
{
exit_fun
(
"[NR_PBCHSIM] Error, configuration module init failed
\n
"
);
exit_fun
(
"[NR_PBCHSIM] Error, configuration module init failed
\n
"
);
}
}
randominit
(
0
);
while
((
c
=
getopt
(
argc
,
argv
,
"F:g:hIL:m:M:n:N:o:P:r:R:s:S:x:y:z:"
))
!=
-
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;
...
@@ -336,6 +336,10 @@ int main(int argc, char **argv)
...
@@ -336,6 +336,10 @@ int main(int argc, char **argv)
break;
break;
*/
*/
case
'r'
:
seed
=
atoi
(
optarg
);
break
;
case
'R'
:
case
'R'
:
N_RB_DL
=
atoi
(
optarg
);
N_RB_DL
=
atoi
(
optarg
);
break
;
break
;
...
@@ -389,7 +393,7 @@ int main(int argc, char **argv)
...
@@ -389,7 +393,7 @@ int main(int argc, char **argv)
default:
default:
case
'h'
:
case
'h'
:
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
"
,
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
]);
argv
[
0
]);
//printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n");
//printf("-A Interpolation_filname Run with Abstraction to generate Scatter plot using interpolation polynomial in file\n");
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
//printf("-C Generate Calibration information for Abstraction (effective SNR adjustment to remove Pe bias w.r.t. AWGN)\n");
...
@@ -410,6 +414,7 @@ int main(int argc, char **argv)
...
@@ -410,6 +414,7 @@ int main(int argc, char **argv)
//printf("-O oversampling factor (1,2,4,8,16)\n");
//printf("-O oversampling factor (1,2,4,8,16)\n");
//printf("-p Use extended prefix mode\n");
//printf("-p Use extended prefix mode\n");
printf
(
"-P PBCH phase, allowed values 0-3
\n
"
);
printf
(
"-P PBCH phase, allowed values 0-3
\n
"
);
printf
(
"-r set the random number generator seed (default: 0 = current time)
\n
"
);
printf
(
"-R N_RB_DL
\n
"
);
printf
(
"-R N_RB_DL
\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
(
"-s Starting SNR, runs from SNR0 to SNR0 + 10 dB if not -S given. If -n 1, then just SNR is simulated
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
printf
(
"-S Ending SNR, runs from SNR0 to SNR1
\n
"
);
...
@@ -422,6 +427,8 @@ int main(int argc, char **argv)
...
@@ -422,6 +427,8 @@ int main(int argc, char **argv)
}
}
}
}
randominit
(
seed
);
logInit
();
logInit
();
set_glog
(
loglvl
);
set_glog
(
loglvl
);
T_stdout
=
1
;
T_stdout
=
1
;
...
...
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