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
ZhouShuya
OpenXG-RAN
Commits
20484b5c
Commit
20484b5c
authored
Jan 02, 2020
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NR PDCSH scrambling optimization (factor 10 reduction)
parent
1a83cc2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
7 deletions
+48
-7
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+48
-7
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
20484b5c
...
@@ -65,6 +65,47 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
...
@@ -65,6 +65,47 @@ void nr_pdsch_codeword_scrambling(uint8_t *in,
}
}
void
nr_pdsch_codeword_scrambling_optim
(
uint8_t
*
in
,
uint32_t
size
,
uint8_t
q
,
uint32_t
Nid
,
uint32_t
n_RNTI
,
uint32_t
*
out
)
{
uint32_t
x1
,
x2
,
s
=
0
,
in32
;
x2
=
(
n_RNTI
<<
15
)
+
(
q
<<
14
)
+
Nid
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
1
);
#if defined(__AVX2__)
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
)
{
in32
=
_mm256_movemask_epi8
(
_mm256_slli_epi16
(((
__m256i
*
)
in
)[
i
],
7
));
out
[
i
]
=
(
in32
^
s
);
// printf("in[%d] %x => %x\n",i,in32,out[i]);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
#elif defined(__SSE4__)
_m128i
*
in128
;
for
(
int
i
=
0
;
i
<
((
size
>>
5
)
+
((
size
&
0x1f
)
>
0
?
1
:
0
));
i
++
)
{
in128
=&
((
__m128i
*
)
in
)[
i
<<
1
];
((
uint16_t
*
)
&
in32
)[
0
]
=
_mm128_movemask_epi8
(
_mm256_slli_epi16
(
in128
[
0
],
7
));
((
uint16_t
*
)
&
in32
)[
1
]
=
_mm128_movemask_epi8
(
_mm256_slli_epi16
(
in128
[
1
],
7
));
out
[
i
]
=
(
in32
^
s
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
0
);
}
//#elsif defined(__arm__) || defined(__aarch64)
#else
nr_pdsch_codeword_scrambling
(
in
,
size
,
q
,
Nid
,
n_RNTI
,
out
);
#endif
}
uint8_t
nr_generate_pdsch
(
NR_gNB_DLSCH_t
*
dlsch
,
uint8_t
nr_generate_pdsch
(
NR_gNB_DLSCH_t
*
dlsch
,
uint32_t
***
pdsch_dmrs
,
uint32_t
***
pdsch_dmrs
,
...
@@ -133,13 +174,13 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
...
@@ -133,13 +174,13 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t *dlsch,
for
(
int
q
=
0
;
q
<
rel15
->
NrOfCodewords
;
q
++
)
for
(
int
q
=
0
;
q
<
rel15
->
NrOfCodewords
;
q
++
)
memset
((
void
*
)
scrambled_output
[
q
],
0
,
(
encoded_length
>>
5
)
*
sizeof
(
uint32_t
));
memset
((
void
*
)
scrambled_output
[
q
],
0
,
(
encoded_length
>>
5
)
*
sizeof
(
uint32_t
));
for
(
int
q
=
0
;
q
<
rel15
->
NrOfCodewords
;
q
++
)
for
(
int
q
=
0
;
q
<
rel15
->
NrOfCodewords
;
q
++
)
nr_pdsch_codeword_scrambling
(
harq
->
f
,
nr_pdsch_codeword_scrambling
_optim
(
harq
->
f
,
encoded_length
,
encoded_length
,
q
,
q
,
rel15
->
dlDmrsScramblingId
,
rel15
->
dlDmrsScramblingId
,
rel15
->
rnti
,
rel15
->
rnti
,
scrambled_output
[
q
]);
scrambled_output
[
q
]);
stop_meas
(
dlsch_scrambling_stats
);
stop_meas
(
dlsch_scrambling_stats
);
#ifdef DEBUG_DLSCH
#ifdef DEBUG_DLSCH
printf
(
"PDSCH scrambling:
\n
"
);
printf
(
"PDSCH scrambling:
\n
"
);
...
...
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