Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
e06e8b24
Commit
e06e8b24
authored
6 years ago
by
Guy De Souza
Browse files
Options
Downloads
Patches
Plain Diff
PBCH DMRS mmodulation fix/ scrambling update
parent
b4e3a041
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+23
-7
23 additions, 7 deletions
openair1/PHY/NR_TRANSPORT/nr_pbch.c
with
23 additions
and
7 deletions
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+
23
−
7
View file @
e06e8b24
...
...
@@ -51,16 +51,19 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
{
int
k
,
l
;
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
);
/// BPSK modulation
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
mod_dmrs
[
m
<<
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_BPSK_OFFSET
+
((
gold_pbch_dmrs
[
m
>>
5
]
&
(
1
<<
(
m
&
0x1f
)))
>>
(
m
&
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
];
/// QPSK modulation
for
(
int
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
>>
1
;
m
++
)
{
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
]
=
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
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
}
...
...
@@ -135,11 +138,24 @@ void nr_pbch_scrambling(uint32_t Nid,
{
uint8_t
reset
;
uint32_t
x1
,
x2
,
s
=
0
;
uint64_t
tmp
=
0
;
uint8_t
M
=
length
-
3
;
// case Lmax = 4--> 29
reset
=
1
;
// x1 is set in lte_gold_generic
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
++
)
{
if
((
i
&
0x1f
)
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
@@ -202,7 +218,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
/// QPSK modulation
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
)
+
1
]
=
nr_mod_table
[((
NR_MOD_TABLE_QPSK_OFFSET
+
idx
)
<<
1
)
+
1
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment