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
lizhongxiao
OpenXG-RAN
Commits
e06e8b24
Commit
e06e8b24
authored
Jul 04, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH DMRS mmodulation fix/ scrambling update
parent
b4e3a041
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
7 deletions
+23
-7
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+23
-7
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
e06e8b24
...
@@ -51,16 +51,19 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -51,16 +51,19 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
{
{
int
k
,
l
;
int
k
,
l
;
int16_t
a
;
int16_t
a
;
int16_t
mod_dmrs
[
2
*
NR_PBCH_DMRS_LENGTH
];
int16_t
mod_dmrs
[
NR_PBCH_DMRS_LENGTH
<<
1
];
uint8_t
idx
=
0
;
LOG_I
(
PHY
,
"PBCH DMRS mapping started at symbol %d shift %d
\n
"
,
ssb_start_symbol
+
1
,
nushift
);
LOG_I
(
PHY
,
"PBCH DMRS mapping started at symbol %d shift %d
\n
"
,
ssb_start_symbol
+
1
,
nushift
);
/// BPSK modulation
/// QPSK modulation
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
>>
1
;
m
++
)
{
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)];
idx
=
((((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
)
<<
1
)
^
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
);
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
0x1f
)))
<<
1
)
+
1
];
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_dmrs
[(
m
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
#ifdef DEBUG_PBCH_DMRS
#ifdef DEBUG_PBCH_DMRS
printf
(
"m %d mod_dmrs %d %d
\n
"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
printf
(
"m %d idx %d gold seq %d b0-b1 %d-%d mod_dmrs %d %d
\n
"
,
m
,
idx
,
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
],
(((
gold_pbch_dmrs
[(
m
<<
1
)
>>
5
])
>>
((
m
<<
1
)
&
0x1f
))
&
1
),
(((
gold_pbch_dmrs
[((
m
<<
1
)
+
1
)
>>
5
])
>>
(((
m
<<
1
)
+
1
)
&
0x1f
))
&
1
),
mod_dmrs
[(
m
<<
1
)],
mod_dmrs
[(
m
<<
1
)
+
1
]);
#endif
#endif
}
}
...
@@ -135,11 +138,24 @@ void nr_pbch_scrambling(uint32_t Nid,
...
@@ -135,11 +138,24 @@ void nr_pbch_scrambling(uint32_t Nid,
{
{
uint8_t
reset
;
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
uint32_t
x1
,
x2
,
s
=
0
;
uint64_t
tmp
=
0
;
uint8_t
M
=
length
-
3
;
// case Lmax = 4--> 29
reset
=
1
;
reset
=
1
;
// x1 is set in lte_gold_generic
// x1 is set in lte_gold_generic
x2
=
Nid
;
x2
=
Nid
;
// 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
++
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
tmp
=
(
uint64_t
)
s
;
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
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
@@ -202,7 +218,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -202,7 +218,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
/// QPSK modulation
/// QPSK modulation
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E
>>
1
;
i
++
){
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_E
>>
1
;
i
++
){
idx
=
(
pbch
->
pbch_e
[
i
<<
1
]
&
1
)
^
((
pbch
->
pbch_e
[(
i
<<
1
)
+
1
]
&
1
)
<<
1
);
idx
=
(
(
pbch
->
pbch_e
[
i
<<
1
]
&
1
)
<<
1
)
^
(
pbch
->
pbch_e
[(
i
<<
1
)
+
1
]
&
1
);
mod_pbch_e
[
i
<<
1
]
=
nr_mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_pbch_e
[
i
<<
1
]
=
nr_mod_table
[(
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
mod_pbch_e
[(
i
<<
1
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
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