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
aed7cdf1
Commit
aed7cdf1
authored
Jul 04, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH scrambling fix
parent
eba95e3f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+5
-9
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
aed7cdf1
...
@@ -136,7 +136,7 @@ void nr_pbch_scrambling(uint32_t Nid,
...
@@ -136,7 +136,7 @@ void nr_pbch_scrambling(uint32_t Nid,
uint8_t
*
pbch_a
,
uint8_t
*
pbch_a
,
uint32_t
length
)
uint32_t
length
)
{
{
uint8_t
reset
;
uint8_t
reset
,
offset
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
uint64_t
tmp
=
0
;
uint64_t
tmp
=
0
;
uint8_t
M
=
length
-
3
;
// case Lmax = 4--> 29
uint8_t
M
=
length
-
3
;
// case Lmax = 4--> 29
...
@@ -146,22 +146,18 @@ void nr_pbch_scrambling(uint32_t Nid,
...
@@ -146,22 +146,18 @@ void nr_pbch_scrambling(uint32_t Nid,
x2
=
Nid
;
x2
=
Nid
;
// The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words
// The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words
for
(
int
i
=
0
;
i
<
(
nushift
*
M
)
>>
5
;
i
++
)
{
for
(
int
i
=
0
;
i
<
(
uint16_t
)
ceil
((
nushift
*
M
)
/
5
)
;
i
++
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
reset
=
0
;
}
}
tmp
=
(
uint64_t
)
s
;
offset
=
(
nushift
*
M
)
&
0x1f
;
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
tmp
^=
(
uint64_t
)(
s
<<
32
);
tmp
>>=
((
nushift
*
M
)
&
0x1f
);
s
=
(
uint32_t
)(
tmp
);
for
(
int
i
=
0
;
i
<
length
;
i
++
)
{
for
(
int
i
=
0
;
i
<
length
;
i
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
if
((
(
i
+
offset
)
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
reset
=
0
;
}
}
pbch_a
[
i
]
=
(
pbch_a
[
i
]
&
1
)
^
((
s
>>
(
i
&
0x1f
))
&
1
);
pbch_a
[
i
]
=
(
pbch_a
[
i
]
&
1
)
^
((
s
>>
(
(
i
+
offset
)
&
0x1f
))
&
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