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
littleBu
OpenXG-RAN
Commits
3bfb9529
Commit
3bfb9529
authored
Sep 17, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rate matching formatting
parent
fc52fb8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
23 deletions
+14
-23
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
...NG/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
+14
-23
No files found.
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
View file @
3bfb9529
...
...
@@ -380,24 +380,22 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm,
uint8_t
rvidx
,
uint32_t
E
)
{
uint32_t
Ncb
,
ind
,
k
=
0
,
Nref
,
N
;
if
(
C
==
0
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter
s (
C %d
\n
"
,
C
);
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter
C %d
\n
"
,
C
);
return
-
1
;
}
//
Bit selection
N
=
(
BG
==
1
)
?
(
66
*
Z
)
:
(
50
*
Z
);
//Bit selection
uint32_t
N
=
(
BG
==
1
)
?
(
66
*
Z
)
:
(
50
*
Z
);
uint32_t
Ncb
;
if
(
Tbslbrm
==
0
)
Ncb
=
N
;
else
{
Nref
=
3
*
Tbslbrm
/
(
2
*
C
);
//
R_LBRM = 2/3
uint32_t
Nref
=
3
*
Tbslbrm
/
(
2
*
C
);
//
R_LBRM = 2/3
Ncb
=
min
(
N
,
Nref
);
}
ind
=
(
index_k0
[
BG
-
1
][
rvidx
]
*
Ncb
/
N
)
*
Z
;
uint32_t
ind
=
(
index_k0
[
BG
-
1
][
rvidx
]
*
Ncb
/
N
)
*
Z
;
#ifdef RM_DEBUG
printf
(
"nr_rate_matching_ldpc: E %u, F %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u
\n
"
,
...
...
@@ -430,6 +428,7 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm,
if
(
ind
>=
Foffset
&&
ind
<
(
F
+
Foffset
))
ind
=
F
+
Foffset
;
uint32_t
k
=
0
;
if
(
ind
<
Foffset
)
{
// case where we have some bits before the filler and the rest after
memcpy
((
void
*
)
e
,
(
void
*
)(
d
+
ind
),
Foffset
-
ind
);
...
...
@@ -476,28 +475,22 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
uint32_t
F
,
uint32_t
Foffset
)
{
uint32_t
Ncb
,
ind
,
k
,
Nref
,
N
;
#ifdef RM_DEBUG
int
nulled
=
0
;
#endif
if
(
C
==
0
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter
s (
C %d
\n
"
,
C
);
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter
C %d
\n
"
,
C
);
return
-
1
;
}
//
Bit selection
N
=
(
BG
==
1
)
?
(
66
*
Z
)
:
(
50
*
Z
);
//Bit selection
uint32_t
N
=
(
BG
==
1
)
?
(
66
*
Z
)
:
(
50
*
Z
);
uint32_t
Ncb
;
if
(
Tbslbrm
==
0
)
Ncb
=
N
;
else
{
Nref
=
(
3
*
Tbslbrm
/
(
2
*
C
));
//
R_LBRM = 2/3
uint32_t
Nref
=
(
3
*
Tbslbrm
/
(
2
*
C
));
//
R_LBRM = 2/3
Ncb
=
min
(
N
,
Nref
);
}
ind
=
(
index_k0
[
BG
-
1
][
rvidx
]
*
Ncb
/
N
)
*
Z
;
uint32_t
ind
=
(
index_k0
[
BG
-
1
][
rvidx
]
*
Ncb
/
N
)
*
Z
;
if
(
Foffset
>
E
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameters (Foffset %d > E %d)
\n
"
,
Foffset
,
E
);
return
-
1
;
...
...
@@ -521,8 +514,7 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
if
(
clear
==
1
)
memset
(
d
,
0
,
Ncb
*
sizeof
(
int16_t
));
k
=
0
;
uint32_t
k
=
0
;
if
(
ind
<
Foffset
)
for
(;
(
ind
<
Foffset
)
&&
(
k
<
E
);
ind
++
)
{
#ifdef RM_DEBUG
...
...
@@ -566,6 +558,5 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
#endif
}
}
return
0
;
}
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