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
canghaiwuhen
OpenXG-RAN
Commits
ae180291
Commit
ae180291
authored
Dec 21, 2018
by
Raymond Knopp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimized polar encoder in pbch_nr.c
parent
96481468
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
11 deletions
+4
-11
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
+1
-1
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+2
-9
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+1
-1
No files found.
openair1/PHY/CODING/nrPolar_tools/nr_polar_decoder.c
View file @
ae180291
...
@@ -1151,7 +1151,7 @@ uint32_t polar_decoder_int16(int16_t *input,
...
@@ -1151,7 +1151,7 @@ uint32_t polar_decoder_int16(int16_t *input,
crc
=
(
uint64_t
)(
crc24c
(
A64_flip
,
len
)
>>
8
);
crc
=
(
uint64_t
)(
crc24c
(
A64_flip
,
len
)
>>
8
);
}
}
#if
1
#if
0
printf("A %llx B %llx|%llx Cprime %llx|%llx (crc %x,rxcrc %llx %d)\n",
printf("A %llx B %llx|%llx Cprime %llx|%llx (crc %x,rxcrc %llx %d)\n",
Ar,
Ar,
B[1],B[0],Cprime[1],Cprime[0],crc,
B[1],B[0],Cprime[1],Cprime[0],crc,
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
ae180291
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
#include "PHY/sse_intrin.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_PBCH
//#define DEBUG_PBCH
#define DEBUG_PBCH_ENCODING
//
#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_DMRS
//#define DEBUG_PBCH_DMRS
#include "PHY/NR_REFSIG/nr_mod_table.h"
#include "PHY/NR_REFSIG/nr_mod_table.h"
...
@@ -250,7 +250,6 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -250,7 +250,6 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
uint16_t
M
;
uint16_t
M
;
uint8_t
nushift
;
uint8_t
nushift
;
uint32_t
unscrambling_mask
;
uint32_t
unscrambling_mask
;
uint64_t
a_reversed
=
0
;
LOG_I
(
PHY
,
"PBCH generation started
\n
"
);
LOG_I
(
PHY
,
"PBCH generation started
\n
"
);
...
@@ -305,14 +304,8 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -305,14 +304,8 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
printf
(
"pbch_a_prime: 0x%08x
\n
"
,
pbch
->
pbch_a_prime
);
printf
(
"pbch_a_prime: 0x%08x
\n
"
,
pbch
->
pbch_a_prime
);
#endif
#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
);
/// CRC, coding and rate matching
/// CRC, coding and rate matching
polar_encoder_fast
(
&
a_reversed
,
(
uint32_t
*
)
pbch
->
pbch_e
,
0
,
polar_params
);
polar_encoder_fast
(
&
pbch
->
pbch_a_prime
,
(
uint32_t
*
)
pbch
->
pbch_e
,
0
,
polar_params
);
#ifdef DEBUG_PBCH_ENCODING
#ifdef DEBUG_PBCH_ENCODING
printf
(
"Channel coding:
\n
"
);
printf
(
"Channel coding:
\n
"
);
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E_DWORD
;
i
++
)
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E_DWORD
;
i
++
)
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
ae180291
...
@@ -675,7 +675,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -675,7 +675,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
if
(
decoderState
>
0
)
return
(
decoderState
);
if
(
decoderState
>
0
)
return
(
decoderState
);
printf
(
"polar decoder output 0x%08x
\n
"
,
nr_ue_pbch_vars
->
pbch_a_prime
);
//
printf("polar decoder output 0x%08x\n",nr_ue_pbch_vars->pbch_a_prime);
//payload un-scrambling
//payload un-scrambling
memset
(
&
nr_ue_pbch_vars
->
pbch_a_interleaved
,
0
,
sizeof
(
uint32_t
)
);
memset
(
&
nr_ue_pbch_vars
->
pbch_a_interleaved
,
0
,
sizeof
(
uint32_t
)
);
...
...
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