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
5e980ccd
Commit
5e980ccd
authored
May 24, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH RE mapping fix
parent
21fdaecf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
54 additions
and
25 deletions
+54
-25
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+52
-24
openair1/PHY/NR_TRANSPORT/nr_transport.h
openair1/PHY/NR_TRANSPORT/nr_transport.h
+1
-0
targets/RT/USER/nr-gnb.c
targets/RT/USER/nr-gnb.c
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
5e980ccd
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "PHY/defs_gNB.h"
#include "PHY/defs_gNB.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/NR_TRANSPORT/nr_transport.h"
#include "PHY/
phy_extern
.h"
#include "PHY/
LTE_REFSIG/lte_refsig
.h"
#include "PHY/sse_intrin.h"
#include "PHY/sse_intrin.h"
//#define DEBUG_PBCH
//#define DEBUG_PBCH
...
@@ -130,6 +130,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -130,6 +130,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
void
nr_pbch_scrambling
(
uint32_t
Nid
,
void
nr_pbch_scrambling
(
uint32_t
Nid
,
uint8_t
*
pbch_a
,
uint8_t
*
pbch_a
,
uint8_t
nushift
,
uint32_t
length
)
uint32_t
length
)
{
{
uint8_t
reset
;
uint8_t
reset
;
...
@@ -162,7 +163,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -162,7 +163,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
NR_DL_FRAME_PARMS
*
frame_parms
)
NR_DL_FRAME_PARMS
*
frame_parms
)
{
{
int
k
,
l
,
ssb_sc_idx
;
int
k
,
l
,
m
;
int16_t
a
;
int16_t
a
;
int16_t
mod_pbch_e
[
NR_POLAR_PBCH_E
<<
1
];
int16_t
mod_pbch_e
[
NR_POLAR_PBCH_E
<<
1
];
uint8_t
sfn_4lsb
,
idx
=
0
;
uint8_t
sfn_4lsb
,
idx
=
0
;
...
@@ -188,7 +189,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -188,7 +189,7 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
#endif
#endif
// Scrambling
// Scrambling
nr_pbch_scrambling
((
uint32_t
)
config
->
sch_config
.
physical_cell_id
.
value
,
pbch
->
pbch_a
,
NR_POLAR_PBCH_PAYLOAD_BITS
);
nr_pbch_scrambling
((
uint32_t
)
config
->
sch_config
.
physical_cell_id
.
value
,
nushift
,
pbch
->
pbch_a
,
NR_POLAR_PBCH_PAYLOAD_BITS
);
#ifdef DEBUG_PBCH_ENCODING
#ifdef DEBUG_PBCH_ENCODING
#endif
#endif
...
@@ -220,21 +221,22 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -220,21 +221,22 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
///symbol 1 [0:239] -- 180 mod symbols
///symbol 1 [0:239] -- 180 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
l
=
ssb_start_symbol
+
1
;
l
=
ssb_start_symbol
+
1
;
ssb_sc_idx
=
0
;
m
=
0
;
for
(
int
ssb_sc_idx
=
0
;
ssb_sc_idx
<
240
;
ssb_sc_idx
++
)
{
for
(
int
m
=
0
;
m
<
180
;
m
++
)
{
#ifdef DEBUG_PBCH
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
//skip DMRS
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
//skip DMRS
k
++
;
k
++
;
ssb_sc_idx
++
;
continue
;
}
}
else
{
else
{
#ifdef DEBUG_PBCH
printf
(
"m %d ssb_sc_idx %d at k %d of l %d
\n
"
,
m
,
ssb_sc_idx
,
k
,
l
);
#endif
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
k
++
;
k
++
;
ssb_sc_idx
++
;
m
++
;
}
}
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
...
@@ -244,21 +246,46 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -244,21 +246,46 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
///symbol 2 [0:47 ; 192:239] -- 72 mod symbols
///symbol 2 [0:47 ; 192:239] -- 72 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
l
++
;
l
++
;
ssb_sc_idx
=
0
;
m
=
180
;
for
(
int
ssb_sc_idx
=
0
;
ssb_sc_idx
<
48
;
ssb_sc_idx
++
)
{
for
(
int
m
=
180
;
m
<
252
;
m
++
)
{
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
k
++
;
continue
;
}
else
{
#ifdef DEBUG_PBCH
#ifdef DEBUG_PBCH
printf
(
"m %d
at k %d of l %d
\n
"
,
m
,
k
,
l
);
printf
(
"m %d
ssb_sc_idx %d at k %d of l %d
\n
"
,
m
,
ssb_sc_idx
,
k
,
l
);
#endif
#endif
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
k
++
;
m
++
;
}
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
k
+=
145
;
l
++
;
m
=
216
;
for
(
int
ssb_sc_idx
=
192
;
ssb_sc_idx
<
240
;
ssb_sc_idx
++
)
{
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
k
+
=
(
m
==
47
)
?
145
:
1
;
k
+
+
;
ssb_sc_idx
+=
(
m
==
47
)
?
145
:
1
;
continue
;
}
}
else
{
else
{
#ifdef DEBUG_PBCH
printf
(
"m %d ssb_sc_idx %d at k %d of l %d
\n
"
,
m
,
ssb_sc_idx
,
k
,
l
);
#endif
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
k
+
=
(
m
==
47
)
?
145
:
1
;
k
+
+
;
ssb_sc_idx
+=
(
m
==
47
)
?
145
:
1
;
m
++
;
}
}
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
...
@@ -268,21 +295,22 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
...
@@ -268,21 +295,22 @@ int nr_generate_pbch(NR_gNB_PBCH *pbch,
///symbol 3 [0:239] -- 180 mod symbols
///symbol 3 [0:239] -- 180 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
;
l
++
;
l
++
;
ssb_sc_idx
=
0
;
m
=
252
;
for
(
int
ssb_sc_idx
=
0
;
ssb_sc_idx
<
240
;
ssb_sc_idx
++
)
{
for
(
int
m
=
252
;
m
<
NR_POLAR_PBCH_E
>>
1
;
m
++
)
{
#ifdef DEBUG_PBCH
printf
(
"m %d at k %d of l %d
\n
"
,
m
,
k
,
l
);
#endif
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
if
((
ssb_sc_idx
&
3
)
==
nushift
)
{
k
++
;
k
++
;
ssb_sc_idx
++
;
continue
;
}
}
else
{
else
{
#ifdef DEBUG_PBCH
printf
(
"m %d ssb_sc_idx %d at k %d of l %d
\n
"
,
m
,
ssb_sc_idx
,
k
,
l
);
#endif
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
]
=
(
a
*
mod_pbch_e
[
m
<<
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[((
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
<<
1
)
+
1
]
=
(
a
*
mod_pbch_e
[(
m
<<
1
)
+
1
])
>>
15
;
k
++
;
k
++
;
ssb_sc_idx
++
;
m
++
;
}
}
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
...
...
openair1/PHY/NR_TRANSPORT/nr_transport.h
View file @
5e980ccd
...
@@ -73,6 +73,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
...
@@ -73,6 +73,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
*/
*/
void
nr_pbch_scrambling
(
uint32_t
Nid
,
void
nr_pbch_scrambling
(
uint32_t
Nid
,
uint8_t
*
pbch_a
,
uint8_t
*
pbch_a
,
uint8_t
nushift
,
uint32_t
length
);
uint32_t
length
);
/*!
/*!
...
...
targets/RT/USER/nr-gnb.c
View file @
5e980ccd
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
*/
*/
/*! \file lte-enb.c
/*! \file lte-enb.c
* \brief Top-level threads for
e
NodeB
* \brief Top-level threads for
g
NodeB
* \author R. Knopp, F. Kaltenberger, Navid Nikaein
* \author R. Knopp, F. Kaltenberger, Navid Nikaein
* \date 2012
* \date 2012
* \version 0.1
* \version 0.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