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
815658b0
Commit
815658b0
authored
Dec 10, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check_crc fix
parent
9c1be1b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
openair1/PHY/CODING/crc_byte.c
openair1/PHY/CODING/crc_byte.c
+5
-10
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+3
-4
No files found.
openair1/PHY/CODING/crc_byte.c
View file @
815658b0
...
...
@@ -259,7 +259,7 @@ unsigned int crcPayload(unsigned char * inptr, int bitlen, uint32_t* crc256Table
int
check_crc
(
uint8_t
*
decoded_bytes
,
uint32_t
n
,
uint32_t
F
,
uint8_t
crc_type
)
{
uint32_t
crc
,
oldcrc
;
uint32_t
crc
=
0
,
oldcrc
=
0
;
uint8_t
crc_len
,
temp
;
switch
(
crc_type
)
{
...
...
@@ -280,17 +280,15 @@ int check_crc(uint8_t* decoded_bytes, uint32_t n, uint32_t F, uint8_t crc_type)
crc_len
=
3
;
}
oldcrc
=
*
((
unsigned
int
*
)(
&
decoded_bytes
[(
n
>>
3
)
-
crc_len
]));
for
(
int
i
=
0
;
i
<
crc_len
;
i
++
)
oldcrc
|=
(
decoded_bytes
[(
n
>>
3
)
-
crc_len
+
i
])
<<
((
crc_len
-
1
-
i
)
<<
3
);
switch
(
crc_type
)
{
case
CRC24_A
:
oldcrc
&=
0x00ffffff
;
crc
=
crc24a
(
&
decoded_bytes
[
F
>>
3
],
n
-
24
-
F
)
>>
8
;
temp
=
((
uint8_t
*
)
&
crc
)[
2
];
((
uint8_t
*
)
&
crc
)[
2
]
=
((
uint8_t
*
)
&
crc
)[
0
];
((
uint8_t
*
)
&
crc
)[
0
]
=
temp
;
crc
=
crc24a
(
decoded_bytes
,
n
-
24
)
>>
8
;
break
;
...
...
@@ -298,9 +296,6 @@ int check_crc(uint8_t* decoded_bytes, uint32_t n, uint32_t F, uint8_t crc_type)
oldcrc
&=
0x00ffffff
;
crc
=
crc24b
(
decoded_bytes
,
n
-
24
)
>>
8
;
temp
=
((
uint8_t
*
)
&
crc
)[
2
];
((
uint8_t
*
)
&
crc
)[
2
]
=
((
uint8_t
*
)
&
crc
)[
0
];
((
uint8_t
*
)
&
crc
)[
0
]
=
temp
;
break
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
815658b0
...
...
@@ -508,8 +508,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
llrProcBuf
,
p_procTime
);
/*
if (check_crc(llrProcBuf,Kr,harq_process->F,crc_type)) {
if
(
check_crc
(
llrProcBuf
,
harq_process
->
B
,
harq_process
->
F
,
crc_type
))
{
printf
(
"CRC OK
\n
"
);
ret
=
2
;
}
...
...
@@ -517,7 +516,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
printf
(
"CRC NOK
\n
"
);
ret
=
1
+
dlsch
->
max_ldpc_iterations
;
}
*/
nb_total_decod
++
;
if
(
no_iteration_ldpc
>
dlsch
->
max_ldpc_iterations
){
...
...
@@ -539,7 +538,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
#ifdef DEBUG_DLSCH_DECODING
//printf("output decoder %d %d %d %d %d \n", harq_process->c[r][0], harq_process->c[r][1], harq_process->c[r][2],harq_process->c[r][3], harq_process->c[r][4]);
for
(
int
k
=
0
;
k
<
32
;
k
++
)
for
(
int
k
=
0
;
k
<
A
>>
3
;
k
++
)
printf
(
"output decoder [%d] = 0x%02x
\n
"
,
k
,
harq_process
->
c
[
r
][
k
]);
printf
(
"no_iterations_ldpc %d (ret %d)
\n
"
,
no_iteration_ldpc
,
ret
);
//write_output("dec_output.m","dec0",harq_process->c[0],Kr_bytes,1,4);
...
...
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