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
debd35a8
Commit
debd35a8
authored
Sep 26, 2023
by
luis_pereira87
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply function with better performance to reverse bits for polar encoder/decoder in PBCH
parent
2360925e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+1
-3
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+1
-5
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
debd35a8
...
...
@@ -236,7 +236,6 @@ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
uint16_t
M
;
uint8_t
nushift
;
uint32_t
unscrambling_mask
;
uint64_t
a_reversed
=
0
;
LOG_D
(
PHY
,
"PBCH generation started
\n
"
);
///Payload generation
NR_gNB_PBCH
m_pbch
;
...
...
@@ -298,8 +297,7 @@ int nr_generate_pbch(nfapi_nr_dl_tti_ssb_pdu *ssb_pdu,
#endif
// Encoder reversal
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
;
i
++
)
a_reversed
|=
(((
uint64_t
)
pbch
->
pbch_a_prime
>>
i
)
&
1
)
<<
(
31
-
i
);
uint64_t
a_reversed
=
reverse_bits
((
uint64_t
)
pbch
->
pbch_a_prime
,
NR_POLAR_PBCH_PAYLOAD_BITS
);
/// CRC, coding and rate matching
polar_encoder_fast
(
&
a_reversed
,
(
void
*
)
pbch
->
pbch_e
,
0
,
0
,
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
debd35a8
...
...
@@ -493,12 +493,8 @@ int nr_rx_pbch(PHY_VARS_NR_UE *ue,
}
// printf("polar decoder output 0x%08x\n",pbch_a_prime);
// Decoder reversal
uint32_t
a_reversed
=
0
;
pbch_a_prime
=
(
uint32_t
)
reverse_bits
(
pbch_a_prime
,
NR_POLAR_PBCH_PAYLOAD_BITS
)
;
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
;
i
++
)
a_reversed
|=
(((
uint64_t
)
pbch_a_prime
>>
i
)
&
1
)
<<
(
31
-
i
);
pbch_a_prime
=
a_reversed
;
//payload un-scrambling
M
=
(
Lmax
==
64
)
?
(
NR_POLAR_PBCH_PAYLOAD_BITS
-
6
)
:
(
NR_POLAR_PBCH_PAYLOAD_BITS
-
3
);
nushift
=
((
pbch_a_prime
>>
24
)
&
1
)
^
(((
pbch_a_prime
>>
6
)
&
1
)
<<
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