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
d7abeed6
Commit
d7abeed6
authored
Mar 06, 2019
by
Khalid Ahmed
Committed by
Thomas Schlichter
Mar 07, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Applying LDPC code rate fix at nr_ulsch_encoding
parent
bc53a0a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
12 deletions
+26
-12
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
+26
-12
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c
View file @
d7abeed6
...
@@ -200,18 +200,19 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -200,18 +200,19 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
NR_UL_UE_HARQ_t
*
harq_process
;
NR_UL_UE_HARQ_t
*
harq_process
;
uint16_t
nb_rb
;
uint16_t
nb_rb
;
uint8_t
nb_symb_sch
;
uint8_t
nb_symb_sch
;
uint32_t
A
,
Z
;
uint32_t
A
,
Z
,
F
;
uint32_t
*
pz
;
uint32_t
*
pz
;
uint8_t
mod_order
;
uint8_t
mod_order
;
uint16_t
Kr
,
r
,
r_offset
,
Kr_bytes
;
uint16_t
Kr
,
r
,
r_offset
,
Kr_bytes
;
uint8_t
*
d_tmp
[
MAX_NUM_DLSCH_SEGMENTS
];
uint8_t
*
d_tmp
[
MAX_NUM_DLSCH_SEGMENTS
];
uint8_t
kb
,
BG
;
uint8_t
BG
;
uint32_t
E
;
uint32_t
E
;
uint8_t
Ilbrm
;
uint8_t
Ilbrm
;
uint32_t
Tbslbrm
;
uint32_t
Tbslbrm
;
uint8_t
nb_re_dmrs
;
uint8_t
nb_re_dmrs
;
uint16_t
length_dmrs
;
uint16_t
length_dmrs
;
int
i
;
int
i
;
float
Coderate
;
///////////
///////////
///////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
...
@@ -230,10 +231,12 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -230,10 +231,12 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
Kr
=
0
;
Kr
=
0
;
r_offset
=
0
;
r_offset
=
0
;
BG
=
1
;
BG
=
1
;
F
=
0
;
Ilbrm
=
0
;
Ilbrm
=
0
;
Tbslbrm
=
950984
;
//max tbs
Tbslbrm
=
950984
;
//max tbs
nb_re_dmrs
=
ulsch
->
nb_re_dmrs
;
nb_re_dmrs
=
ulsch
->
nb_re_dmrs
;
length_dmrs
=
1
;
length_dmrs
=
1
;
Coderate
=
0
.
0
;
///////////
///////////
/////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
...
@@ -251,7 +254,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -251,7 +254,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
harq_process
->
Nl
);
G
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
harq_process
->
Nl
);
LOG_D
(
PHY
,
"
d
lsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
LOG_D
(
PHY
,
"
u
lsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
printf
(
"ulsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
printf
(
"ulsch coding A %d G %d mod_order %d
\n
"
,
A
,
G
,
mod_order
);
Tbslbrm
=
nr_compute_tbs
(
28
,
nb_rb
,
frame_parms
->
symbols_per_slot
,
0
,
0
,
harq_process
->
Nl
);
Tbslbrm
=
nr_compute_tbs
(
28
,
nb_rb
,
frame_parms
->
symbols_per_slot
,
0
,
0
,
harq_process
->
Nl
);
...
@@ -266,7 +269,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -266,7 +269,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////
///////////
/*
/*
int i;
int i;
printf("
d
lsch (tx): \n");
printf("
u
lsch (tx): \n");
for (i=0;i<(A>>3);i++)
for (i=0;i<(A>>3);i++)
printf("%02x.",a[i]);
printf("%02x.",a[i]);
printf("\n");
printf("\n");
...
@@ -297,13 +300,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -297,13 +300,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
pz
,
pz
,
&
harq_process
->
F
);
&
harq_process
->
F
);
kb
=
harq_process
->
K
/
(
*
pz
);
F
=
harq_process
->
F
;
if
(
kb
==
22
){
Coderate
=
(
float
)
A
/
(
float
)
G
;
BG
=
1
;
}
if
((
A
<=
292
)
||
((
A
<=
3824
)
&&
(
Coderate
<=
0
.
6667
))
||
Coderate
<=
0
.
25
){
else
{
BG
=
2
;
BG
=
2
;
}
}
else
{
BG
=
1
;
}
Kr
=
harq_process
->
K
;
Kr
=
harq_process
->
K
;
Kr_bytes
=
Kr
>>
3
;
Kr_bytes
=
Kr
>>
3
;
...
@@ -316,7 +321,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -316,7 +321,7 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
///////////////////////// c---->| LDCP coding |---->d /////////////////////////
///////////////////////// c---->| LDCP coding |---->d /////////////////////////
///////////
///////////
//printf("segment Z %d k
b %d k %d Kr %d BG %d\n", *pz,kb
,harq_process->K,Kr,BG);
//printf("segment Z %d k
%d Kr %d BG %d\n", *pz
,harq_process->K,Kr,BG);
//start_meas(te_stats);
//start_meas(te_stats);
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
...
@@ -364,6 +369,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
...
@@ -364,6 +369,15 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch,
}
}
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
// looping over C segments
for
(
r
=
0
;
r
<
harq_process
->
C
;
r
++
)
{
// looping over C segments
if
(
harq_process
->
F
>
0
)
{
for
(
int
k
=
(
Kr
-
F
-
2
*
(
*
pz
));
k
<
Kr
-
2
*
(
*
pz
);
k
++
)
{
harq_process
->
d
[
r
][
k
]
=
NR_NULL
;
//if (k<(Kr-F+8))
//printf("r %d filler bits [%d] = %d \n", r,k, harq_process->d[r][k]);
}
}
#ifdef DEBUG_DLSCH_CODING
#ifdef DEBUG_DLSCH_CODING
printf
(
"Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...
\n
"
,
printf
(
"Rate Matching, Code segment %d (coded bits (G) %d,unpunctured/repeated bits per code segment %d,mod_order %d, nb_rb %d)...
\n
"
,
r
,
r
,
...
...
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