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
wangwenhui
OpenXG-RAN
Commits
b6de2aea
Commit
b6de2aea
authored
Nov 07, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MIB interleaving correction
parent
80e0c46b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
21 deletions
+35
-21
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+1
-0
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+21
-20
openair1/PHY/NR_TRANSPORT/nr_transport.h
openair1/PHY/NR_TRANSPORT/nr_transport.h
+1
-0
openair1/PHY/defs_gNB.h
openair1/PHY/defs_gNB.h
+3
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+9
-1
No files found.
openair1/PHY/INIT/nr_init.c
View file @
b6de2aea
...
...
@@ -143,6 +143,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
}
nr_init_pdcch_dmrs
(
gNB
,
cfg
->
sch_config
.
physical_cell_id
.
value
);
nr_init_pbch_interleaver
(
gNB
->
nr_pbch_interleaver
);
/*
lte_gold(fp,gNB->lte_gold_table,fp->Nid_cell);
...
...
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
b6de2aea
...
...
@@ -39,9 +39,11 @@
//#define DEBUG_PBCH_ENCODING
//#define DEBUG_PBCH_DMRS
//extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
#include "PHY/NR_REFSIG/nr_mod_table.h"
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
};
int
nr_generate_pbch_dmrs
(
uint32_t
*
gold_pbch_dmrs
,
int32_t
**
txdataF
,
int16_t
amp
,
...
...
@@ -163,7 +165,7 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
x2
=
Nid
;
// The Gold sequence is shifted by nushift* M, so we skip (nushift*M /32) double words
for
(
int
i
=
0
;
i
<
(
uint16_t
)
ceil
(((
float
)
nushift
*
M
)
/
32
);
i
++
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
reset
=
0
;
}
// Scrambling is now done with offset (nushift*M)%32
...
...
@@ -188,21 +190,19 @@ s = lte_gold_generic(&x1, &x2, reset);
}
}
// 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
=
6
,
j_hrf
=
10
,
j_ssb
=
11
,
j_other
=
14
;
uint8_t
nr_pbch_init_interleaver
(
uint8_t
*
interleaver
)
{
uint8_t
j_sfn
=
0
,
j_hrf
=
10
,
j_ssb
=
11
,
j_other
=
14
;
memset
((
void
*
)
interleaver
,
0
,
NR_POLAR_PBCH_PAYLOAD_BITS
);
if
(
24
<=
i
&&
i
<=
27
)
//Sfn bits
return
nr_pbch_payload_interleaving_pattern
[
j_sfn
+
i
-
24
];
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
;
i
++
)
if
((
i
<
6
)
||
(
23
<
i
&&
i
<
28
))
//Sfn bits
*
(
interleaver
+
j_sfn
++
)
=
*
(
nr_pbch_payload_interleaving_pattern
+
i
);
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
)]
;
*
(
interleaver
+
j_hrf
)
=
*
(
nr_pbch_payload_interleaving_pattern
+
i
)
;
else
if
(
i
>
28
)
// Ssb bits
*
(
interleaver
+
j_ssb
)
=
*
(
nr_pbch_payload_interleaving_pattern
+
i
)
;
else
return
nr_pbch_payload_interleaving_pattern
[(
j_other
+
i
)
&
0x1f
]
;
*
(
interleaver
+
j_other
)
=
*
(
nr_pbch_payload_interleaving_pattern
+
i
)
;
}
/*This pattern takes into account the adjustments for the field specific counters j_sfn, j_hrf, j_ssb and j_other*/
...
...
@@ -212,6 +212,7 @@ uint8_t nr_pbch_payload_interleaver(uint8_t i) {
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
t_nrPolar_paramsPtr
polar_params
,
uint8_t
*
pbch_pdu
,
uint8_t
*
interleaver
,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
...
...
@@ -269,10 +270,10 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
>>
3
;
i
++
)
in
|=
(
uint32_t
)(
pbch
->
pbch_a
[
i
]
<<
((
3
-
i
)
<<
3
));
for
(
int
i
=
0
;
i
<
32
;
i
++
)
{
pbch
->
pbch_a_interleaved
|=
((
in
>>
i
)
&
1
)
<<
(
nr_pbch_payload_interleaver
(
i
));
//nr_pbch_payload_interleaving_pattern[i]
for
(
int
i
=
0
;
i
<
NR_POLAR_PBCH_PAYLOAD_BITS
;
i
++
)
{
pbch
->
pbch_a_interleaved
|=
((
in
>>
i
)
&
1
)
<<
(
*
(
interleaver
+
i
));
#ifdef DEBUG_PBCH_ENCODING
printf
(
"i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) %d
\n
"
,
i
,
in
,
pbch
->
pbch_a_interleaved
,
nr_pbch_payload_interleaver
(
i
),
(
in
>>
i
)
&
1
);
printf
(
"i %d in 0x%08x out 0x%08x ilv %d (in>>i)&1) %d
\n
"
,
i
,
in
,
pbch
->
pbch_a_interleaved
,
*
(
interleaver
+
i
),
(
in
>>
i
)
&
1
);
#endif
}
...
...
openair1/PHY/NR_TRANSPORT/nr_transport.h
View file @
b6de2aea
...
...
@@ -86,6 +86,7 @@ void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
int
nr_generate_pbch
(
NR_gNB_PBCH
*
pbch
,
t_nrPolar_paramsPtr
polar_params
,
uint8_t
*
pbch_pdu
,
uint8_t
*
interleaver
,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
...
...
openair1/PHY/defs_gNB.h
View file @
b6de2aea
...
...
@@ -315,6 +315,9 @@ typedef struct PHY_VARS_gNB_s {
/// PBCH DMRS sequence
uint32_t
nr_gold_pbch_dmrs
[
2
][
64
][
NR_PBCH_DMRS_LENGTH_DWORD
];
/// PBCH interleaver
uint8_t
nr_pbch_interleaver
[
NR_POLAR_PBCH_PAYLOAD_BITS
];
/// PDCCH DMRS sequence
uint32_t
***
nr_gold_pdcch_dmrs
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
b6de2aea
...
...
@@ -146,7 +146,15 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
gNB
->
pbch_configured
=
0
;
}
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch
(
&
gNB
->
pbch
,
gNB
->
nrPolar_params
,
pbch_pdu
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
n_hf
,
Lmax
,
ssb_index
,
frame
,
cfg
,
fp
);
nr_generate_pbch
(
&
gNB
->
pbch
,
gNB
->
nrPolar_params
,
pbch_pdu
,
gNB
->
nr_pbch_interleaver
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
n_hf
,
Lmax
,
ssb_index
,
frame
,
cfg
,
fp
);
}
}
...
...
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