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
alex037yang
OpenXG-RAN
Commits
29cc22bd
Commit
29cc22bd
authored
Jan 31, 2017
by
hbilel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[OAI-UE] bugfix issue#204: fix for pss/sss extraction during scan period
parent
4eae34a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
22 deletions
+46
-22
openair1/PHY/LTE_TRANSPORT/proto.h
openair1/PHY/LTE_TRANSPORT/proto.h
+2
-1
openair1/PHY/LTE_TRANSPORT/sss.c
openair1/PHY/LTE_TRANSPORT/sss.c
+44
-21
No files found.
openair1/PHY/LTE_TRANSPORT/proto.h
View file @
29cc22bd
...
...
@@ -1207,7 +1207,8 @@ int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
*/
int
pss_sss_extract
(
PHY_VARS_UE
*
phy_vars_ue
,
int32_t
pss_ext
[
4
][
72
],
int32_t
sss_ext
[
4
][
72
]);
int32_t
sss_ext
[
4
][
72
],
uint8_t
subframe
);
/*! \brief Extract only PSS resource elements
@param phy_vars_ue Pointer to UE variables
...
...
openair1/PHY/LTE_TRANSPORT/sss.c
View file @
29cc22bd
...
...
@@ -149,7 +149,8 @@ int pss_ch_est(PHY_VARS_UE *ue,
int
_do_pss_sss_extract
(
PHY_VARS_UE
*
ue
,
int32_t
pss_ext
[
4
][
72
],
int32_t
sss_ext
[
4
][
72
],
uint8_t
doPss
,
uint8_t
doSss
)
// add flag to indicate extracting only PSS, only SSS, or both
uint8_t
doPss
,
uint8_t
doSss
,
uint8_t
subframe
)
// add flag to indicate extracting only PSS, only SSS, or both
{
...
...
@@ -163,32 +164,52 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
int
rx_offset
=
frame_parms
->
ofdm_symbol_size
-
3
*
12
;
uint8_t
pss_symb
,
sss_symb
;
int32_t
**
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
rxdataF
;
if
(
frame_parms
->
frame_type
==
FDD
)
{
pss_symb
=
6
-
frame_parms
->
Ncp
;
sss_symb
=
pss_symb
-
1
;
}
else
{
pss_symb
=
2
;
sss_symb
=
frame_parms
->
symbols_per_tti
-
1
;
}
int32_t
**
rxdataF
;
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
if
(
frame_parms
->
frame_type
==
FDD
)
{
pss_symb
=
6
-
frame_parms
->
Ncp
;
sss_symb
=
pss_symb
-
1
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[(
subframe
&
0x1
)].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
{
pss_symb
=
2
;
sss_symb
=
frame_parms
->
symbols_per_tti
-
1
;
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[(
subframe
&
0x1
)].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[((
subframe
+
1
)
&
0x1
)].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
//printf("extract_rbs: symbol_mod=%d, rx_offset=%d, ch_offset=%d\n",symbol_mod,
// (rx_offset + (symbol*(frame_parms->ofdm_symbol_size)))*2,
// LTE_CE_OFFSET+ch_offset+(symbol_mod*(frame_parms->ofdm_symbol_size)));
pss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
sss_rxF
=
&
rxdataF
[
aarx
][(
rx_offset
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
pss_rxF_ext
=
&
pss_ext
[
aarx
][
0
];
sss_rxF_ext
=
&
sss_ext
[
aarx
][
0
];
for
(
rb
=
0
;
rb
<
nb_rb
;
rb
++
)
{
// skip DC carrier
if
(
rb
==
3
)
{
sss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
pss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
if
(
frame_parms
->
frame_type
==
FDD
)
{
sss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
pss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
else
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[(
subframe
&
0x1
)].
rxdataF
;
sss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
sss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[((
subframe
+
1
)
&
0x1
)].
rxdataF
;
pss_rxF
=
&
rxdataF
[
aarx
][(
1
+
(
pss_symb
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
}
for
(
i
=
0
;
i
<
12
;
i
++
)
{
...
...
@@ -209,16 +230,17 @@ int _do_pss_sss_extract(PHY_VARS_UE *ue,
int
pss_sss_extract
(
PHY_VARS_UE
*
phy_vars_ue
,
int32_t
pss_ext
[
4
][
72
],
int32_t
sss_ext
[
4
][
72
])
int32_t
sss_ext
[
4
][
72
],
uint8_t
subframe
)
{
return
_do_pss_sss_extract
(
phy_vars_ue
,
pss_ext
,
sss_ext
,
1
/* doPss */
,
1
/* doSss */
);
return
_do_pss_sss_extract
(
phy_vars_ue
,
pss_ext
,
sss_ext
,
1
/* doPss */
,
1
/* doSss */
,
subframe
);
}
int
pss_only_extract
(
PHY_VARS_UE
*
phy_vars_ue
,
int32_t
pss_ext
[
4
][
72
])
{
static
int32_t
dummy
[
4
][
72
];
return
_do_pss_sss_extract
(
phy_vars_ue
,
pss_ext
,
dummy
,
1
/* doPss */
,
0
/* doSss */
);
return
_do_pss_sss_extract
(
phy_vars_ue
,
pss_ext
,
dummy
,
1
/* doPss */
,
0
/* doSss */
,
0
);
}
...
...
@@ -226,7 +248,7 @@ int sss_only_extract(PHY_VARS_UE *phy_vars_ue,
int32_t
sss_ext
[
4
][
72
])
{
static
int32_t
dummy
[
4
][
72
];
return
_do_pss_sss_extract
(
phy_vars_ue
,
dummy
,
sss_ext
,
0
/* doPss */
,
1
/* doSss */
);
return
_do_pss_sss_extract
(
phy_vars_ue
,
dummy
,
sss_ext
,
0
/* doPss */
,
1
/* doSss */
,
0
);
}
...
...
@@ -295,10 +317,10 @@ int rx_sss(PHY_VARS_UE *ue,int32_t *tot_metric,uint8_t *flip_max,uint8_t *phase_
0
,
1
);
}
// pss sss extract for subframe 0
pss_sss_extract
(
ue
,
pss_ext
,
sss0_ext
);
sss0_ext
,
0
);
/*
write_output("rxsig0.m","rxs0",&ue->common_vars.rxdata[0][0],ue->frame_parms.samples_per_tti,1,1);
write_output("rxdataF0.m","rxF0",&ue->common_vars.rxdataF[0][0],2*14*ue->frame_parms.ofdm_symbol_size,2,1);
...
...
@@ -346,9 +368,10 @@ int rx_sss(PHY_VARS_UE *ue,int32_t *tot_metric,uint8_t *flip_max,uint8_t *phase_
1
);
}
// pss sss extract for subframe 5
pss_sss_extract
(
ue
,
pss_ext
,
sss5_ext
);
sss5_ext
,
5
);
// write_output("sss5_ext0.m","sss5ext0",sss5_ext,72,1,1);
// get conjugated channel estimate from PSS (symbol 6), H* = R* \cdot PSS
...
...
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