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
wangwenhui
OpenXG-RAN
Commits
f9ca54e9
Commit
f9ca54e9
authored
Mar 09, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crc and tbs fixes in ulsch
parent
631d345d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
15 deletions
+37
-15
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+6
-2
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+4
-4
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+27
-9
No files found.
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
f9ca54e9
...
...
@@ -361,7 +361,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
// harq_process->trials[nfapi_ulsch_pdu_rel15->round]++;
harq_process
->
TBS
=
pusch_pdu
->
pusch_data
.
tb_size
;
A
=
harq_process
->
TBS
;
A
=
(
harq_process
->
TBS
)
<<
3
;
ret
=
ulsch
->
max_ldpc_iterations
+
1
;
LOG_D
(
PHY
,
"ULSCH Decoding, harq_pid %d TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, n_layers %d
\n
"
,
harq_pid
,
A
,
G
,
mcs
,
n_layers
,
nb_rb
,
Qm
,
n_layers
);
...
...
@@ -548,7 +548,11 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
// printf("done\n");
if
(
harq_process
->
C
==
1
)
{
crc_type
=
CRC24_A
;
if
(
A
>
3824
)
crc_type
=
CRC24_A
;
else
crc_type
=
CRC16
;
length_dec
=
harq_process
->
B
;
}
else
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
f9ca54e9
...
...
@@ -1695,10 +1695,10 @@ void nr_dlsch_decoding_process(void *arg)
}
no_iteration_ldpc
=
nrLDPC_decoder
(
p_decParams
,
(
int8_t
*
)
&
pl
[
0
],
llrProcBuf
,
p_nrLDPC_procBuf
,
p_procTime
);
(
int8_t
*
)
&
pl
[
0
],
llrProcBuf
,
p_nrLDPC_procBuf
,
p_procTime
);
// 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
))
{
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
f9ca54e9
...
...
@@ -292,18 +292,36 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
printf("%02x.",a[i]);
printf("\n");
*/
// Add 24-bit crc (polynomial A) to payload
crc
=
crc24a
(
harq_process
->
a
,
A
)
>>
8
;
harq_process
->
a
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
2
];
harq_process
->
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
a
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
//printf("CRC %x (A %d)\n",crc,A);
//printf("a0 %d a1 %d a2 %d\n", a[A>>3], a[1+(A>>3)], a[2+(A>>3)]);
harq_process
->
B
=
A
+
24
;
if
(
A
>
3824
)
{
// Add 24-bit crc (polynomial A) to payload
crc
=
crc24a
(
harq_process
->
a
,
A
)
>>
8
;
harq_process
->
a
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
2
];
harq_process
->
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
a
[
2
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
//printf("CRC %x (A %d)\n",crc,A);
//printf("a0 %d a1 %d a2 %d\n", a[A>>3], a[1+(A>>3)], a[2+(A>>3)]);
memcpy
(
harq_process
->
b
,
harq_process
->
a
,(
A
/
8
)
+
4
)
;
harq_process
->
B
=
A
+
24
;
AssertFatal
((
A
/
8
)
+
4
<=
MAX_NR_ULSCH_PAYLOAD_BYTES
,
"A %d is too big (A/8+4 = %d > %d)
\n
"
,
A
,(
A
/
8
)
+
4
,
MAX_NR_ULSCH_PAYLOAD_BYTES
);
memcpy
(
harq_process
->
b
,
harq_process
->
a
,(
A
/
8
)
+
4
);
}
else
{
// Add 16-bit crc (polynomial A) to payload
crc
=
crc16
(
harq_process
->
a
,
A
)
>>
16
;
harq_process
->
a
[
A
>>
3
]
=
((
uint8_t
*
)
&
crc
)[
1
];
harq_process
->
a
[
1
+
(
A
>>
3
)]
=
((
uint8_t
*
)
&
crc
)[
0
];
//printf("CRC %x (A %d)\n",crc,A);
//printf("a0 %d a1 %d \n", a[A>>3], a[1+(A>>3)]);
harq_process
->
B
=
A
+
16
;
AssertFatal
((
A
/
8
)
+
3
<=
MAX_NR_ULSCH_PAYLOAD_BYTES
,
"A %d is too big (A/8+3 = %d > %d)
\n
"
,
A
,(
A
/
8
)
+
3
,
MAX_NR_ULSCH_PAYLOAD_BYTES
);
memcpy
(
harq_process
->
b
,
harq_process
->
a
,(
A
/
8
)
+
3
);
// using 3 bytes to mimic the case of 24 bit crc
}
///////////
///////////////////////////////////////////////////////////////////////////
...
...
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