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
zzha zzha
OpenXG-RAN
Commits
db42be5d
Commit
db42be5d
authored
Apr 12, 2019
by
Javier Morgade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FeMBMS PBCH Initial Scan Procedures
parent
8a67e0e5
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
7 deletions
+105
-7
openair1/PHY/LTE_TRANSPORT/phich_common.c
openair1/PHY/LTE_TRANSPORT/phich_common.c
+4
-0
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
+92
-6
openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
+1
-1
openair1/PHY/defs_UE.h
openair1/PHY/defs_UE.h
+5
-0
openair1/PHY/defs_common.h
openair1/PHY/defs_common.h
+3
-0
No files found.
openair1/PHY/LTE_TRANSPORT/phich_common.c
View file @
db42be5d
...
@@ -35,6 +35,10 @@
...
@@ -35,6 +35,10 @@
uint8_t
get_mi
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
uint8_t
get_mi
(
LTE_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
subframe
)
{
{
// for FeMBMS
if
(
frame_parms
->
FeMBMS_active
!=
0
){
return
(
0
);
}
// for FDD
// for FDD
if
(
frame_parms
->
frame_type
==
FDD
)
if
(
frame_parms
->
frame_type
==
FDD
)
...
...
openair1/PHY/LTE_UE_TRANSPORT/initial_sync.c
View file @
db42be5d
...
@@ -126,6 +126,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -126,6 +126,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
pbch_decoded
=
0
;
pbch_decoded
=
0
;
for
(
frame_mod4
=
0
;
frame_mod4
<
4
;
frame_mod4
++
)
{
for
(
frame_mod4
=
0
;
frame_mod4
<
4
;
frame_mod4
++
)
{
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
ue
->
FeMBMS_active
!=
2
){
#endif
pbch_tx_ant
=
rx_pbch
(
&
ue
->
common_vars
,
pbch_tx_ant
=
rx_pbch
(
&
ue
->
common_vars
,
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
...
@@ -133,12 +136,26 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -133,12 +136,26 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
SISO
,
SISO
,
ue
->
high_speed_flag
,
ue
->
high_speed_flag
,
frame_mod4
);
frame_mod4
);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}
else
{
pbch_tx_ant
=
rx_pbch_fembms
(
&
ue
->
common_vars
,
ue
->
pbch_vars
[
0
],
frame_parms
,
0
,
SISO
,
ue
->
high_speed_flag
,
frame_mod4
);
}
#endif
if
((
pbch_tx_ant
>
0
)
&&
(
pbch_tx_ant
<=
2
))
{
if
((
pbch_tx_ant
>
0
)
&&
(
pbch_tx_ant
<=
2
))
{
pbch_decoded
=
1
;
pbch_decoded
=
1
;
break
;
break
;
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
ue
->
FeMBMS_active
!=
2
){
#endif
pbch_tx_ant
=
rx_pbch
(
&
ue
->
common_vars
,
pbch_tx_ant
=
rx_pbch
(
&
ue
->
common_vars
,
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
...
@@ -146,6 +163,17 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -146,6 +163,17 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
ALAMOUTI
,
ALAMOUTI
,
ue
->
high_speed_flag
,
ue
->
high_speed_flag
,
frame_mod4
);
frame_mod4
);
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}
else
{
pbch_tx_ant
=
rx_pbch_fembms
(
&
ue
->
common_vars
,
ue
->
pbch_vars
[
0
],
frame_parms
,
0
,
ALAMOUTI
,
ue
->
high_speed_flag
,
frame_mod4
);
}
#endif
if
((
pbch_tx_ant
>
0
)
&&
(
pbch_tx_ant
<=
2
))
{
if
((
pbch_tx_ant
>
0
)
&&
(
pbch_tx_ant
<=
2
))
{
pbch_decoded
=
1
;
pbch_decoded
=
1
;
...
@@ -202,7 +230,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -202,7 +230,9 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
break
;
break
;
}
}
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
ue
->
FeMBMS_active
!=
2
)
{
#endif
// now check for PHICH parameters
// now check for PHICH parameters
frame_parms
->
phich_config_common
.
phich_duration
=
(
PHICH_DURATION_t
)((
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
>>
4
)
&
1
);
frame_parms
->
phich_config_common
.
phich_duration
=
(
PHICH_DURATION_t
)((
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
>>
4
)
&
1
);
dummy
=
(
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
>>
2
)
&
3
;
dummy
=
(
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
>>
2
)
&
3
;
...
@@ -251,6 +281,28 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -251,6 +281,28 @@ int pbch_detection(PHY_VARS_UE *ue, runmode_t mode)
frame_parms
->
phich_config_common
.
phich_duration
,
frame_parms
->
phich_config_common
.
phich_duration
,
phich_resource
);
//frame_parms->phich_config_common.phich_resource);
phich_resource
);
//frame_parms->phich_config_common.phich_resource);
#endif
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
}
else
{
for
(
int
i
=
0
;
i
<
RX_NB_TH
;
i
++
)
{
ue
->
proc
.
proc_rxtx
[
i
].
frame_rx
=
(((
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
&
31
)
<<
1
)
+
(
ue
->
pbch_vars
[
0
]
->
decoded_output
[
1
]
>>
7
))
<<
4
;
ue
->
proc
.
proc_rxtx
[
i
].
frame_tx
=
ue
->
proc
.
proc_rxtx
[
0
].
frame_rx
;
}
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
"[UE%d] Initial sync: FeMBMS pbch decoded sucessfully p %d, tx_ant %d, frame %d, N_RB_DL %d, AdditionalNonMBSFN_SF %d, frame_mod4 %d
\n
"
,
ue
->
Mod_id
,
frame_parms
->
nb_antenna_ports_eNB
,
pbch_tx_ant
,
ue
->
proc
.
proc_rxtx
[
0
].
frame_rx
,
frame_parms
->
N_RB_DL
,
0
,
frame_mod4
);
#endif
}
#endif
return
(
0
);
return
(
0
);
}
else
{
}
else
{
return
(
-
1
);
return
(
-
1
);
...
@@ -330,6 +382,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -330,6 +382,21 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_I
(
PHY
,
"FDD Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ncp
,
phase_fdd_ncp
,
flip_fdd_ncp
,
ret
);
frame_parms
->
Nid_cell
,
metric_fdd_ncp
,
phase_fdd_ncp
,
flip_fdd_ncp
,
ret
);
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
ret
==-
1
){
ue
->
FeMBMS_active
=
2
;
ret
=
pbch_detection
(
ue
,
mode
);
if
(
ret
==-
1
){
ue
->
FeMBMS_active
=
0
;
frame_parms
->
FeMBMS_active
=
0
;
}
else
frame_parms
->
FeMBMS_active
=
1
;
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FeMBMS Normal prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ncp
,
phase_fdd_ncp
,
flip_fdd_ncp
,
ret
);
#endif
}
#endif
#endif
}
else
{
}
else
{
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
...
@@ -377,6 +444,25 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
...
@@ -377,6 +444,25 @@ int initial_sync(PHY_VARS_UE *ue, runmode_t mode)
LOG_I
(
PHY
,
"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
LOG_I
(
PHY
,
"FDD Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ecp
,
phase_fdd_ecp
,
flip_fdd_ecp
,
ret
);
frame_parms
->
Nid_cell
,
metric_fdd_ecp
,
phase_fdd_ecp
,
flip_fdd_ecp
,
ret
);
#endif
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
if
(
ret
==-
1
){
ue
->
FeMBMS_active
=
2
;
ret
=
pbch_detection
(
ue
,
mode
);
if
(
ret
==-
1
){
ue
->
FeMBMS_active
=
0
;
frame_parms
->
FeMBMS_active
=
0
;
}
else
frame_parms
->
FeMBMS_active
=
1
;
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FeMBMS CAS Extended prefix: CellId %d metric %d, phase %d, flip %d, pbch %d
\n
"
,
frame_parms
->
Nid_cell
,
metric_fdd_ecp
,
phase_fdd_ecp
,
flip_fdd_ecp
,
ret
);
#endif
}
#endif
}
else
{
}
else
{
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
LOG_I
(
PHY
,
"FDD Extended prefix: SSS error condition: sync_pos %d, sync_pos_slot %d
\n
"
,
sync_pos
,
sync_pos_slot
);
...
...
openair1/PHY/LTE_UE_TRANSPORT/pbch_ue.c
View file @
db42be5d
...
@@ -647,7 +647,7 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
...
@@ -647,7 +647,7 @@ void pbch_unscrambling_fembms(LTE_DL_FRAME_PARMS *frame_parms,
// x1 is set in first call to lte_gold_generic
// x1 is set in first call to lte_gold_generic
x2
=
frame_parms
->
Nid_cell
+
(
1
<<
9
);
//this is c_init for FeMBMS in 36.211 Sec 6.6.1
x2
=
frame_parms
->
Nid_cell
+
(
1
<<
9
);
//this is c_init for FeMBMS in 36.211 Sec 6.6.1
printf
(
"pbch_unscrambling: Nid_cell = %d, x2 = %d, frame_mod4 %d length %d
\n
"
,
frame_parms
->
Nid_cell
,
x2
,
frame_mod4
,
length
);
//msg
("pbch_unscrambling: Nid_cell = %d, x2 = %d, frame_mod4 %d length %d\n",frame_parms->Nid_cell,x2,frame_mod4,length);
for
(
i
=
0
;
i
<
length
;
i
++
)
{
for
(
i
=
0
;
i
<
length
;
i
++
)
{
if
(
i
%
32
==
0
)
{
if
(
i
%
32
==
0
)
{
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
s
=
lte_gold_generic
(
&
x1
,
&
x2
,
reset
);
...
...
openair1/PHY/defs_UE.h
View file @
db42be5d
...
@@ -621,6 +621,11 @@ typedef struct {
...
@@ -621,6 +621,11 @@ typedef struct {
//uint8_t local_flag;
//uint8_t local_flag;
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
/// \brief Indicator of current run mode of UE (normal_txrx, rx_calib_ue, no_L2_connect, debug_prach)
runmode_t
mode
;
runmode_t
mode
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \brief Indicator that UE is configured for FeMBMS functionality (This flag should be avoided) ... just kept for PBCH initical scan (TODO)
int
FeMBMS_active
;
#endif
/// \brief Indicator that UE should perform band scanning
/// \brief Indicator that UE should perform band scanning
int
UE_scan
;
int
UE_scan
;
/// \brief Indicator that UE should perform coarse scanning around carrier
/// \brief Indicator that UE should perform coarse scanning around carrier
...
...
openair1/PHY/defs_common.h
View file @
db42be5d
...
@@ -632,6 +632,9 @@ typedef struct {
...
@@ -632,6 +632,9 @@ typedef struct {
uint8_t
threequarter_fs
;
uint8_t
threequarter_fs
;
/// Size of FFT
/// Size of FFT
uint16_t
ofdm_symbol_size
;
uint16_t
ofdm_symbol_size
;
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
uint8_t
FeMBMS_active
;
#endif
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
#if (LTE_RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// Size of FFT
/// Size of FFT
uint16_t
ofdm_symbol_size_khz_1dot25
;
uint16_t
ofdm_symbol_size_khz_1dot25
;
...
...
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