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
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
6772e7c6
Commit
6772e7c6
authored
6 years ago
by
Guy De Souza
Browse files
Options
Downloads
Patches
Plain Diff
SFN bits interleaving workaround
parent
f90bb553
No related branches found
Branches containing commit
Tags
2018.w46
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
+11
-11
11 additions, 11 deletions
openair1/PHY/NR_TRANSPORT/nr_pbch.c
with
11 additions
and
11 deletions
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+
11
−
11
View file @
6772e7c6
...
...
@@ -177,26 +177,26 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
}
}
/
*
This portion of code is temporarily kept until the optimized version is validated
*
uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
/
/
This portion of code is temporarily kept until the optimized version is validated
uint8_t
nr_pbch_payload_interleaving_pattern
[
32
]
=
{
16
,
23
,
18
,
17
,
8
,
30
,
10
,
6
,
24
,
7
,
0
,
5
,
3
,
2
,
1
,
4
,
9
,
11
,
12
,
13
,
14
,
15
,
19
,
20
,
21
,
22
,
25
,
26
,
27
,
28
,
29
,
31
};
uint8_t
nr_pbch_payload_interleaver
(
uint8_t
i
)
{
uint8_t j_sfn=
0
, j_hrf=10, j_ssb=11, j_other=14;
uint8_t
j_sfn
=
6
,
j_hrf
=
10
,
j_ssb
=
11
,
j_other
=
14
;
if (
18
<=i && i<=27) //Sfn bits
return nr_pbch_payload_interleaving_pattern[j_sfn + i -
18
];
if
(
24
<=
i
&&
i
<=
27
)
//Sfn bits
return
nr_pbch_payload_interleaving_pattern
[
j_sfn
+
i
-
24
];
else
if
(
i
==
28
)
// Hrf bit
return
nr_pbch_payload_interleaving_pattern
[
j_hrf
];
else
if
(
29
<=
i
)
// Ssb bits
return
nr_pbch_payload_interleaving_pattern
[
j_ssb
+
(
i
-
29
)];
else
return nr_pbch_payload_interleaving_pattern[j_other + i];
}
*/
return
nr_pbch_payload_interleaving_pattern
[
(
j_other
+
i
)
&
0x1f
];
}
/*This pattern takes into account the adjustments for the field specific counters j_sfn, j_hrf, j_ssb and j_other*/
uint8_t
nr_pbch_payload_interleaving_pattern
[
32
]
=
{
1
,
4
,
9
,
11
,
12
,
13
,
14
,
15
,
19
,
20
,
21
,
22
,
25
,
26
,
27
,
28
,
29
,
31
,
16
,
23
,
18
,
17
,
8
,
30
,
10
,
6
,
24
,
7
,
0
,
5
,
3
,
2
};
//
uint8_t nr_pbch_payload_interleaving_pattern[32] = {1,4,9,11,12,13,14,15,19,20,21,22,25,26,27,28,
//
29,31,16,23,18,17,8,30,10,6,24,7,0,5,3,2};
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
uint8_t
*
pbch_pdu
,
...
...
@@ -256,9 +256,9 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
in
|=
(
uint32_t
)(
pbch
->
pbch_a
[
i
]
<<
((
3
-
i
)
<<
3
));
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
out
|=
((
in
>>
i
)
&
1
)
<<
(
nr_pbch_payload_interleaving_pattern
[
i
]
);
out
|=
((
in
>>
i
)
&
1
)
<<
(
nr_pbch_payload_
interleaver
(
i
));
//nr_pbch_payload_
interleaving_pattern[i]
#ifdef DEBUG_PBCH_ENCODING
printf
(
"i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1)
0x%08x
\n
"
,
i
,
in
,
out
,
nr_pbch_payload_interleav
ing_pattern
[
i
]
,
(
in
>>
i
)
&
1
);
printf
(
"i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1)
%d
\n
"
,
i
,
in
,
out
,
nr_pbch_payload_interleav
er
(
i
)
,
(
in
>>
i
)
&
1
);
#endif
}
...
...
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