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
promise
OpenXG-RAN
Commits
ad402982
Commit
ad402982
authored
Feb 07, 2019
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ulschsim] Add support fo perfect channel (no noise)
Also print the uncoded error bits
parent
aadc2825
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+6
-2
No files found.
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
ad402982
...
@@ -483,7 +483,7 @@ int main(int argc, char **argv) {
...
@@ -483,7 +483,7 @@ int main(int argc, char **argv) {
double
*
modulated_input
=
malloc16
(
sizeof
(
double
)
*
16
*
68
*
384
);
double
*
modulated_input
=
malloc16
(
sizeof
(
double
)
*
16
*
68
*
384
);
short
*
channel_output_fixed
=
malloc16
(
sizeof
(
short
)
*
16
*
68
*
384
);
short
*
channel_output_fixed
=
malloc16
(
sizeof
(
short
)
*
16
*
68
*
384
);
short
*
channel_output_uncoded
=
malloc16
(
sizeof
(
unsigned
short
)
*
16
*
68
*
384
);
short
*
channel_output_uncoded
=
malloc16
(
sizeof
(
unsigned
short
)
*
16
*
68
*
384
);
double
errors_bit_uncoded
=
0
;
unsigned
int
errors_bit_uncoded
=
0
;
unsigned
char
*
estimated_output
;
unsigned
char
*
estimated_output
;
unsigned
char
*
estimated_output_bit
;
unsigned
char
*
estimated_output_bit
;
unsigned
char
*
test_input_bit
;
unsigned
char
*
test_input_bit
;
...
@@ -543,9 +543,13 @@ int main(int argc, char **argv) {
...
@@ -543,9 +543,13 @@ int main(int argc, char **argv) {
//SNR =10;
//SNR =10;
SNR_lin
=
pow
(
10
,
SNR
/
10
.
0
);
SNR_lin
=
pow
(
10
,
SNR
/
10
.
0
);
sigma
=
1
.
0
/
sqrt
(
2
*
SNR_lin
);
sigma
=
1
.
0
/
sqrt
(
2
*
SNR_lin
);
#if 1
channel_output_fixed
[
i
]
=
(
short
)
quantize
(
sigma
/
4
.
0
/
4
.
0
,
channel_output_fixed
[
i
]
=
(
short
)
quantize
(
sigma
/
4
.
0
/
4
.
0
,
modulated_input
[
i
]
+
sigma
*
gaussdouble
(
0
.
0
,
1
.
0
),
modulated_input
[
i
]
+
sigma
*
gaussdouble
(
0
.
0
,
1
.
0
),
qbits
);
qbits
);
#else
channel_output_fixed
[
i
]
=
(
short
)
quantize
(
0
.
01
,
modulated_input
[
i
],
qbits
);
#endif
//channel_output_fixed[i] = (char)quantize8bit(sigma/4.0,(2.0*modulated_input[i]) - 1.0 + sigma*gaussdouble(0.0,1.0));
//channel_output_fixed[i] = (char)quantize8bit(sigma/4.0,(2.0*modulated_input[i]) - 1.0 + sigma*gaussdouble(0.0,1.0));
//printf("llr[%d]=%d\n",i,channel_output_fixed[i]);
//printf("llr[%d]=%d\n",i,channel_output_fixed[i]);
//printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]);
//printf("channel_output_fixed[%d]: %d\n",i,channel_output_fixed[i]);
...
@@ -565,7 +569,7 @@ int main(int argc, char **argv) {
...
@@ -565,7 +569,7 @@ int main(int argc, char **argv) {
}
}
//if (errors_bit_uncoded>10)
//if (errors_bit_uncoded>10)
//printf("errors bits uncoded %f
\n", errors_bit_uncoded);
printf
(
"errors bits uncoded %u
\n
"
,
errors_bit_uncoded
);
#ifdef DEBUG_CODER
#ifdef DEBUG_CODER
printf
(
"
\n
"
);
printf
(
"
\n
"
);
exit
(
-
1
);
exit
(
-
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