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
18500674
Commit
18500674
authored
Aug 12, 2022
by
Thomas Schlichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve nr_dlsch_decoding
parent
11693b16
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+14
-19
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
18500674
...
@@ -259,7 +259,6 @@ void nr_processDLSegment(void* arg) {
...
@@ -259,7 +259,6 @@ void nr_processDLSegment(void* arg) {
int
length_dec
;
int
length_dec
;
int
no_iteration_ldpc
;
int
no_iteration_ldpc
;
int
Kr
;
int
Kr
;
int
Kr_bytes
;
int
K_bits_F
;
int
K_bits_F
;
uint8_t
crc_type
;
uint8_t
crc_type
;
int
i
;
int
i
;
...
@@ -282,8 +281,7 @@ void nr_processDLSegment(void* arg) {
...
@@ -282,8 +281,7 @@ void nr_processDLSegment(void* arg) {
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pv
=
(
__m128i
*
)
&
z
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
__m128i
*
pl
=
(
__m128i
*
)
&
l
;
Kr
=
harq_process
->
K
;
// [hna] overwrites this line "Kr = p_decParams->Z*kb"
Kr
=
harq_process
->
K
;
Kr_bytes
=
Kr
>>
3
;
K_bits_F
=
Kr
-
harq_process
->
F
;
K_bits_F
=
Kr
-
harq_process
->
F
;
t_nrLDPC_time_stats
procTime
=
{
0
};
t_nrLDPC_time_stats
procTime
=
{
0
};
...
@@ -293,8 +291,7 @@ void nr_processDLSegment(void* arg) {
...
@@ -293,8 +291,7 @@ void nr_processDLSegment(void* arg) {
start_meas
(
&
rdata
->
ts_deinterleave
);
start_meas
(
&
rdata
->
ts_deinterleave
);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_DEINTERLEAVING, VCD_FUNCTION_IN);
int16_t
w
[
E
];
int16_t
w
[
E
];
memset
(
w
,
0
,
sizeof
(
w
));
nr_deinterleaving_ldpc
(
E
,
nr_deinterleaving_ldpc
(
E
,
Qm
,
Qm
,
w
,
// [hna] w is e
w
,
// [hna] w is e
...
@@ -321,7 +318,7 @@ void nr_processDLSegment(void* arg) {
...
@@ -321,7 +318,7 @@ void nr_processDLSegment(void* arg) {
w
,
w
,
harq_process
->
C
,
harq_process
->
C
,
harq_process
->
rvidx
,
harq_process
->
rvidx
,
(
harq_process
->
first_rx
==
1
)
?
1
:
0
,
harq_process
->
first_rx
,
E
,
E
,
harq_process
->
F
,
harq_process
->
F
,
Kr
-
harq_process
->
F
-
2
*
(
p_decoderParms
->
Z
))
==-
1
)
{
Kr
-
harq_process
->
F
-
2
*
(
p_decoderParms
->
Z
))
==-
1
)
{
...
@@ -333,8 +330,6 @@ void nr_processDLSegment(void* arg) {
...
@@ -333,8 +330,6 @@ void nr_processDLSegment(void* arg) {
}
}
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
stop_meas
(
&
rdata
->
ts_rate_unmatch
);
r_offset
+=
E
;
if
(
LOG_DEBUGFLAG
(
DEBUG_DLSCH_DECOD
))
{
if
(
LOG_DEBUGFLAG
(
DEBUG_DLSCH_DECOD
))
{
LOG_D
(
PHY
,
"decoder input(segment %u) :"
,
r
);
LOG_D
(
PHY
,
"decoder input(segment %u) :"
,
r
);
...
@@ -344,8 +339,6 @@ void nr_processDLSegment(void* arg) {
...
@@ -344,8 +339,6 @@ void nr_processDLSegment(void* arg) {
LOG_D
(
PHY
,
"
\n
"
);
LOG_D
(
PHY
,
"
\n
"
);
}
}
memset
(
harq_process
->
c
[
r
],
0
,
Kr_bytes
);
if
(
harq_process
->
C
==
1
)
{
if
(
harq_process
->
C
==
1
)
{
if
(
A
>
NR_MAX_PDSCH_TBS
)
if
(
A
>
NR_MAX_PDSCH_TBS
)
crc_type
=
CRC24_A
;
crc_type
=
CRC24_A
;
...
@@ -383,21 +376,23 @@ void nr_processDLSegment(void* arg) {
...
@@ -383,21 +376,23 @@ void nr_processDLSegment(void* arg) {
&
procTime
);
&
procTime
);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_OUT);
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_OUT);
LOG_D
(
PHY
,
"no_iteration_ldpc = %d
\n
"
,
no_iteration_ldpc
);
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
if
(
check_crc
((
uint8_t
*
)
llrProcBuf
,
length_dec
,
harq_process
->
F
,
crc_type
))
{
LOG_D
(
PHY
,
"Segment %u CRC OK
\n
"
,
r
);
LOG_D
(
PHY
,
"Segment %u CRC OK
\n
"
,
r
);
if
(
no_iteration_ldpc
>
dlsch
->
max_ldpc_iterations
)
if
(
r
==
0
)
{
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
LOG_D
(
PHY
,
"byte %d : %x
\n
"
,
i
,((
uint8_t
*
)
llrProcBuf
)[
i
]);
}
//Temporary hack
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
;
rdata
->
decodeIterations
=
no_iteration_ldpc
;
}
else
{
}
else
{
LOG_D
(
PHY
,
"CRC NOT OK
\n
"
);
LOG_D
(
PHY
,
"CRC NOT OK
\n
"
);
no_iteration_ldpc
=
dlsch
->
max_ldpc_iterations
+
1
;
}
}
if
(
r
==
0
)
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
LOG_D
(
PHY
,
"byte %d : %x
\n
"
,
i
,((
uint8_t
*
)
llrProcBuf
)[
i
]);
}
rdata
->
decodeIterations
=
no_iteration_ldpc
;
nb_total_decod
++
;
nb_total_decod
++
;
if
(
no_iteration_ldpc
>
dlsch
->
max_ldpc_iterations
)
{
if
(
no_iteration_ldpc
>
dlsch
->
max_ldpc_iterations
)
{
...
@@ -547,7 +542,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -547,7 +542,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
}
}
if
(
LOG_DEBUGFLAG
(
DEBUG_DLSCH_DECOD
)
&&
(
!
frame
%
100
))
if
(
LOG_DEBUGFLAG
(
DEBUG_DLSCH_DECOD
)
&&
(
!
frame
%
100
))
LOG_I
(
PHY
,
"K %d C %d Z %d nl %d
\n
"
,
harq_process
->
K
,
harq_process
->
C
,
p_decParam
s
->
Z
,
harq_process
->
Nl
);
LOG_I
(
PHY
,
"K %d C %d Z %d nl %d
\n
"
,
harq_process
->
K
,
harq_process
->
C
,
harq_proces
s
->
Z
,
harq_process
->
Nl
);
}
}
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_OUT
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_SEGMENTATION
,
VCD_FUNCTION_OUT
);
...
...
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