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
wangwenhui
OpenXG-RAN
Commits
c3420b01
Commit
c3420b01
authored
Jul 25, 2018
by
Hongzhi Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ue update symbol num synchro
parent
734646bc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
24 deletions
+25
-24
openair1/PHY/MODULATION/slot_fep.c
openair1/PHY/MODULATION/slot_fep.c
+1
-1
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
+1
-6
openair1/PHY/NR_REFSIG/ss_pbch_nr.h
openair1/PHY/NR_REFSIG/ss_pbch_nr.h
+4
-4
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
+17
-11
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
+2
-2
No files found.
openair1/PHY/MODULATION/slot_fep.c
View file @
c3420b01
...
@@ -191,7 +191,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
...
@@ -191,7 +191,7 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue,
switch
(
channel
){
switch
(
channel
){
case
NR_PBCH_EST
:
case
NR_PBCH_EST
:
if
((
l
>
0
)
&&
(
l
<
4
))
{
if
((
l
>
4
)
&&
(
l
<
8
))
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antenna_ports_eNB
;
aa
++
)
{
#ifdef DEBUG_FEP
#ifdef DEBUG_FEP
...
...
openair1/PHY/NR_REFSIG/nr_dmrs_rx.c
View file @
c3420b01
...
@@ -51,12 +51,7 @@ int wf2[12][2] = {{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,1},{1,1},{1,-1
...
@@ -51,12 +51,7 @@ int wf2[12][2] = {{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,1},{1,1},{1,-1
int
wt2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
}};
int
wt2
[
12
][
2
]
=
{{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
},{
1
,
-
1
}};
//short nr_mod_table[14] = {0,0,-23170,-23170,23170,23170,-23170,-23170,-23170,23170,23170,-23170,23170,23170};
short
nr_rx_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
short
nr_rx_mod_table
[
NR_MOD_TABLE_SIZE_SHORT
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
//short nr_mod_table[14] = {0,0,23170,23170,-23170,-23170,23170,23170,23170,-23170,-23170,23170,-23170,-23170};
//extern short nr_mod_table[NR_MOD_TABLE_SIZE_SHORT];
short
nr_mod_table
[
14
]
=
{
0
,
0
,
23170
,
-
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
23170
,
23170
,
-
23170
,
-
23170
,
-
23170
,
23170
};
int
nr_pdcch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
int
nr_pdcch_dmrs_rx
(
PHY_VARS_NR_UE
*
ue
,
uint8_t
eNB_offset
,
uint8_t
eNB_offset
,
...
...
openair1/PHY/NR_REFSIG/ss_pbch_nr.h
View file @
c3420b01
...
@@ -51,10 +51,10 @@
...
@@ -51,10 +51,10 @@
#define PSS_SC_START_NR (52)
/* see from TS 38.211 table 7.4.3.1-1: Resources within an SS/PBCH block for PSS... */
#define PSS_SC_START_NR (52)
/* see from TS 38.211 table 7.4.3.1-1: Resources within an SS/PBCH block for PSS... */
/* define ofdm symbol offset in the SS/PBCH block of NR synchronisation */
/* define ofdm symbol offset in the SS/PBCH block of NR synchronisation */
#define PSS_SYMBOL_NB (
0
)
/* symbol numbers for each element */
#define PSS_SYMBOL_NB (
4
)
/* symbol numbers for each element */
#define PBCH_SYMBOL_NB (
1
)
#define PBCH_SYMBOL_NB (
5
)
#define SSS_SYMBOL_NB (
2
)
#define SSS_SYMBOL_NB (
6
)
#define PBCH_LAST_SYMBOL_NB (
3
)
#define PBCH_LAST_SYMBOL_NB (
7
)
/* SS/PBCH parameters */
/* SS/PBCH parameters */
#define N_RB_SS_PBCH_BLOCK (20)
#define N_RB_SS_PBCH_BLOCK (20)
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_initial_sync.c
View file @
c3420b01
...
@@ -58,6 +58,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -58,6 +58,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
uint8_t
l
,
pbch_decoded
,
frame_mod4
,
pbch_tx_ant
,
dummy
;
uint8_t
l
,
pbch_decoded
,
frame_mod4
,
pbch_tx_ant
,
dummy
;
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
NR_DL_FRAME_PARMS
*
frame_parms
=&
ue
->
frame_parms
;
char
phich_resource
[
6
];
char
phich_resource
[
6
];
int
ret
=-
1
;
#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
,
...
@@ -101,7 +102,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -101,7 +102,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
printf
(
"pbch_detection nid_cell %d
\n
"
,
frame_parms
->
Nid_cell
);
printf
(
"pbch_detection nid_cell %d
\n
"
,
frame_parms
->
Nid_cell
);
//for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
//for (frame_mod4=0; frame_mod4<4; frame_mod4++) {
pbch_tx_an
t
=
nr_rx_pbch
(
ue
,
re
t
=
nr_rx_pbch
(
ue
,
&
ue
->
proc
.
proc_rxtx
[
0
],
&
ue
->
proc
.
proc_rxtx
[
0
],
ue
->
pbch_vars
[
0
],
ue
->
pbch_vars
[
0
],
frame_parms
,
frame_parms
,
...
@@ -115,9 +116,9 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -115,9 +116,9 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
//}
//}
if
(
pbch_decoded
)
{
if
(
ret
==
0
)
{
frame_parms
->
nb_antenna_ports_eNB
=
pbch_tx_ant
;
frame_parms
->
nb_antenna_ports_eNB
=
1
;
//
pbch_tx_ant;
// set initial transmission mode to 1 or 2 depending on number of detected TX antennas
// set initial transmission mode to 1 or 2 depending on number of detected TX antennas
//frame_parms->mode1_flag = (pbch_tx_ant==1);
//frame_parms->mode1_flag = (pbch_tx_ant==1);
...
@@ -131,13 +132,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -131,13 +132,7 @@ int nr_pbch_detection(PHY_VARS_NR_UE *ue, runmode_t mode)
for
(
int
i
=
0
;
i
<
RX_NB_TH
;
i
++
)
for
(
int
i
=
0
;
i
<
RX_NB_TH
;
i
++
)
{
{
ue
->
proc
.
proc_rxtx
[
i
].
frame_rx
=
(((
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
&
3
)
<<
6
)
+
(
ue
->
pbch_vars
[
0
]
->
decoded_output
[
1
]
>>
2
))
<<
2
;
ue
->
proc
.
proc_rxtx
[
i
].
frame_rx
=
(((
ue
->
pbch_vars
[
0
]
->
decoded_output
[
2
]
&
3
)
<<
6
)
+
(
ue
->
pbch_vars
[
0
]
->
decoded_output
[
1
]
>>
2
))
<<
2
;
#ifndef USER_MODE
// one frame delay
ue
->
proc
.
proc_rxtx
[
i
].
frame_rx
++
;
#endif
ue
->
proc
.
proc_rxtx
[
i
].
frame_tx
=
ue
->
proc
.
proc_rxtx
[
0
].
frame_rx
;
ue
->
proc
.
proc_rxtx
[
i
].
frame_tx
=
ue
->
proc
.
proc_rxtx
[
0
].
frame_rx
;
}
}
#ifdef DEBUG_INITIAL_SYNCH
#ifdef DEBUG_INITIAL_SYNCH
...
@@ -160,7 +155,7 @@ char prefix_string[2][9] = {"NORMAL","EXTENDED"};
...
@@ -160,7 +155,7 @@ char prefix_string[2][9] = {"NORMAL","EXTENDED"};
int
nr_initial_sync
(
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
)
int
nr_initial_sync
(
PHY_VARS_NR_UE
*
ue
,
runmode_t
mode
)
{
{
int32_t
sync_pos
,
sync_pos2
,
k_ssb
,
N_ssb_crb
;
int32_t
sync_pos
,
sync_pos2
,
k_ssb
,
N_ssb_crb
,
sync_pos_slot
;
int32_t
metric_fdd_ncp
=
0
;
int32_t
metric_fdd_ncp
=
0
;
uint8_t
phase_fdd_ncp
;
uint8_t
phase_fdd_ncp
;
...
@@ -203,8 +198,19 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
...
@@ -203,8 +198,19 @@ int nr_initial_sync(PHY_VARS_NR_UE *ue, runmode_t mode)
/* process pss search on received buffer */
/* process pss search on received buffer */
sync_pos
=
pss_synchro_nr
(
ue
,
NO_RATE_CHANGE
);
sync_pos
=
pss_synchro_nr
(
ue
,
NO_RATE_CHANGE
);
sync_pos_slot
=
(
frame_parms
->
samples_per_tti
>>
1
)
-
4
*
(
frame_parms
->
ofdm_symbol_size
+
frame_parms
->
nb_prefix_samples
);
if
(
sync_pos
>=
frame_parms
->
nb_prefix_samples
)
sync_pos2
=
sync_pos
-
frame_parms
->
nb_prefix_samples
;
else
sync_pos2
=
sync_pos
+
FRAME_LENGTH_COMPLEX_SAMPLES
-
frame_parms
->
nb_prefix_samples
;
/* offset is used by sss serach as it is returned from pss search */
/* offset is used by sss serach as it is returned from pss search */
ue
->
rx_offset
=
sync_pos
;
if
(
sync_pos2
>=
sync_pos_slot
)
ue
->
rx_offset
=
sync_pos2
-
sync_pos_slot
;
else
ue
->
rx_offset
=
FRAME_LENGTH_COMPLEX_SAMPLES
+
sync_pos2
-
sync_pos_slot
;
// write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
// write_output("rxdata1.m","rxd1",ue->common_vars.rxdata[0],10*frame_parms->samples_per_tti,1,1);
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c
View file @
c3420b01
...
@@ -498,7 +498,7 @@ unsigned char sign(int8_t x) {
...
@@ -498,7 +498,7 @@ unsigned char sign(int8_t x) {
uint8_t
pbch_deinterleaving_pattern
[
32
]
=
{
28
,
0
,
31
,
30
,
1
,
29
,
25
,
27
,
22
,
2
,
24
,
3
,
4
,
5
,
6
,
7
,
18
,
21
,
20
,
8
,
9
,
10
,
11
,
19
,
26
,
12
,
13
,
14
,
15
,
16
,
23
,
17
};
uint8_t
pbch_deinterleaving_pattern
[
32
]
=
{
28
,
0
,
31
,
30
,
1
,
29
,
25
,
27
,
22
,
2
,
24
,
3
,
4
,
5
,
6
,
7
,
18
,
21
,
20
,
8
,
9
,
10
,
11
,
19
,
26
,
12
,
13
,
14
,
15
,
16
,
23
,
17
};
uint16_
t
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
in
t
nr_rx_pbch
(
PHY_VARS_NR_UE
*
ue
,
UE_nr_rxtx_proc_t
*
proc
,
UE_nr_rxtx_proc_t
*
proc
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_UE_PBCH
*
nr_ue_pbch_vars
,
NR_DL_FRAME_PARMS
*
frame_parms
,
NR_DL_FRAME_PARMS
*
frame_parms
,
...
@@ -546,7 +546,7 @@ uint16_t nr_rx_pbch( PHY_VARS_NR_UE *ue,
...
@@ -546,7 +546,7 @@ uint16_t nr_rx_pbch( PHY_VARS_NR_UE *ue,
// clear LLR buffer
// clear LLR buffer
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
);
memset
(
nr_ue_pbch_vars
->
llr
,
0
,
NR_POLAR_PBCH_E
);
for
(
symbol
=
1
;
symbol
<
4
;
symbol
++
)
{
for
(
symbol
=
5
;
symbol
<
8
;
symbol
++
)
{
//printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF);
//printf("address dataf %p",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF);
//write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,2,1);
//write_output("rxdataF0_pbch.m","rxF0pbch",nr_ue_common_vars->common_vars_rx_data_per_thread[ue->current_thread_id[subframe_rx]].rxdataF,frame_parms->ofdm_symbol_size*4,2,1);
...
...
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