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
178f8629
Commit
178f8629
authored
Sep 27, 2022
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nr_ulsim: fix calculation of statistics
parent
c15756b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+8
-8
No files found.
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
178f8629
...
...
@@ -1069,16 +1069,17 @@ int main(int argc, char **argv)
double
blerStats
[
4
][
100
];
double
berStats
[
4
][
100
];
double
snrStats
[
100
];
memset
(
errors_scrambling
,
0
,
sizeof
(
uint32_t
)
*
4
*
100
);
memset
(
n_errors
,
0
,
sizeof
(
int
)
*
4
*
100
);
memset
(
round_trials
,
0
,
sizeof
(
int
)
*
4
*
100
);
memset
(
blerStats
,
0
,
sizeof
(
double
)
*
4
*
100
);
memset
(
berStats
,
0
,
sizeof
(
double
)
*
4
*
100
);
memset
(
snrStats
,
0
,
sizeof
(
double
)
*
100
);
memset
(
errors_scrambling
,
0
,
sizeof
(
errors_scrambling
)
);
memset
(
n_errors
,
0
,
sizeof
(
n_errors
)
);
memset
(
round_trials
,
0
,
sizeof
(
round_trials
)
);
memset
(
blerStats
,
0
,
sizeof
(
blerStats
)
);
memset
(
berStats
,
0
,
sizeof
(
berStats
)
);
memset
(
snrStats
,
0
,
sizeof
(
snrStats
)
);
for
(
SNR
=
snr0
;
SNR
<
snr1
;
SNR
+=
snr_step
)
{
varArray_t
*
table_rx
=
initVarArray
(
1000
,
sizeof
(
double
));
int
error_flag
=
0
;
n_false_positive
=
0
;
roundStats
[
snrRun
]
=
0
;
effRate
[
snrRun
]
=
0
;
effTP
[
snrRun
]
=
0
;
reset_meas
(
&
gNB
->
phy_proc_rx
);
...
...
@@ -1103,7 +1104,6 @@ int main(int argc, char **argv)
crc_status
=
1
;
errors_decoding
=
0
;
memset
((
void
*
)
roundStats
,
0
,
50
*
sizeof
(
roundStats
[
0
]));
while
(
round
<
max_rounds
&&
crc_status
)
{
round_trials
[
round
][
snrRun
]
++
;
ulsch_ue
->
harq_processes
[
harq_pid
]
->
round
=
round
;
...
...
@@ -1581,7 +1581,7 @@ int main(int argc, char **argv)
effRate
[
snrRun
]
/=
(
double
)
n_trials
;
printf
(
"*****************************************
\n
"
);
printf
(
"SNR %f: n_errors (%d/%d,%d/%d,%d/%d,%d/%d) (negative CRC), false_positive %d/%d, errors_scrambling (%u/%u,%u/%u,%u/%u,%u/%u
\n
"
,
SNR
,
n_errors
[
0
][
snrRun
],
round_trials
[
0
][
snrRun
],
n_errors
[
1
][
snrRun
],
round_trials
[
1
][
snrRun
],
n_errors
[
2
][
snrRun
],
round_trials
[
2
][
snrRun
],
n_errors
[
3
][
snrRun
],
round_trials
[
3
][
snrRun
],
n_false_positive
,
n_trials
,
errors_scrambling
[
0
][
snrRun
],
available_bits
*
n_trials
,
errors_scrambling
[
1
][
snrRun
],
available_bits
*
n_trials
,
errors_scrambling
[
2
][
snrRun
],
available_bits
*
n_trials
,
errors_scrambling
[
3
][
snrRun
],
available_bits
*
n_trials
);
printf
(
"SNR %f: n_errors (%d/%d,%d/%d,%d/%d,%d/%d) (negative CRC), false_positive %d/%d, errors_scrambling (%u/%u,%u/%u,%u/%u,%u/%u
\n
"
,
SNR
,
n_errors
[
0
][
snrRun
],
round_trials
[
0
][
snrRun
],
n_errors
[
1
][
snrRun
],
round_trials
[
1
][
snrRun
],
n_errors
[
2
][
snrRun
],
round_trials
[
2
][
snrRun
],
n_errors
[
3
][
snrRun
],
round_trials
[
3
][
snrRun
],
n_false_positive
,
n_trials
,
errors_scrambling
[
0
][
snrRun
],
available_bits
*
round_trials
[
0
][
snrRun
],
errors_scrambling
[
1
][
snrRun
],
available_bits
*
round_trials
[
1
][
snrRun
],
errors_scrambling
[
2
][
snrRun
],
available_bits
*
round_trials
[
2
][
snrRun
],
errors_scrambling
[
3
][
snrRun
],
available_bits
*
round_trials
[
3
][
snrRun
]
);
printf
(
"
\n
"
);
blerStats
[
0
][
snrRun
]
=
(
double
)
n_errors
[
0
][
snrRun
]
/
round_trials
[
0
][
snrRun
];
blerStats
[
1
][
snrRun
]
=
(
double
)
n_errors
[
1
][
snrRun
]
/
round_trials
[
1
][
snrRun
];
...
...
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