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
常顺宇
OpenXG-RAN
Commits
98a41e83
Commit
98a41e83
authored
May 02, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PBCH DMRS updated mapping
parent
56785bde
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
15 deletions
+57
-15
openair1/PHY/NR_TRANSPORT/nr_pbch.c
openair1/PHY/NR_TRANSPORT/nr_pbch.c
+53
-14
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+4
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_pbch.c
View file @
98a41e83
...
...
@@ -19,13 +19,13 @@
* contact@openairinterface.org
*/
/*! \file PHY/
LTE_TRANSPORT/
pbch.c
* \brief Top-level routines for generating and decoding the PBCH/BCH physical/transport channel V
8.6 2009-03
* \author
R. Knopp, F. Kaltenberger
* \date 201
1
/*! \file PHY/
NR_TRANSPORT/nr_
pbch.c
* \brief Top-level routines for generating and decoding the PBCH/BCH physical/transport channel V
15.1 03/2018
* \author
G. De Souza
* \date 201
8
* \version 0.1
* \company Eurecom
* \email:
knopp@eurecom.fr,florian.kaltenberger
.fr
* \email:
desouza@eurecom
.fr
* \note
* \warning
*/
...
...
@@ -45,6 +45,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
int32_t
**
txdataF
,
int16_t
amp
,
uint8_t
ssb_start_symbol
,
uint8_t
nu
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
...
...
@@ -55,10 +56,10 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
/// BPSK modulation
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
mod_dmrs
[
2
*
m
]
=
nr_mod_table
[
2
*
(
1
+
(
*
(
gold_pbch_dmrs
+
m
/
32
))
&
(
1
<<
(
m
&
0xf
))
)];
mod_dmrs
[
2
*
m
+
1
]
=
nr_mod_table
[
2
*
(
1
+
(
*
(
gold_pbch_dmrs
+
m
/
32
))
&
(
1
<<
(
m
&
0xf
))
)
+
1
];
mod_dmrs
[
2
*
m
]
=
nr_mod_table
[
2
*
(
1
+
(
(
gold_pbch_dmrs
[
m
>>
5
])
&
(
1
<<
(
m
&
0x1f
)
))
)];
mod_dmrs
[
2
*
m
+
1
]
=
nr_mod_table
[
2
*
(
1
+
(
(
gold_pbch_dmrs
[
m
>>
5
])
&
(
1
<<
(
m
&
0x1f
)
))
)
+
1
];
#ifdef DEBUG_PBCH
printf
(
"m %d mod_dmrs %d %d"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
printf
(
"m %d mod_dmrs %d %d
\n
"
,
m
,
mod_dmrs
[
2
*
m
],
mod_dmrs
[
2
*
m
+
1
]);
#endif
}
...
...
@@ -68,22 +69,60 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// PBCH DMRS are mapped
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
56
;
//and
// PBCH DMRS are mapped within the SSB block on every fourth subcarrier starting from nu of symbols 1, 2, 3
///symbol 1 [0+nu:4:236+nu] -- 60 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
=
ssb_start_symbol
+
1
;
for
(
m
=
0
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
for
(
m
=
0
;
m
<
60
;
m
++
)
{
#ifdef DEBUG_PBCH
LOG_I
(
PHY
,
"Mapping modulated symbol %d at k %d of OFDM symbol %d
\n
"
,
m
,
k
,
l
);
#endif
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
mod_dmrs
[
2
*
m
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
+
1
]
=
(
a
*
mod_dmrs
[
2
*
m
+
1
])
>>
15
;
k
+=
4
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
///symbol 2 [0+u:4:44+nu ; 192+nu:4:236+nu] -- 24 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
++
;
for
(
m
=
60
;
m
<
84
;
m
++
)
{
#ifdef DEBUG_PBCH
int
idx
=
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
);
printf
(
"aa %d m %d txdataF %d %d %d"
,
aa
,
m
,
txdataF
[
aa
][
idx
],
txdataF
[
aa
][
idx
+
1
]);
LOG_I
(
PHY
,
"Mapping modulated symbol %d at k %d of OFDM symbol %d
\n
"
,
m
,
k
,
l
);
#endif
k
++
;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
mod_dmrs
[
2
*
m
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
+
1
]
=
(
a
*
mod_dmrs
[
2
*
m
+
1
])
>>
15
;
k
+=
(
m
==
71
)
?
148
:
4
;
// Jump from 44+nu to 192+nu
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
///symbol 3 [0+nu:4:236+nu] -- 60 mod symbols
k
=
frame_parms
->
first_carrier_offset
+
frame_parms
->
ssb_start_subcarrier
+
nu
;
l
++
;
for
(
m
=
84
;
m
<
NR_PBCH_DMRS_LENGTH
;
m
++
)
{
#ifdef DEBUG_PBCH
LOG_I
(
PHY
,
"Mapping modulated symbol %d at k %d of OFDM symbol %d
\n
"
,
m
,
k
,
l
);
#endif
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
mod_dmrs
[
2
*
m
])
>>
15
;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)
+
1
]
=
(
a
*
mod_dmrs
[
2
*
m
+
1
])
>>
15
;
k
+=
4
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
k
-=
frame_parms
->
ofdm_symbol_size
;
}
}
#ifdef DEBUG_PBCH
write_output
(
"pbch_dmrsF.m"
,
"pbch_dmrsF"
,
txdataF
[
0
][
2
*
(
ssb_start_symbol
+
1
)
*
frame_parms
->
ofdm_symbol_size
],
3
*
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
#endif
return
(
0
);
}
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
98a41e83
...
...
@@ -120,11 +120,14 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
int
**
txdataF
=
gNB
->
common_vars
.
txdataF
;
uint8_t
*
pbch_pdu
=&
gNB
->
pbch_pdu
[
0
];
int
ss_subframe
=
(
cfg
->
sch_config
.
half_frame_index
.
value
)
?
5
:
0
;
uint8_t
Lmax
,
nu
,
ssb_index
=
0
,
n_hf
=
0
;
LOG_D
(
PHY
,
"common_signal_procedures: frame %d, subframe %d
\n
"
,
frame
,
subframe
);
int
ssb_start_symbol
=
nr_get_ssb_start_symbol
(
cfg
,
fp
);
nr_set_ssb_first_subcarrier
(
cfg
,
fp
);
Lmax
=
(
fp
->
dl_CarrierFreq
<
3e9
)
?
4
:
8
;
nu
=
(
Lmax
<
8
)
?
ssb_index
&
3
:
ssb_index
&
7
;
if
(
subframe
==
ss_subframe
)
...
...
@@ -133,7 +136,7 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
LOG_I
(
PHY
,
"SS TX: frame %d, subframe %d, start_symbol %d
\n
"
,
frame
,
subframe
,
ssb_start_symbol
);
nr_generate_pss
(
gNB
->
d_pss
,
txdataF
,
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_sss
(
gNB
->
d_sss
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
0
][
0
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_pbch_dmrs
(
gNB
->
nr_gold_pbch_dmrs
[
n_hf
][
ssb_index
],
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
nu
,
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