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
1447d0fa
Commit
1447d0fa
authored
Apr 10, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Synchronization signals scheduling update
parent
b61e8007
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
81 additions
and
35 deletions
+81
-35
cmake_targets/build_oai
cmake_targets/build_oai
+1
-1
openair1/PHY/INIT/nr_init.c
openair1/PHY/INIT/nr_init.c
+2
-2
openair1/PHY/NR_TRANSPORT/nr_pss.c
openair1/PHY/NR_TRANSPORT/nr_pss.c
+7
-9
openair1/PHY/NR_TRANSPORT/nr_sss.c
openair1/PHY/NR_TRANSPORT/nr_sss.c
+7
-9
openair1/PHY/defs.h
openair1/PHY/defs.h
+4
-0
openair1/SCHED_NR/phy_procedures_nr_common.c
openair1/SCHED_NR/phy_procedures_nr_common.c
+39
-0
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+12
-3
targets/RT/USER/nr-ru.c
targets/RT/USER/nr-ru.c
+6
-8
targets/RT/USER/nr-softmodem.c
targets/RT/USER/nr-softmodem.c
+3
-3
No files found.
cmake_targets/build_oai
View file @
1447d0fa
...
...
@@ -895,7 +895,7 @@ function main() {
# build RF device and transport protocol libraries
#####################################
if
[
"
$eNB
"
=
"1"
-o
"
$UE
"
=
"1"
-o
"
$gNB
"
=
"1"
-o
"
$nrUE
"
=
"1"
-
o
"
$HWLAT
"
=
"1"
]
;
then
if
[
"
$eNB
"
=
"1"
-o
"
$UE
"
=
"1"
-o
"
$gNB
"
=
"1"
-o
"
$nrUE
"
=
"1"
-o
"
$HWLAT
"
=
"1"
]
;
then
build_dir
=
$build_dir
...
...
openair1/PHY/INIT/nr_init.c
View file @
1447d0fa
...
...
@@ -80,7 +80,7 @@ int phy_init_nr_gNB(PHY_VARS_gNB *gNB,
// shortcuts
NR_DL_FRAME_PARMS
*
const
fp
=
&
gNB
->
frame_parms
;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_config_request_t
*
cfg
=
gNB
->
gNB_config
;
NR_gNB_COMMON
*
const
common_vars
=
&
gNB
->
common_vars
;
LTE_eNB_PUSCH
**
const
pusch_vars
=
gNB
->
pusch_vars
;
LTE_eNB_SRS
*
const
srs_vars
=
gNB
->
srs_vars
;
...
...
@@ -469,7 +469,7 @@ void phy_config_request(PHY_Config_t *phy_config) {
void
phy_free_nr_gNB
(
PHY_VARS_gNB
*
gNB
)
{
// NR_DL_FRAME_PARMS* const fp = &gNB->frame_parms;
nfapi_config_request_t
*
cfg
=
&
gNB
->
gNB_config
;
nfapi_config_request_t
*
cfg
=
gNB
->
gNB_config
;
NR_gNB_COMMON
*
const
common_vars
=
&
gNB
->
common_vars
;
LTE_eNB_PUSCH
**
const
pusch_vars
=
gNB
->
pusch_vars
;
LTE_eNB_SRS
*
const
srs_vars
=
gNB
->
srs_vars
;
...
...
openair1/PHY/NR_TRANSPORT/nr_pss.c
View file @
1447d0fa
...
...
@@ -28,9 +28,8 @@
int
nr_generate_pss
(
int16_t
*
d_pss
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
ssb_start_subcarrier
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
config
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
m
,
k
,
l
;
...
...
@@ -38,7 +37,7 @@ int nr_generate_pss( int16_t *d_pss,
int16_t
x
[
NR_PSS_LENGTH
];
const
int
x_initial
[
7
]
=
{
0
,
1
,
1
,
0
,
1
,
1
,
1
};
uint8_t
Nid2
=
config
.
sch_config
.
physical_cell_id
.
value
%
3
;
uint8_t
Nid2
=
config
->
sch_config
.
physical_cell_id
.
value
%
3
;
/// Sequence generation
for
(
i
=
0
;
i
<
7
;
i
++
)
...
...
@@ -50,22 +49,21 @@ int nr_generate_pss( int16_t *d_pss,
for
(
i
=
0
;
i
<
NR_PSS_LENGTH
;
i
++
)
{
m
=
(
i
+
43
*
Nid2
)
%
(
NR_PSS_LENGTH
);
d_pss
[
i
]
=
(
1
-
2
*
x
[
m
])
*
32767
;
d_pss
[
i
]
=
(
1
-
2
*
x
[
m
])
*
768
;
}
/// Resource mapping
a
=
(
config
.
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
.
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// PSS occupies a predefined position (subcarriers 56-182, symbol 0) within the SSB block starting from
k
=
frame_parms
->
first_carrier_offset
+
ssb_start_subcarrier
+
56
;
//and
k
=
frame_parms
->
first_carrier_offset
+
config
->
sch_config
.
ssb_subcarrier_offset
.
value
+
56
;
//and
l
=
ssb_start_symbol
;
for
(
m
=
0
;
m
<
NR_PSS_LENGTH
;
m
++
)
{
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_pss
[
m
])
>>
15
;
//((int16_t*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k) + 1] = (a * pss_mod[2*m + 1]) >> 15;
((
short
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_pss
[
m
])
>>
15
;
k
+=
1
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
...
...
openair1/PHY/NR_TRANSPORT/nr_sss.c
View file @
1447d0fa
...
...
@@ -28,9 +28,8 @@ extern short nr_mod_table[MOD_TABLE_SIZE_SHORT];
int
nr_generate_sss
(
int16_t
*
d_sss
,
int32_t
**
txdataF
,
int16_t
amp
,
int16_t
ssb_start_subcarrier
,
uint8_t
ssb_start_symbol
,
nfapi_config_request_t
config
,
nfapi_config_request_t
*
config
,
NR_DL_FRAME_PARMS
*
frame_parms
)
{
int
i
,
m
,
k
,
l
;
...
...
@@ -42,7 +41,7 @@ int nr_generate_sss( int16_t *d_sss,
const
int
x1_initial
[
7
]
=
{
1
,
0
,
0
,
0
,
0
,
0
,
0
};
/// Sequence generation
Nid
=
config
.
sch_config
.
physical_cell_id
.
value
;
Nid
=
config
->
sch_config
.
physical_cell_id
.
value
;
Nid2
=
Nid
%
3
;
Nid1
=
(
Nid
-
Nid2
)
/
3
;
...
...
@@ -60,22 +59,21 @@ int nr_generate_sss( int16_t *d_sss,
m1
=
Nid1
%
112
;
for
(
i
=
0
;
i
<
NR_SSS_LENGTH
;
i
++
)
{
d_sss
[
i
]
=
(
1
-
2
*
x0
[(
i
+
m0
)
%
NR_SSS_LENGTH
]
)
*
(
1
-
2
*
x1
[(
i
+
m1
)
%
NR_SSS_LENGTH
]
)
*
32767
;
d_sss
[
i
]
=
(
1
-
2
*
x0
[(
i
+
m0
)
%
NR_SSS_LENGTH
]
)
*
(
1
-
2
*
x1
[(
i
+
m1
)
%
NR_SSS_LENGTH
]
)
*
768
;
}
/// Resource mapping
a
=
(
config
.
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
a
=
(
config
->
rf_config
.
tx_antenna_ports
.
value
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15
)
>>
15
;
for
(
aa
=
0
;
aa
<
config
.
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
for
(
aa
=
0
;
aa
<
config
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
// SSS occupies a predefined position (subcarriers 56-182, symbol 2) within the SSB block starting from
k
=
frame_parms
->
first_carrier_offset
+
ssb_start_subcarrier
+
56
;
//and
k
=
frame_parms
->
first_carrier_offset
+
config
->
sch_config
.
ssb_subcarrier_offset
.
value
+
56
;
//and
l
=
ssb_start_symbol
+
2
;
for
(
m
=
0
;
m
<
NR_SSS_LENGTH
;
m
++
)
{
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_sss
[
2
*
m
])
>>
15
;
//((int16_t*)txdataF[aa])[2*(l*frame_parms->ofdm_symbol_size + k) + 1] = (a * sss_mod[2*m + 1]) >> 15;
((
int16_t
*
)
txdataF
[
aa
])[
2
*
(
l
*
frame_parms
->
ofdm_symbol_size
+
k
)]
=
(
a
*
d_sss
[
m
])
>>
15
;
k
+=
1
;
if
(
k
>=
frame_parms
->
ofdm_symbol_size
)
{
...
...
openair1/PHY/defs.h
View file @
1447d0fa
...
...
@@ -1972,6 +1972,10 @@ typedef struct PHY_VARS_gNB_s {
uint8_t
pbch_pdu
[
4
];
//PBCH_PDU_SIZE
char
gNB_generate_rar
;
/// NR synchronization sequences
int16_t
d_pss
[
NR_PSS_LENGTH
];
int16_t
d_sss
[
NR_SSS_LENGTH
];
/// Indicator set to 0 after first SR
uint8_t
first_sr
[
NUMBER_OF_UE_MAX
];
...
...
openair1/SCHED_NR/phy_procedures_nr_common.c
View file @
1447d0fa
...
...
@@ -40,3 +40,42 @@ nr_subframe_t nr_subframe_select(nfapi_config_request_t *cfg,unsigned char subfr
if
(
cfg
->
subframe_config
.
duplex_mode
.
value
==
FDD
)
return
(
SF_DL
);
}
// First possible symbol is used with n=0
int
nr_get_ssb_start_symbol
(
nfapi_config_request_t
*
cfg
,
NR_DL_FRAME_PARMS
*
fp
)
{
int
mu
=
cfg
->
subframe_config
.
numerology_index_mu
.
value
;
int
symbol
=
0
;
switch
(
mu
)
{
case
NR_MU_0
:
symbol
=
2
;
break
;
case
NR_MU_1
:
// case B
symbol
=
4
;
break
;
case
NR_MU_3
:
symbol
=
4
;
break
;
case
NR_MU_4
:
symbol
=
8
;
break
;
default:
AssertFatal
(
0
==
1
,
"Invalid numerology index %d for the synchronization block
\n
"
,
mu
);
}
if
(
cfg
->
sch_config
.
half_frame_index
)
symbol
+=
(
5
*
fp
->
symbols_per_slot
*
fp
->
slots_per_subframe
);
return
symbol
;
}
void
nr_set_ssb_first_subcarrier
(
nfapi_config_request_t
*
cfg
)
{
cfg
->
sch_config
.
ssb_subcarrier_offset
.
value
=
0
;
}
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
1447d0fa
...
...
@@ -49,6 +49,15 @@ void nr_common_signal_procedures (PHY_VARS_gNB *gNB,int frame, int subframe) {
LOG_D
(
PHY
,
"common_signal_procedures: frame %d, subframe %d
\n
"
,
frame
,
subframe
);
int
ssb_start_symbol
=
nr_get_ssb_start_symbol
(
cfg
,
fp
);
nr_set_ssb_first_subcarrier
(
cfg
);
if
(
subframe
==
(
cfg
->
sch_config
.
half_frame_index
)
?
0
:
5
)
{
nr_generate_pss
(
gNB
->
d_pss
,
txdataF
,
AMP
,
ssb_start_symbol
,
cfg
,
fp
);
nr_generate_sss
(
gNB
->
d_sss
,
txdataF
,
AMP_OVER_2
,
ssb_start_symbol
,
cfg
,
fp
);
}
}
void
phy_procedures_gNB_TX
(
PHY_VARS_gNB
*
gNB
,
...
...
@@ -66,8 +75,8 @@ void phy_procedures_gNB_TX(PHY_VARS_gNB *gNB,
if
((
cfg
->
subframe_config
.
duplex_mode
.
value
==
TDD
)
&&
(
nr_subframe_select
(
cfg
,
subframe
)
==
SF_UL
))
return
;
//
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX+offset,1);
//
if (do_meas==1) start_meas(&gNB->phy_proc_tx);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_PROCEDURES_ENB_TX
+
offset
,
1
);
if
(
do_meas
==
1
)
start_meas
(
&
gNB
->
phy_proc_tx
);
// clear the transmit data array for the current subframe
for
(
aa
=
0
;
aa
<
cfg
->
rf_config
.
tx_antenna_ports
.
value
;
aa
++
)
{
...
...
targets/RT/USER/nr-ru.c
View file @
1447d0fa
...
...
@@ -1375,6 +1375,7 @@ static void* ru_thread( void* param ) {
if
(
ru
->
if_south
==
LOCAL_RF
)
{
// configure RF parameters only
fill_rf_config
(
ru
,
ru
->
rf_config_file
);
nr_init_frame_parms
(
ru
->
gNB_list
[
0
]
->
gNB_config
,
fp
);
nr_dump_frame_parms
(
fp
);
phy_init_RU
(
ru
);
ret
=
openair0_device_load
(
&
ru
->
rfdevice
,
&
ru
->
openair0_cfg
);
...
...
@@ -1392,9 +1393,6 @@ static void* ru_thread( void* param ) {
wait_sync
(
"ru_thread"
);
// Start RF device if any
if
(
ru
->
start_rf
)
{
if
(
ru
->
start_rf
(
ru
)
!=
0
)
...
...
targets/RT/USER/nr-softmodem.c
View file @
1447d0fa
...
...
@@ -760,7 +760,7 @@ void wait_gNBs(void) {
for
(
j
=
0
;
j
<
RC
.
nb_L1_CC
[
i
];
j
++
)
{
if
(
RC
.
gNB
[
i
][
j
]
->
configured
==
0
)
{
waiting
=
1
;
waiting
=
0
;
//skip gNB configuration check
break
;
}
}
...
...
@@ -839,7 +839,7 @@ int restart_L1L2(module_id_t gnb_id)
int
cc_id
;
MessageDef
*
msg_p
=
NULL
;
LOG_W
(
ENB_APP
,
"restarting
lte
-softmodem
\n
"
);
LOG_W
(
ENB_APP
,
"restarting
nr
-softmodem
\n
"
);
/* block threads */
sync_var
=
-
1
;
...
...
@@ -859,7 +859,7 @@ int restart_L1L2(module_id_t gnb_id)
LOG_E
(
RRC
,
"Create task for RRC eNB failed
\n
"
);
return
-
1
;
}
else
{
LOG_I
(
RRC
,
"Re-created task for RRC
e
NB successfully
\n
"
);
LOG_I
(
RRC
,
"Re-created task for RRC
g
NB successfully
\n
"
);
}
if
(
itti_create_task
(
TASK_L2L1
,
l2l1_task
,
NULL
)
<
0
)
{
LOG_E
(
PDCP
,
"Create task for L2L1 failed
\n
"
);
...
...
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