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
wangjie
OpenXG-RAN
Commits
754fc0e9
Commit
754fc0e9
authored
7 years ago
by
Vincent Savaux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add cell ID estimation using NSSS
parent
5734aaee
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
144 additions
and
7 deletions
+144
-7
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+134
-6
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+10
-1
No files found.
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
View file @
754fc0e9
...
...
@@ -135,11 +135,139 @@ int generate_sss_NB_IoT(int32_t **txdataF,
return
(
0
);
}
// int rx_nsss_NB_IoT(PHY_VARS_UE_NB_IoT *ue)
// {
// uint8_t Nid2 = ue->common_vars.eNb_id;
// NB_IoT_DL_FRAME_PARMS *frame_parms=&ue->frame_parms;
int
rx_nsss_NB_IoT
(
PHY_VARS_UE_NB_IoT
*
ue
,
int32_t
*
tot_metric
)
{
uint8_t
Nid2
,
q_est
,
u_est
;
NB_IoT_DL_FRAME_PARMS
*
frame_parms
=
&
ue
->
frame_parms
;
int
l
,
k
,
m
;
int16_t
*
d
,
*
nsss_sf
;
int32_t
nsss_ext
[
2
][
132
];
// up to 2 rx antennas ?
int32_t
metric
;
// correlation metric
// we suppose we are in NSSS subframe, after DFT
// this could be changed in further version
for
(
l
=
0
;
l
<
11
;
l
++
){
nsss_extract_NB_IoT
(
ue
,
frame_parms
,
nsss_ext
,
l
);
}
// now do the Cell ID estimation based on the precomputed sequences in PHY/LTE_TRANSPORT/nsss_NB_IoT.h
*
tot_metric
=
-
99999999
;
nsss_sf
=
(
int16_t
*
)
&
nsss_ext
[
0
][
0
];
for
(
Nid2
=
0
;
Nid2
<
16
;
Nid2
++
){
switch
(
Nid2
)
{
case
0
:
d
=
d0f0
;
break
;
case
1
:
d
=
d0f1
;
break
;
case
2
:
d
=
d0f2
;
break
;
case
3
:
d
=
d0f3
;
break
;
case
4
:
d
=
d1f0
;
break
;
case
5
:
d
=
d1f1
;
break
;
case
6
:
d
=
d1f2
;
break
;
case
7
:
d
=
d1f3
;
break
;
case
8
:
d
=
d2f0
;
break
;
case
9
:
d
=
d2f1
;
break
;
case
10
:
d
=
d2f2
;
break
;
case
11
:
d
=
d2f3
;
case
12
:
d
=
d3f0
;
break
;
case
13
:
d
=
d3f1
;
break
;
case
14
:
d
=
d3f2
;
break
;
case
15
:
d
=
d3f3
;
break
;
default:
msg
(
"[NSSS] ERROR
\n
"
);
return
(
-
1
);
}
for
(
k
=
0
;
k
<
126
;
k
++
){
metric
=
0
;
for
(
m
=
0
;
m
<
132
;
m
++
){
metric
+=
(
int32_t
)
d
[(
k
*
126
+
m
)
<<
1
]
*
(
int32_t
)
nsss_sf
[(
k
*
126
+
m
)
<<
1
]
+
(
int32_t
)
d
[((
k
*
126
+
m
)
<<
1
)
+
1
]
*
(
int32_t
)
nsss_sf
[((
k
*
126
+
m
)
<<
1
)
+
1
];
// real part of correlation
}
if
(
metric
>
*
tot_metric
){
q_est
=
Nid2
/
4
;
u_est
=
k
;
ue
->
frame_parms
.
Nid_cell
=
q_est
*
126
+
u_est
;
}
// return(0);
// }
}
}
return
(
0
);
}
int
nsss_extract_NB_IoT
(
PHY_VARS_UE_NB_IoT
*
ue
,
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
nsss_ext
,
int
l
)
{
uint8_t
i
,
aarx
;
unsigned
short
UL_RB_ID_NB_IoT
;
// index of RB dedicated to NB-IoT
int32_t
*
nsss_rxF
,
*
nsssF_ext
;
int32_t
**
rxdataF
;
int
first_symbol_offset
=
3
;
// NSSS starts at third symbol in subframe
UL_RB_ID_NB_IoT
=
frame_parms
->
NB_IoT_RB_ID
;
for
(
aarx
=
0
;
aarx
<
frame_parms
->
nb_antennas_rx
;
aarx
++
)
{
rxdataF
=
ue
->
common_vars
.
common_vars_rx_data_per_thread
[
0
].
rxdataF
;
// Note that
nsssF_ext
=
&
nsss_ext
[
aarx
][
l
*
12
];
if
(
UL_RB_ID_NB_IoT
<=
(
frame_parms
->
N_RB_DL
>>
1
))
{
// NB-IoT RB is in the first half
nsss_rxF
=
&
rxdataF
[
aarx
][(
UL_RB_ID_NB_IoT
*
12
+
frame_parms
->
first_carrier_offset
+
((
l
+
first_symbol_offset
)
*
(
frame_parms
->
ofdm_symbol_size
)))];
}
// For second half of RBs skip DC carrier
else
{
// NB-IoT RB is in the second half
nsss_rxF
=
&
rxdataF
[
aarx
][(
1
+
6
*
(
2
*
UL_RB_ID_NB_IoT
-
frame_parms
->
N_RB_DL
)
+
((
l
+
first_symbol_offset
)
*
(
frame_parms
->
ofdm_symbol_size
)))];
//dl_ch0++;
}
for
(
i
=
0
;
i
<
12
;
i
++
)
{
nsssF_ext
[
i
]
=
nsss_rxF
[
i
];
}
}
return
(
0
);
}
This diff is collapsed.
Click to expand it.
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
754fc0e9
...
...
@@ -53,6 +53,15 @@ int generate_sss_NB_IoT(int32_t **txdataF,
unsigned
short
frame_number
,
// new attribute (Get value from higher layer), it does not exist for LTE
unsigned
short
RB_IoT_ID
);
// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
//*****************Vincent part for Cell ID estimation from NSSS ******************//
int
rx_nsss_NB_IoT
(
PHY_VARS_UE_NB_IoT
*
ue
,
int32_t
*
tot_metric
);
int
nsss_extract_NB_IoT
(
PHY_VARS_UE_NB_IoT
*
ue
,
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
int32_t
**
nsss_ext
,
int
l
);
//NRS
void
generate_pilots_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
phy_vars_eNB
,
...
...
This diff is collapsed.
Click to expand it.
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