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
alex037yang
OpenXG-RAN
Commits
1488750d
Commit
1488750d
authored
Nov 27, 2020
by
Khodr Saaifan
Committed by
Thomas Schlichter
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix LDPC ULSCH decoding (CRC NOK) for short LDPC code, e.g. Z_c is not multiple of 8
parent
334bf336
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+15
-24
No files found.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
1488750d
...
@@ -292,7 +292,7 @@ void nr_processULSegment(void* arg) {
...
@@ -292,7 +292,7 @@ void nr_processULSegment(void* arg) {
int
no_iteration_ldpc
;
int
no_iteration_ldpc
;
int
Kr
;
int
Kr
;
int
Kr_bytes
;
int
Kr_bytes
;
int
K_b
yte
s_F
;
int
K_b
it
s_F
;
uint8_t
crc_type
;
uint8_t
crc_type
;
int
i
;
int
i
;
int
j
;
int
j
;
...
@@ -318,8 +318,7 @@ void nr_processULSegment(void* arg) {
...
@@ -318,8 +318,7 @@ void nr_processULSegment(void* arg) {
Kr
=
ulsch_harq
->
K
;
Kr
=
ulsch_harq
->
K
;
Kr_bytes
=
Kr
>>
3
;
Kr_bytes
=
Kr
>>
3
;
K_bits_F
=
Kr
-
ulsch_harq
->
F
;
K_bytes_F
=
Kr_bytes
-
(
ulsch_harq
->
F
>>
3
);
t_nrLDPC_time_stats
procTime
;
t_nrLDPC_time_stats
procTime
;
t_nrLDPC_time_stats
*
p_procTime
=
&
procTime
;
t_nrLDPC_time_stats
*
p_procTime
=
&
procTime
;
...
@@ -402,23 +401,19 @@ void nr_processULSegment(void* arg) {
...
@@ -402,23 +401,19 @@ void nr_processULSegment(void* arg) {
//start_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats);
//start_meas(&phy_vars_gNB->ulsch_ldpc_decoding_stats);
memset
(
pv
,
0
,
2
*
ulsch_harq
->
Z
*
sizeof
(
int16_t
));
//set first 2*Z_c bits to zeros
memset
((
pv
+
K_bytes_F
),
127
,
ulsch_harq
->
F
*
sizeof
(
int16_t
));
memset
(
&
z
[
0
],
0
,
2
*
ulsch_harq
->
Z
*
sizeof
(
int16_t
));
//set Filler bits
for
(
i
=
((
2
*
p_decoderParms
->
Z
)
>>
3
),
j
=
0
;
i
<
K_bytes_F
;
i
++
,
j
++
)
{
memset
((
&
z
[
0
]
+
K_bits_F
),
127
,
ulsch_harq
->
F
*
sizeof
(
int16_t
));
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
ulsch_harq
->
d
[
r
][
8
*
j
]));
//Move coded bits before filler bits
}
memcpy
((
&
z
[
0
]
+
2
*
ulsch_harq
->
Z
),
ulsch_harq
->
d
[
r
],(
K_bits_F
-
2
*
ulsch_harq
->
Z
)
*
sizeof
(
int16_t
));
//skip filler bits
AssertFatal
(
kc
!=
255
,
""
);
memcpy
((
&
z
[
0
]
+
Kr
),
ulsch_harq
->
d
[
r
]
+
(
Kr
-
2
*
ulsch_harq
->
Z
),(
kc
*
ulsch_harq
->
Z
-
Kr
)
*
sizeof
(
int16_t
));
j
+=
(
ulsch_harq
->
F
>>
3
);
//Saturate coded bits before decoding into 8 bits values
for
(
i
=
Kr_bytes
;
i
<
((
kc
*
p_decoderParms
->
Z
)
>>
3
);
i
++
,
j
++
)
{
for
(
i
=
0
,
j
=
0
;
j
<
((
kc
*
ulsch_harq
->
Z
)
>>
4
)
+
1
;
i
+=
2
,
j
++
)
pv
[
i
]
=
_mm_loadu_si128
((
__m128i
*
)(
&
ulsch_harq
->
d
[
r
][
8
*
j
]));
{
}
for
(
i
=
0
,
j
=
0
;
j
<
((
kc
*
p_decoderParms
->
Z
)
>>
4
);
i
+=
2
,
j
++
)
{
pl
[
j
]
=
_mm_packs_epi16
(
pv
[
i
],
pv
[
i
+
1
]);
pl
[
j
]
=
_mm_packs_epi16
(
pv
[
i
],
pv
[
i
+
1
]);
}
}
//////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
...
@@ -523,31 +518,27 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -523,31 +518,27 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
p_decParams
->
BG
=
2
;
p_decParams
->
BG
=
2
;
kc
=
52
;
if
(
Coderate
<
0
.
3333
)
{
if
(
Coderate
<
0
.
3333
)
{
p_decParams
->
R
=
15
;
p_decParams
->
R
=
15
;
kc
=
52
;
}
}
else
if
(
Coderate
<
0
.
6667
)
{
else
if
(
Coderate
<
0
.
6667
)
{
p_decParams
->
R
=
13
;
p_decParams
->
R
=
13
;
kc
=
32
;
}
}
else
{
else
{
p_decParams
->
R
=
23
;
p_decParams
->
R
=
23
;
kc
=
17
;
}
}
}
else
{
}
else
{
p_decParams
->
BG
=
1
;
p_decParams
->
BG
=
1
;
kc
=
68
;
if
(
Coderate
<
0
.
6667
)
{
if
(
Coderate
<
0
.
6667
)
{
p_decParams
->
R
=
13
;
p_decParams
->
R
=
13
;
kc
=
68
;
}
}
else
if
(
Coderate
<
0
.
8889
)
{
else
if
(
Coderate
<
0
.
8889
)
{
p_decParams
->
R
=
23
;
p_decParams
->
R
=
23
;
kc
=
35
;
}
}
else
{
else
{
p_decParams
->
R
=
89
;
p_decParams
->
R
=
89
;
kc
=
27
;
}
}
}
}
...
...
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