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
2c75720d
Commit
2c75720d
authored
Mar 13, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
multiple ssb detection via pbch dmrs (ordered list)
parent
3fc4c6a4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
28 deletions
+79
-28
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+77
-27
openair1/PHY/defs_nr_UE.h
openair1/PHY/defs_nr_UE.h
+2
-1
No files found.
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
2c75720d
...
@@ -54,15 +54,61 @@ int cnt=0;
...
@@ -54,15 +54,61 @@ int cnt=0;
#define DEBUG_INITIAL_SYNCH
#define DEBUG_INITIAL_SYNCH
// create a new node of SSB structure
NR_UE_SSB
*
create_ssb_node
(
uint8_t
i
,
uint8_t
h
)
{
NR_UE_SSB
*
new_node
=
(
NR_UE_SSB
*
)
malloc
(
sizeof
(
NR_UE_SSB
));
new_node
->
i_ssb
=
i
;
new_node
->
n_hf
=
h
;
new_node
->
c_re
=
0
;
new_node
->
c_im
=
0
;
new_node
->
metric
=
0
;
new_node
->
next_ssb
=
NULL
;
return
new_node
;
}
// insertion of the structure in the ordered list (highest metric first)
NR_UE_SSB
*
insert_into_list
(
NR_UE_SSB
*
head
,
NR_UE_SSB
*
node
)
{
if
(
node
->
metric
>
head
->
metric
)
{
node
->
next_ssb
=
head
;
head
=
node
;
return
head
;
}
NR_UE_SSB
*
current
=
head
;
while
(
current
->
next_ssb
!=
NULL
)
{
NR_UE_SSB
*
temp
=
current
->
next_ssb
;
if
(
node
->
metric
>
current
->
metric
)
{
node
->
next_ssb
=
temp
;
current
->
next_ssb
=
node
;
return
head
;
}
else
current
=
temp
;
}
current
->
next_ssb
=
node
;
return
head
;
}
void
free_list
(
NR_UE_SSB
*
node
)
{
if
(
node
->
next_ssb
!=
NULL
)
free_list
(
node
->
next_ssb
);
free
(
node
);
}
int
nr_pbch_detection
(
PHY_VARS_NR_UE
*
ue
,
int
pbch_initial_symbol
,
runmode_t
mode
)
int
nr_pbch_detection
(
PHY_VARS_NR_UE
*
ue
,
int
pbch_initial_symbol
,
runmode_t
mode
)
{
{
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
int
ret
=-
1
;
int
ret
=-
1
;
uint8_t
best_ssb
=
0
;
uint8_t
n_hf
=
0
;
uint32_t
best_metric
=
0
;
NR_UE_SSB
*
current_ssb
=
malloc
(
sizeof
(
NR_UE_SSB
));
NR_UE_SSB
*
best_ssb
=
NULL
;
NR_UE_SSB
*
current_ssb
;
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)
\n
"
,
ue
->
Mod_id
,
LOG_I
(
PHY
,
"[UE%d] Initial sync: starting PBCH detection (rx_offset %d)
\n
"
,
ue
->
Mod_id
,
...
@@ -76,11 +122,8 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -76,11 +122,8 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
for
(
int
hf
=
0
;
hf
<
N_hf
;
hf
++
)
{
for
(
int
hf
=
0
;
hf
<
N_hf
;
hf
++
)
{
for
(
int
l
=
0
;
l
<
N_L
;
l
++
)
{
for
(
int
l
=
0
;
l
<
N_L
;
l
++
)
{
// initialization of structure parameters
// initialization of structure
current_ssb
->
n_hf
=
hf
;
current_ssb
=
create_ssb_node
(
l
,
hf
);
current_ssb
->
i_ssb
=
l
;
current_ssb
->
c_re
=
0
;
current_ssb
->
c_im
=
0
;
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
...
@@ -94,21 +137,24 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -94,21 +137,24 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
current_ssb
->
metric
=
current_ssb
->
c_re
*
current_ssb
->
c_re
+
current_ssb
->
c_im
+
current_ssb
->
c_re
;
current_ssb
->
metric
=
current_ssb
->
c_re
*
current_ssb
->
c_re
+
current_ssb
->
c_im
+
current_ssb
->
c_re
;
if
(
current_ssb
->
metric
>
best_metric
)
{
// if metric of current structure is higher than the best one
// generate a list of SSB structures
best_metric
=
current_ssb
->
metric
;
if
(
best_ssb
==
NULL
)
best_ssb
=
l
;
best_ssb
=
current_ssb
;
n_hf
=
hf
;
else
}
best_ssb
=
insert_into_list
(
best_ssb
,
current_ssb
);
}
}
}
}
NR_UE_SSB
*
temp_ptr
=
best_ssb
;
while
(
ret
!=
0
&&
temp_ptr
!=
NULL
)
{
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
start_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
#endif
// computing channel estimation for selected best ssb
// computing channel estimation for selected best ssb
for
(
int
i
=
pbch_initial_symbol
;
i
<
pbch_initial_symbol
+
3
;
i
++
)
for
(
int
i
=
pbch_initial_symbol
;
i
<
pbch_initial_symbol
+
3
;
i
++
)
nr_pbch_channel_estimation
(
ue
,
0
,
0
,
i
,
i
-
pbch_initial_symbol
,
best_ssb
,
n_hf
);
nr_pbch_channel_estimation
(
ue
,
0
,
0
,
i
,
i
-
pbch_initial_symbol
,
best_ssb
->
i_ssb
,
best_ssb
->
n_hf
);
#if UE_TIMING_TRACE
#if UE_TIMING_TRACE
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
stop_meas
(
&
ue
->
dlsch_channel_estimation_stats
);
#endif
#endif
...
@@ -118,10 +164,15 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -118,10 +164,15 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
0
,
0
,
best
_ssb
,
temp_ptr
->
i
_ssb
,
SISO
,
SISO
,
ue
->
high_speed_flag
);
ue
->
high_speed_flag
);
temp_ptr
=
temp_ptr
->
next_ssb
;
}
free_list
(
best_ssb
);
if
(
ret
==
0
)
{
if
(
ret
==
0
)
{
frame_parms
->
nb_antenna_ports_eNB
=
1
;
//pbch_tx_ant;
frame_parms
->
nb_antenna_ports_eNB
=
1
;
//pbch_tx_ant;
...
@@ -144,7 +195,6 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
...
@@ -144,7 +195,6 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, int pbch_initial_symbol, runmode_t mod
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
LOG_I
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully
\n
"
,
ue
->
Mod_id
);
LOG_I
(
PHY
,
"[UE%d] Initial sync: pbch decoded sucessfully
\n
"
,
ue
->
Mod_id
);
#endif
#endif
return
(
0
);
return
(
0
);
}
else
{
}
else
{
return
(
-
1
);
return
(
-
1
);
...
...
openair1/PHY/defs_nr_UE.h
View file @
2c75720d
...
@@ -957,6 +957,7 @@ typedef struct NR_UE_SSB {
...
@@ -957,6 +957,7 @@ typedef struct NR_UE_SSB {
uint32_t
metric
;
// metric to order SSB hypothesis
uint32_t
metric
;
// metric to order SSB hypothesis
uint32_t
c_re
;
uint32_t
c_re
;
uint32_t
c_im
;
uint32_t
c_im
;
struct
NR_UE_SSB
*
next_ssb
;
}
NR_UE_SSB
;
}
NR_UE_SSB
;
/*typedef enum {
/*typedef enum {
...
@@ -1088,7 +1089,7 @@ typedef struct {
...
@@ -1088,7 +1089,7 @@ typedef struct {
uint32_t
nr_gold_pbch
[
2
][
64
][
NR_PBCH_DMRS_LENGTH_DWORD
];
uint32_t
nr_gold_pbch
[
2
][
64
][
NR_PBCH_DMRS_LENGTH_DWORD
];
/// PDSCH DMRS
/// PDSCH DMRS
uint32_t
nr_gold_pdsch
[
2
][
20
][
2
][
21
];
uint32_t
nr_gold_pdsch
[
2
][
20
][
2
][
52
];
/// PDCCH DMRS
/// PDCCH DMRS
uint32_t
nr_gold_pdcch
[
7
][
20
][
3
][
52
];
uint32_t
nr_gold_pdcch
[
7
][
20
][
3
][
52
];
...
...
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