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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
3a5df627
Commit
3a5df627
authored
Feb 25, 2026
by
Raymond Knopp
Committed by
Robert Schmidt
Mar 17, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rate match simd
parent
9f8d4452
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
91 additions
and
0 deletions
+91
-0
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
...NG/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
+91
-0
No files found.
openair1/PHY/CODING/nrLDPC_coding/nrLDPC_coding_segment/nr_rate_matching.c
View file @
3a5df627
...
...
@@ -610,6 +610,82 @@ int nr_rate_matching_ldpc(uint32_t Tbslbrm,
return
0
;
}
#define RMLOOP for (;ind<(ind2&7);k+=8,ind+=8) \
simde_mm_storeu_si128(&d[ind],simde_mm_adds_epi16(simde_mm_loadu_si128(&soft_input[k]),simde_mm_loadu_si128(&d[ind])));\
for (; ind<ind2 ; ind++,k++) d[ind] += soft_input[k];
int
nr_rate_matching_ldpc_rx_simd
(
uint32_t
Tbslbrm
,
uint8_t
BG
,
uint16_t
Z
,
int16_t
*
d
,
int16_t
*
soft_input
,
uint8_t
C
,
uint8_t
rvidx
,
uint8_t
clear
,
uint32_t
E
,
uint32_t
F
,
uint32_t
Foffset
)
{
if
(
C
==
0
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter C %d
\n
"
,
C
);
return
-
1
;
}
//Bit selection
uint32_t
N
=
(
BG
==
1
)
?
(
66
*
Z
)
:
(
50
*
Z
);
uint32_t
Ncb
;
if
(
Tbslbrm
==
0
)
Ncb
=
N
;
else
{
uint32_t
Nref
=
(
3
*
Tbslbrm
/
(
2
*
C
));
//R_LBRM = 2/3
Ncb
=
min
(
N
,
Nref
);
}
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
;
}
if
(
Foffset
>
Ncb
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameters (Foffset %d > Ncb %d)
\n
"
,
Foffset
,
Ncb
);
return
-
1
;
}
#ifdef RM_DEBUG
printf
(
"nr_rate_matching_ldpc_rx: Clear %d, E %u, Foffset %u, k0 %u, Ncb %u, rvidx %d, Tbslbrm %u
\n
"
,
clear
,
E
,
Foffset
,
ind
,
Ncb
,
rvidx
,
Tbslbrm
);
#endif
if
(
clear
==
1
)
memset
(
d
,
0
,
Ncb
*
sizeof
(
int16_t
));
uint32_t
k
=
0
;
if
(
ind
<
Foffset
)
{
int
ind2
=
ind
+
min
(
Foffset
-
ind
,
E
);
RMLOOP
;
}
if
(
ind
>=
Foffset
&&
ind
<
Foffset
+
F
)
ind
=
Foffset
+
F
;
int
ind2
=
ind
+
min
(
Ncb
-
ind
,
E
-
k
);
RMLOOP
;
while
(
k
<
E
)
{
ind
=
0
;
ind2
=
min
(
Foffset
,
E
-
k
);
RMLOOP
;
ind
=
Foffset
+
F
;
ind2
=
ind
+
min
(
Ncb
-
ind
,
E
-
k
);
RMLOOP
;
}
return
0
;
}
int
nr_rate_matching_ldpc_rx
(
uint32_t
Tbslbrm
,
uint8_t
BG
,
uint16_t
Z
,
...
...
@@ -622,6 +698,21 @@ int nr_rate_matching_ldpc_rx(uint32_t Tbslbrm,
uint32_t
F
,
uint32_t
Foffset
)
{
if
(
BG
==
1
)
{
nr_rate_matching_ldpc_rx_simd
(
Tbslbrm
,
BG
,
Z
,
d
,
soft_input
,
C
,
rvidx
,
clear
,
E
,
F
,
Foffset
);
return
0
;
}
if
(
C
==
0
)
{
LOG_E
(
PHY
,
"nr_rate_matching: invalid parameter C %d
\n
"
,
C
);
return
-
1
;
...
...
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