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
canghaiwuhen
OpenXG-RAN
Commits
5a13a7d4
Commit
5a13a7d4
authored
Jan 15, 2018
by
Matthieu Kanj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unstable version, first phase for NPSS testing
parent
a2d9f0d8
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
1563 additions
and
178 deletions
+1563
-178
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+0
-1
openair1/PHY/INIT/defs.h
openair1/PHY/INIT/defs.h
+2
-1
openair1/PHY/INIT/lte_parms.c
openair1/PHY/INIT/lte_parms.c
+1
-1
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
+105
-105
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
+4
-3
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
+3
-2
openair1/SCHED/defs_NB_IoT.h
openair1/SCHED/defs_NB_IoT.h
+2
-2
openair1/SCHED/phy_procedures_lte_eNb.c
openair1/SCHED/phy_procedures_lte_eNb.c
+9
-0
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
+7
-6
openair2/ENB_APP/enb_config.c
openair2/ENB_APP/enb_config.c
+1309
-0
openair2/ENB_APP/enb_config.h
openair2/ENB_APP/enb_config.h
+67
-19
openair2/LAYER2/MAC/main_NB_IoT.c
openair2/LAYER2/MAC/main_NB_IoT.c
+14
-10
targets/RT/USER/lte-enb.c
targets/RT/USER/lte-enb.c
+15
-12
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+25
-16
No files found.
cmake_targets/CMakeLists.txt
View file @
5a13a7d4
...
...
@@ -1211,7 +1211,6 @@ endif()
set
(
ENB_APP_SRC
${
OPENAIR2_DIR
}
/ENB_APP/enb_app.c
${
OPENAIR2_DIR
}
/ENB_APP/enb_config.c
${
OPENAIR2_DIR
}
/ENB_APP/enb_config_NB_IoT.c
)
add_library
(
L2
...
...
openair1/PHY/INIT/defs.h
View file @
5a13a7d4
...
...
@@ -359,7 +359,8 @@ void lte_param_init(unsigned char N_tx_port_eNB,
/** @} */
// for NB-IoT
//////////////////////// for NB-IoT ////////////////////////////////////////////
int
init_frame_parms_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
osf
);
void
phy_init_lte_top_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
lte_frame_parms
);
...
...
openair1/PHY/INIT/lte_parms.c
View file @
5a13a7d4
...
...
@@ -226,7 +226,7 @@ void dump_frame_parms(LTE_DL_FRAME_PARMS *frame_parms)
//
NB-IoT
//
/////////////////////////////////////////////// NB-IoT ///////////////////////////////////////////////////////////////
int
init_frame_parms_NB_IoT
(
NB_IoT_DL_FRAME_PARMS
*
frame_parms
,
uint8_t
osf
)
{
...
...
openair1/PHY/LTE_TRANSPORT/npss_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -12,67 +12,18 @@
* \warning
*/
//
#include "PHY/defs.h"
#include "PHY/defs.h"
///////////////#include "PHY/defs_nb_iot.h"
//
#include "PHY/extern.h"
#include "PHY/extern.h"
#include <math.h>
#include "PHY/impl_defs_lte_NB_IoT.h"
#include "PHY/impl_defs_top_NB_IoT.h"
//
#include "PHY/impl_defs_lte_NB_IoT.h"
//
#include "PHY/impl_defs_top_NB_IoT.h"
//or #include "PHY/defs_nb_iot.h"
#include "PHY/LTE_REFSIG/primary_synch_NB_IoT.h"
// int generate_npss_NB_IoT(int32_t **txdataF,
// short amp,
// NB_IoT_DL_FRAME_PARMS *frame_parms,
// unsigned short symbol_offset, // symbol_offset should equal to 3 for NB-IoT
// unsigned short slot_offset,
// unsigned short RB_IoT_ID) // new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
// {
// unsigned short c,aa,a,s;
// unsigned short slot_id;
// short *primary_sync;
// unsigned short NB_IoT_start; // Index of the first RE in the RB dedicated for NB-IoT
// unsigned short bandwidth_even_odd;
// slot_id = slot_offset; // The id(0..19) of the slot including the NPSS signal // For NB-IoT, slod_id should be 10 (SF5)
// primary_sync = primary_synch_NB_IoT; // primary_synch_NB_IoT[264] of primary_synch_NB_IoT.h
// // Signal amplitude
// a = (frame_parms->nb_antennas_tx == 1) ? amp: (amp*ONE_OVER_SQRT2_Q15_NB_IoT)>>15;
// // Testing if the total number of RBs is even or odd (i.e. Identification of the bandwidth: 1.4, 3, 5, 10, ... MHz)
// bandwidth_even_odd = frame_parms->N_RB_DL % 2; // 0 for even, 1 for odd
// for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
// if(RB_IoT_ID < (frame_parms->N_RB_DL/2))
// {
// NB_IoT_start = frame_parms->ofdm_symbol_size - 12*(frame_parms->N_RB_DL/2) - (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
// } else {
// NB_IoT_start = (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
// }
// // For the In-band or Stand-alone case the REs of NPSS signal have the same positions
// for (s=0; s<11; s++ ) // loop on OFDM symbols
// {
// for (c=0; c<12; c++) { // loop on NB-IoT carriers
// ((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )] =
// (a * primary_sync[2*c + (2*12*s)]) >> 15;
// ((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )+1] =
// (a * primary_sync[2*c + (2*12*s) + 1]) >> 15;
// }
// }
// }
// return(0);
// }
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
short
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
unsigned
short
symbol_offset
,
// symbol_offset should equal to 3 for NB-IoT
unsigned
short
slot_offset
,
unsigned
short
RB_IoT_ID
)
// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
...
...
@@ -81,18 +32,13 @@ int generate_npss_NB_IoT(int32_t **txdataF,
unsigned
short
slot_id
;
short
*
primary_sync
;
unsigned
short
NB_IoT_start
;
// Index of the first RE in the RB dedicated for NB-IoT
unsigned
short
bandwidth_even_odd
;
unsigned
short
UL_RB_ID_NB_IoT
;
// index of the NB-IoT RB
unsigned
char
poffset
=
0
,
pilot
=
0
;
// poffset: base frequency offset of pilots; pilot: LTE pilot flag
UL_RB_ID_NB_IoT
=
frame_parms
->
NB_IoT_RB_ID
;
// index of RB dedicated to NB-IoT
unsigned
short
bandwidth_even_odd
;
slot_id
=
slot_offset
;
// The id(0..19) of the slot including the NPSS signal // For NB-IoT, slod_id should be 10 (SF5)
primary_sync
=
primary_synch_NB_IoT
;
// primary_synch_NB_IoT[264] of primary_synch_NB_IoT.h
// Signal amplitude
a
=
(
frame_parms
->
nb_antennas_tx
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15_NB_IoT
)
>>
15
;
a
=
(
frame_parms
->
nb_antennas_tx
==
1
)
?
amp
:
(
amp
*
ONE_OVER_SQRT2_Q15_NB_IoT
)
>>
15
;
// Testing if the total number of RBs is even or odd (i.e. Identification of the bandwidth: 1.4, 3, 5, 10, ... MHz)
bandwidth_even_odd
=
frame_parms
->
N_RB_DL
%
2
;
// 0 for even, 1 for odd
...
...
@@ -100,62 +46,116 @@ int generate_npss_NB_IoT(int32_t **txdataF,
for
(
aa
=
0
;
aa
<
frame_parms
->
nb_antennas_tx
;
aa
++
)
{
if
(
RB_IoT_ID
<
(
frame_parms
->
N_RB_DL
/
2
))
{
// RB in first half (below DC)
// NB_IoT_start = frame_parms->ofdm_symbol_size - 12*(frame_parms->N_RB_DL/2) - (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
NB_IoT_start
=
UL_RB_ID_NB_IoT
*
12
+
frame_parms
->
first_carrier_offset
;
}
else
{
// RB in the second half (above DC): DC is taken into account
// NB_IoT_start = 1+ (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
NB_IoT_start
=
1
+
bandwidth_even_odd
*
6
+
6
*
(
2
*
UL_RB_ID_NB_IoT
-
(
frame_parms
->
N_RB_DL
+
bandwidth_even_odd
));
{
NB_IoT_start
=
frame_parms
->
ofdm_symbol_size
-
12
*
(
frame_parms
->
N_RB_DL
/
2
)
-
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
else
{
NB_IoT_start
=
(
bandwidth_even_odd
*
6
)
+
12
*
(
RB_IoT_ID
%
(
int
)(
ceil
(
frame_parms
->
N_RB_DL
/
(
float
)
2
)));
}
// For the In-band or Stand-alone case the REs of NPSS signal have the same positions
for
(
s
=
0
;
s
<
11
;
s
++
)
// loop on OFDM symbols
{
// CRS (LTE pilot) position within subframe in time
// Note that pilot position takes into account symbol_offset value
if
(
frame_parms
->
mode1_flag
==
1
){
// SISO mode
if
(
s
==
1
||
s
==
4
||
s
==
8
){
pilot
=
1
;
if
(
s
==
1
||
s
==
8
){
poffset
=
3
;
}
}
}
if
(
pilot
==
0
){
for
(
c
=
0
;
c
<
12
;
c
++
)
{
// loop on NB-IoT carriers
{
for
(
c
=
0
;
c
<
12
;
c
++
)
{
// loop on NB-IoT carriers
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)]
=
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)])
>>
15
;
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)
+
1
]
=
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)
+
1
])
>>
15
;
}
}
}
return
(
0
);
}
// int generate_npss_NB_IoT(int32_t **txdataF,
// short amp,
// LTE_DL_FRAME_PARMS *frame_parms,
// unsigned short symbol_offset, // symbol_offset should equal to 3 for NB-IoT
// unsigned short slot_offset,
// unsigned short RB_IoT_ID) // new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
// {
// unsigned short c,aa,a,s;
// unsigned short slot_id;
// short *primary_sync;
// unsigned short NB_IoT_start; // Index of the first RE in the RB dedicated for NB-IoT
// unsigned short bandwidth_even_odd;
// unsigned short UL_RB_ID_NB_IoT; // index of the NB-IoT RB
// unsigned char poffset=0, pilot=0; // poffset: base frequency offset of pilots; pilot: LTE pilot flag
// UL_RB_ID_NB_IoT = frame_parms->NB_IoT_RB_ID; // index of RB dedicated to NB-IoT
// slot_id = slot_offset; // The id(0..19) of the slot including the NPSS signal // For NB-IoT, slod_id should be 10 (SF5)
// primary_sync = primary_synch_NB_IoT; // primary_synch_NB_IoT[264] of primary_synch_NB_IoT.h
// // Signal amplitude
// a = (frame_parms->nb_antennas_tx == 1) ? amp: (amp*ONE_OVER_SQRT2_Q15_NB_IoT)>>15;
// // Testing if the total number of RBs is even or odd (i.e. Identification of the bandwidth: 1.4, 3, 5, 10, ... MHz)
// bandwidth_even_odd = frame_parms->N_RB_DL % 2; // 0 for even, 1 for odd
// for (aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
// if(RB_IoT_ID < (frame_parms->N_RB_DL/2))
// { // RB in first half (below DC)
// // NB_IoT_start = frame_parms->ofdm_symbol_size - 12*(frame_parms->N_RB_DL/2) - (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
// NB_IoT_start = UL_RB_ID_NB_IoT*12 + frame_parms->first_carrier_offset;
// } else { // RB in the second half (above DC): DC is taken into account
// // NB_IoT_start = 1+ (bandwidth_even_odd*6) + 12*(RB_IoT_ID%(int)(ceil(frame_parms->N_RB_DL/(float)2)));
// NB_IoT_start = 1 + bandwidth_even_odd*6 + 6*(2*UL_RB_ID_NB_IoT - (frame_parms->N_RB_DL+bandwidth_even_odd));
// }
// // For the In-band or Stand-alone case the REs of NPSS signal have the same positions
// for (s=0; s<11; s++ ) // loop on OFDM symbols
// {
// // CRS (LTE pilot) position within subframe in time
// // Note that pilot position takes into account symbol_offset value
// if (frame_parms->mode1_flag==1){ // SISO mode
// if (s==1 || s==4 || s==8){
// pilot = 1;
// if (s==1 || s==8){
// poffset = 3;
// }
// }
// }
// if (pilot == 0){
// for (c=0; c<12; c++) { // loop on NB-IoT carriers
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)]
=
//
((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )] =
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)])
>>
15
;
//
(a * primary_sync[2*c + (2*12*s)]) >> 15;
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)
+
1
]
=
//
((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )+1] =
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)
+
1
])
>>
15
;
}
}
else
{
for
(
c
=
0
;
c
<
12
;
c
++
)
{
// loop on NB-IoT carriers
if
((
c
!=
(
frame_parms
->
nushift
+
poffset
))
&&
(
c
!=
((
frame_parms
->
nushift
+
poffset
+
6
)
%
12
)))
{
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)]
=
//
(a * primary_sync[2*c + (2*12*s) + 1]) >> 15;
//
}
//
}
//
else{
//
for (c=0; c<12; c++) { // loop on NB-IoT carriers
//
if ((c!=(frame_parms->nushift+poffset)) &&
//
(c!=((frame_parms->nushift+poffset+6)%12)))
//
{
//
((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )] =
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)])
>>
15
;
//
(a * primary_sync[2*c + (2*12*s)]) >> 15;
((
short
*
)
txdataF
[
aa
])[
2
*
(
(
slot_id
*
7
*
frame_parms
->
ofdm_symbol_size
)
+
((
symbol_offset
+
s
)
*
frame_parms
->
ofdm_symbol_size
)
+
NB_IoT_start
+
c
)
+
1
]
=
//
((short*)txdataF[aa])[2*( (slot_id*7*frame_parms->ofdm_symbol_size) + ((symbol_offset+s)*frame_parms->ofdm_symbol_size) + NB_IoT_start + c )+1] =
(
a
*
primary_sync
[
2
*
c
+
(
2
*
12
*
s
)
+
1
])
>>
15
;
}
}
}
//
(a * primary_sync[2*c + (2*12*s) + 1]) >> 15;
//
}
//
}
//
}
pilot
=
0
;
poffset
=
0
;
}
}
//
pilot = 0;
//
poffset = 0;
//
}
//
}
return
(
0
);
}
//
return(0);
//
}
/* (for LTE)
int generate_pss_emul(PHY_VARS_eNB_NB_IoT *phy_vars_eNb,uint8_t sect_id)
...
...
openair1/PHY/LTE_TRANSPORT/nsss_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -13,17 +13,18 @@
*/
//#include <math.h>
//
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h" // not can be replaced by impl_defs_lte_NB_IoT & impl_defs_top_NB_IoT if "msg" function is not used
#include "PHY/defs.h"
//
#include "PHY/defs_NB_IoT.h" // not can be replaced by impl_defs_lte_NB_IoT & impl_defs_top_NB_IoT if "msg" function is not used
//#include "defs.h"
//#include "PHY/extern_NB_IoT.h"
#include "PHY/extern.h"
//#include "PHY/impl_defs_lte_NB_IoT.h"
//#include "PHY/impl_defs_top_NB_IoT.h"
#include "nsss_NB_IoT.h"
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
symbol_offset
,
// symbol_offset = 3 for NB-IoT
uint16_t
slot_offset
,
unsigned
short
frame_number
,
// new attribute (Get value from higher layer), it does not exist for LTE
...
...
openair1/PHY/LTE_TRANSPORT/proto_NB_IoT.h
View file @
5a13a7d4
...
...
@@ -32,13 +32,14 @@
#ifndef __LTE_TRANSPORT_PROTO_NB_IOT__H__
#define __LTE_TRANSPORT_PROTO_NB_IOT__H__
#include "PHY/defs_NB_IoT.h"
#include "PHY/impl_defs_lte.h"
//#include <math.h>
//NPSS
int
generate_npss_NB_IoT
(
int32_t
**
txdataF
,
short
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
unsigned
short
symbol_offset
,
// symbol_offset should equal to 3 for NB-IoT
unsigned
short
slot_offset
,
unsigned
short
RB_IoT_ID
);
// new attribute (values are between 0.. Max_RB_number-1), it does not exist for LTE
...
...
@@ -47,7 +48,7 @@ int generate_npss_NB_IoT(int32_t **txdataF,
int
generate_sss_NB_IoT
(
int32_t
**
txdataF
,
int16_t
amp
,
NB_IoT
_DL_FRAME_PARMS
*
frame_parms
,
LTE
_DL_FRAME_PARMS
*
frame_parms
,
uint16_t
symbol_offset
,
// symbol_offset = 3 for NB-IoT
uint16_t
slot_offset
,
unsigned
short
frame_number
,
// new attribute (Get value from higher layer), it does not exist for LTE
...
...
openair1/SCHED/defs_NB_IoT.h
View file @
5a13a7d4
...
...
@@ -3,7 +3,7 @@
#ifndef __openair_SCHED_NB_IOT_H__
#define __openair_SCHED_NB_IOT_H__
//
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
//#include "openair2/PHY_INTERFACE/IF_Module_nb_iot.h"
#include "openair2/PHY_INTERFACE/nfapi_interface.h"
...
...
@@ -25,7 +25,7 @@ void process_schedule_rsp_NB_IoT(Sched_Rsp_t *sched_rsp,
void
phy_procedures_eNB_uespec_RX_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
UL_IND_t
*
UL_INFO
);
/* For NB-IoT, we put NPBCH in later part, since it would be scheduled by MAC scheduler,this generates NRS/NPSS/NSSS*/
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
);
/*Generate the ulsch params and do the mapping for the FAPI style parameters to OAI, and then do the packing*/
void
generate_eNB_ulsch_params_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
nfapi_hi_dci0_request_pdu_t
*
hi_dci0_pdu
);
...
...
openair1/SCHED/phy_procedures_lte_eNb.c
View file @
5a13a7d4
...
...
@@ -494,6 +494,15 @@ void common_signal_procedures (PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc) {
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
// NB-IoT synchro signals
common_signal_procedures_NB_IoT
(
eNB
,
proc
);
// generate Cell-Specific Reference Signals for both slots
if
(
eNB
->
abstraction_flag
==
0
)
{
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_ENB_RS_TX
,
1
);
...
...
openair1/SCHED/phy_procedures_lte_eNb_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -30,7 +30,7 @@
* \warning
*/
//
#include "PHY/defs.h"
#include "PHY/defs.h"
#include "PHY/defs_NB_IoT.h"
#include "PHY/LTE_ESTIMATION/defs_NB_IoT.h"
//#include "PHY/extern_NB_IoT.h" //where we get the global Sched_Rsp_t structure filled
...
...
@@ -213,14 +213,15 @@ uint32_t is_SIB1_NB_IoT(const frame_t frameP,
* It generates NRS/NPSS/NSSS
*
*/
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
void
common_signal_procedures_NB_IoT
(
PHY_VARS_eNB
*
eNB
,
eNB_rxtx_proc_t
*
proc
)
{
NB_IoT_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms_NB_IoT
;
//LTE_DL_FRAME_PARMS *fp = &eNB->frame_parms_NB_IoT;
LTE_DL_FRAME_PARMS
*
fp
=
&
eNB
->
frame_parms
;
int
**
txdataF
=
eNB
->
common_vars
.
txdataF
[
0
];
int
subframe
=
proc
->
subframe_tx
;
int
frame
=
proc
->
frame_tx
;
uint16_t
Ntti
=
10
;
//ntti = 10
int
RB_IoT_ID
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
RB_IoT_ID
=
19
;
// XXX should be initialized (RB reserved for NB-IoT, PRB index)
int
With_NSSS
;
// With_NSSS = 1; if the frame include a sub-Frame with NSSS signal
/*NSSS only happened in the even frame*/
...
...
@@ -259,12 +260,12 @@ void common_signal_procedures_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *p
else
{
/*NRS*/
generate_pilots_NB_IoT
(
eNB
,
/*
generate_pilots_NB_IoT(eNB,
txdataF,
AMP,
Ntti,
RB_IoT_ID,
With_NSSS
);
With_NSSS);
*/
}
}
...
...
openair2/ENB_APP/enb_config.c
View file @
5a13a7d4
...
...
@@ -53,6 +53,10 @@
#include "LAYER2/MAC/extern.h"
#include "PHY/extern.h"
///////// for NB-IoT /////////////////////////
#include "SystemInformationBlockType2-NB-r13.h"
//////////////////END/////////////////////
/* those macros are here to help diagnose problems in configuration files
* if the lookup fails, a warning is printed
* (yes we can use the function name for the macro itself, the C preprocessor
...
...
@@ -244,6 +248,57 @@
#define ENB_CONFIG_STRING_OSA_LOG_LEVEL "osa_log_level"
#define ENB_CONFIG_STRING_OSA_LOG_VERBOSITY "osa_log_verbosity"
//
//************************************* NB-IoT parameters **************************************************************
//
//************* RRC parameters in the config file of merge branch
#define ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT "rach_powerRampingStep_NB"
#define ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT "rach_preambleInitialReceivedTargetPower_NB"
#define ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT "rach_preambleTransMax_CE_NB"
#define ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT "rach_raResponseWindowSize_NB"
#define ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT "rach_macContentionResolutionTimer_NB"
#define ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT "bcch_modificationPeriodCoeff_NB"
#define ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT "pcch_defaultPagingCycle_NB"
#define ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT "nprach_CP_Length"
#define ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT "nprach_rsrp_range"
#define ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT "npdsch_nrs_Power"
#define ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT "npusch_ack_nack_numRepetitions_NB"
#define ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT "npusch_srs_SubframeConfig_NB"
#define ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT "npusch_threeTone_CyclicShift_r13"
#define ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT "npusch_sixTone_CyclicShift_r13"
#define ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT "npusch_groupHoppingEnabled"
#define ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT "npusch_groupAssignmentNPUSCH_r13"
#define ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT "dl_GapThreshold_NB"
#define ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT "dl_GapPeriodicity_NB"
#define ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT "dl_GapDurationCoeff_NB"
#define ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT "npusch_p0_NominalNPUSCH"
#define ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT "npusch_alpha"
#define ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT "deltaPreambleMsg3"
#define ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT "ue_TimersAndConstants_t300_NB"
#define ENB_CONFIG_STRING_UETIMERS_T301_NB_IOT "ue_TimersAndConstants_t301_NB"
#define ENB_CONFIG_STRING_UETIMERS_T310_NB_IOT "ue_TimersAndConstants_t310_NB"
#define ENB_CONFIG_STRING_UETIMERS_T311_NB_IOT "ue_TimersAndConstants_t311_NB"
#define ENB_CONFIG_STRING_UETIMERS_N310_NB_IOT "ue_TimersAndConstants_n310_NB"
#define ENB_CONFIG_STRING_UETIMERS_N311_NB_IOT "ue_TimersAndConstants_n311_NB"
// #define ENB_CONFIG_STRING_UE_TRANSMISSION_MODE_NB_IoT "ue_TransmissionMode_NB"
// NPRACH parameters
#define ENB_CONFIG_STRING_NPRACH_PERIODICITY_NB_IOT "nprach_Periodicity"
#define ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT "nprach_StartTime"
#define ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT "nprach_SubcarrierOffset"
#define ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT "nprach_NumSubcarriers"
#define ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT "nprach_SubcarrierMSG3_RangeStart"
#define ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT "maxNumPreambleAttemptCE_NB"
#define ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT "numRepetitionsPerPreambleAttempt"
#define ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT "npdcch_NumRepetitions_RA"
#define ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT "npdcch_StartSF_CSS_RA"
#define ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT "npdcch_Offset_RA"
//*********************************************END*********************************************************************
#define KHz (1000UL)
#define MHz (1000 * KHz)
...
...
@@ -705,6 +760,53 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
char
*
osa_log_level
=
NULL
;
char
*
osa_log_verbosity
=
NULL
;
//
//********************************** NB-IoT parameters ************************************
//
libconfig_int
rach_raResponseWindowSize_NB
=
0
;
libconfig_int
rach_macContentionResolutionTimer_NB
=
0
;
libconfig_int
rach_powerRampingStep_NB
=
0
;
libconfig_int
rach_preambleInitialReceivedTargetPower_NB
=
0
;
libconfig_int
rach_preambleTransMax_CE_NB
=
0
;
libconfig_int
bcch_modificationPeriodCoeff_NB
=
0
;
libconfig_int
pcch_defaultPagingCycle_NB
=
0
;
libconfig_int
nprach_CP_Length
=
0
;
libconfig_int
nprach_rsrp_range
=
0
;
libconfig_int
npdsch_nrs_Power
=
0
;
libconfig_int
npusch_ack_nack_numRepetitions_NB
=
0
;
libconfig_int
npusch_srs_SubframeConfig_NB
=
0
;
libconfig_int
npusch_threeTone_CyclicShift_r13
=
0
;
libconfig_int
npusch_sixTone_CyclicShift_r13
=
0
;
const
char
*
npusch_groupHoppingEnabled
=
NULL
;
libconfig_int
npusch_groupAssignmentNPUSCH_r13
=
0
;
libconfig_int
dl_GapThreshold_NB
=
0
;
libconfig_int
dl_GapPeriodicity_NB
=
0
;
const
char
*
dl_GapDurationCoeff_NB
=
NULL
;
libconfig_int
npusch_p0_NominalNPUSCH
=
0
;
const
char
*
npusch_alpha
=
NULL
;
libconfig_int
deltaPreambleMsg3
=
0
;
libconfig_int
ue_TimersAndConstants_t300_NB
=
0
;
libconfig_int
ue_TimersAndConstants_t301_NB
=
0
;
libconfig_int
ue_TimersAndConstants_t310_NB
=
0
;
libconfig_int
ue_TimersAndConstants_t311_NB
=
0
;
libconfig_int
ue_TimersAndConstants_n310_NB
=
0
;
libconfig_int
ue_TimersAndConstants_n311_NB
=
0
;
libconfig_int
nprach_Periodicity
=
0
;
libconfig_int
nprach_StartTime
=
0
;
libconfig_int
nprach_SubcarrierOffset
=
0
;
libconfig_int
nprach_NumSubcarriers
=
0
;
const
char
*
nprach_SubcarrierMSG3_RangeStart
=
NULL
;
libconfig_int
maxNumPreambleAttemptCE_NB
=
0
;
libconfig_int
numRepetitionsPerPreambleAttempt
=
0
;
libconfig_int
npdcch_NumRepetitions_RA
=
0
;
libconfig_int
npdcch_StartSF_CSS_RA
=
0
;
const
char
*
npdcch_Offset_RA
=
NULL
;
//************************************END***************************************************
/* for no gcc warnings */
(
void
)
astring
;
(
void
)
my_int
;
...
...
@@ -917,6 +1019,50 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N310
,
&
ue_TimersAndConstants_n310
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N311
,
&
ue_TimersAndConstants_n311
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UE_TRANSMISSION_MODE
,
&
ue_TransmissionMode
)
//
//************************************************************ NB-IoT ***********************************************************************************
//
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_RACH_RARESPONSEWINDOWSIZE_NB_IOT
,
&
rach_raResponseWindowSize_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_RACH_MACCONTENTIONRESOLUTIONTIMER_NB_IOT
,
&
rach_macContentionResolutionTimer_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_RACH_POWERRAMPINGSTEP_NB_IOT
,
&
rach_powerRampingStep_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_RACH_PREAMBLEINITIALRECEIVEDTARGETPOWER_NB_IOT
,
&
rach_preambleInitialReceivedTargetPower_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_RACH_PREAMBLETRANSMAX_CE_NB_IOT
,
&
rach_preambleTransMax_CE_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_BCCH_MODIFICATIONPERIODCOEFF_NB_IOT
,
&
bcch_modificationPeriodCoeff_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_PCCH_DEFAULT_PAGING_CYCLE_NB_IOT
,
&
pcch_defaultPagingCycle_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_CP_LENGTH_NB_IOT
,
&
nprach_CP_Length
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_RSRP_RANGE_NB_IOT
,
&
nprach_rsrp_range
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPDSCH_NRS_POWER_NB_IOT
,
&
npdsch_nrs_Power
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_ACK_NACK_NUMREPETITIONS_NB_IOT
,
&
npusch_ack_nack_numRepetitions_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_SRS_SUBFRAMECONFIG_NB_IOT
,
&
npusch_srs_SubframeConfig_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_THREETONE_CYCLICSHIFT_R13_NB_IOT
,
&
npusch_threeTone_CyclicShift_r13
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_SIXTONE_CYCLICSHIFT_R13_NB_IOT
,
&
npusch_sixTone_CyclicShift_r13
)
&&
config_setting_lookup_string
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT
,
&
npusch_groupHoppingEnabled
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_GROUPASSIGNMENTNPUSH_R13_NB_IOT
,
&
npusch_groupAssignmentNPUSCH_r13
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_DL_GAPTHRESHOLD_NB_IOT
,
&
dl_GapThreshold_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_DL_GAPPERIODICITY_NB_IOT
,
&
dl_GapPeriodicity_NB
)
&&
config_setting_lookup_string
(
component_carrier
,
ENB_CONFIG_STRING_DL_GAPDURATIONCOEFF_NB_IOT
,
&
dl_GapDurationCoeff_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_P0NOMINALPUSH_NB_IOT
,
&
npusch_p0_NominalNPUSCH
)
&&
config_setting_lookup_string
(
component_carrier
,
ENB_CONFIG_STRING_NPUSCH_ALPHA_NB_IOT
,
&
npusch_alpha
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_DELTAPREAMBLEMSG3_NB_IOT
,
&
deltaPreambleMsg3
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_T300_NB_IOT
,
&
ue_TimersAndConstants_t300_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_T301_NB_IOT
,
&
ue_TimersAndConstants_t301_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_T310_NB_IOT
,
&
ue_TimersAndConstants_t310_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_T311_NB_IOT
,
&
ue_TimersAndConstants_t311_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N310_NB_IOT
,
&
ue_TimersAndConstants_n310_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_UETIMERS_N311_NB_IOT
,
&
ue_TimersAndConstants_n311_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_PERIODICITY_NB_IOT
,
&
nprach_Periodicity
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_STARTTIME_NB_IOT
,
&
nprach_StartTime
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_SUBCARRIEROFFSET_NB_IOT
,
&
nprach_SubcarrierOffset
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_NUMSUBCARRIERS_NB_IOT
,
&
nprach_NumSubcarriers
)
&&
config_setting_lookup_string
(
component_carrier
,
ENB_CONFIG_STRING_NPRACH_SUBCARRIERMSG3_RANGESTART_NB_IOT
,
&
nprach_SubcarrierMSG3_RangeStart
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_MAXNUM_PREAMBLE_ATTEMPT_CE_NB_IOT
,
&
maxNumPreambleAttemptCE_NB
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NUMREPETITIONSPERPREAMBLEATTEMPT_NB_IOT
,
&
numRepetitionsPerPreambleAttempt
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPDCCH_NUMREPETITIONS_RA_NB_IOT
,
&
npdcch_NumRepetitions_RA
)
&&
config_setting_lookup_int
(
component_carrier
,
ENB_CONFIG_STRING_NPDCCH_STARTSF_CSS_RA_NB_IOT
,
&
npdcch_StartSF_CSS_RA
)
&&
config_setting_lookup_string
(
component_carrier
,
ENB_CONFIG_STRING_NPDCCH_OFFSET_RA_NB_IOT
,
&
npdcch_Offset_RA
)
/////******************************************************************END*******************************************************************************************
#if defined(Rel10) || defined(Rel14)
...
...
@@ -1970,6 +2116,1169 @@ const Enb_properties_array_t *enb_config_init(char* lib_config_file_name_pP)
lib_config_file_name_pP
,
i
,
ue_TransmissionMode
);
break
;
}
//****************************************************************************************************************
//************************************ NB-IoT part ***************************************************************
//****************************************************************************************************************
switch
(
rach_raResponseWindowSize_NB
)
{
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp2
;
break
;
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp4
;
break
;
case
5
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp5
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp6
;
break
;
case
7
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp7
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp8
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_raResponseWindowSize_NB
[
j
]
=
RACH_Info_NB_r13__ra_ResponseWindowSize_r13_pp10
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for rach_raResponseWindowSize_NB choice: 2,3,4,5,6,7,8,10 "
,
lib_config_file_name_pP
,
i
,
rach_raResponseWindowSize_NB
);
break
;
}
switch
(
rach_macContentionResolutionTimer_NB
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp2
;
break
;
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp4
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_macContentionResolutionTimer_NB
[
j
]
=
RACH_Info_NB_r13__mac_ContentionResolutionTimer_r13_pp64
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for rach_macContentionResolutionTimer_NB choice: 1,2,3,4,8,16,32,64 "
,
lib_config_file_name_pP
,
i
,
rach_macContentionResolutionTimer_NB
);
break
;
}
switch
(
rach_powerRampingStep_NB
)
{
case
0
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_powerRampingStep_NB
[
j
]
=
PowerRampingParameters__powerRampingStep_dB0
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_powerRampingStep_NB
[
j
]
=
PowerRampingParameters__powerRampingStep_dB2
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_powerRampingStep_NB
[
j
]
=
PowerRampingParameters__powerRampingStep_dB4
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_powerRampingStep_NB
[
j
]
=
PowerRampingParameters__powerRampingStep_dB6
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for rach_powerRampingStep_NB choice: 0,2,4,6 "
,
lib_config_file_name_pP
,
i
,
rach_powerRampingStep_NB
);
break
;
}
switch
(
rach_preambleInitialReceivedTargetPower_NB
)
{
case
-
120
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_120
;
break
;
case
-
118
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_118
;
break
;
case
-
116
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_116
;
break
;
case
-
114
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_114
;
break
;
case
-
112
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_112
;
break
;
case
-
110
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_110
;
break
;
case
-
108
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_108
;
break
;
case
-
106
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_106
;
break
;
case
-
104
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_104
;
break
;
case
-
102
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_102
;
break
;
case
-
100
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_100
;
break
;
case
-
98
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_98
;
break
;
case
-
96
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_96
;
break
;
case
-
94
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_94
;
break
;
case
-
92
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_92
;
break
;
case
-
90
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleInitialReceivedTargetPower_NB
[
j
]
=
PowerRampingParameters__preambleInitialReceivedTargetPower_dBm_90
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for rach_preambleInitialReceivedTargetPower_NB choice: -120,-118,-116,-114,-112,-110,-108,-106,-104,-102,-100,-98,-96,-94,-92,-90 "
,
lib_config_file_name_pP
,
i
,
rach_preambleInitialReceivedTargetPower_NB
);
break
;
}
switch
(
rach_preambleTransMax_CE_NB
)
{
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n4
;
break
;
case
5
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n5
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n6
;
break
;
case
7
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n7
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n8
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n10
;
break
;
case
20
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n20
;
break
;
case
50
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n50
;
break
;
case
100
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n100
;
break
;
case
200
:
enb_properties
.
properties
[
enb_properties_index
]
->
rach_preambleTransMax_CE_NB
[
j
]
=
PreambleTransMax_n200
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for rach_preambleTransMax_CE_NB choice: 3,4,5,6,7,8,10,20,50,100,200 "
,
lib_config_file_name_pP
,
i
,
rach_preambleTransMax_CE_NB
);
break
;
}
switch
(
bcch_modificationPeriodCoeff_NB
)
{
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
bcch_modificationPeriodCoeff_NB
[
j
]
=
BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
bcch_modificationPeriodCoeff_NB
[
j
]
=
BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
bcch_modificationPeriodCoeff_NB
[
j
]
=
BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
bcch_modificationPeriodCoeff_NB
[
j
]
=
BCCH_Config_NB_r13__modificationPeriodCoeff_r13_n16
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for bcch_modificationPeriodCoeff_NB choice: 16,32,64,128 "
,
lib_config_file_name_pP
,
i
,
bcch_modificationPeriodCoeff_NB
);
break
;
}
switch
(
pcch_defaultPagingCycle_NB
)
{
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
pcch_defaultPagingCycle_NB
[
j
]
=
PCCH_Config_NB_r13__defaultPagingCycle_r13_rf128
;
break
;
case
256
:
enb_properties
.
properties
[
enb_properties_index
]
->
pcch_defaultPagingCycle_NB
[
j
]
=
PCCH_Config_NB_r13__defaultPagingCycle_r13_rf256
;
break
;
case
512
:
enb_properties
.
properties
[
enb_properties_index
]
->
pcch_defaultPagingCycle_NB
[
j
]
=
PCCH_Config_NB_r13__defaultPagingCycle_r13_rf512
;
break
;
case
1024
:
enb_properties
.
properties
[
enb_properties_index
]
->
pcch_defaultPagingCycle_NB
[
j
]
=
PCCH_Config_NB_r13__defaultPagingCycle_r13_rf1024
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for pcch_defaultPagingCycle_NB choice: 128,256,512,1024 "
,
lib_config_file_name_pP
,
i
,
pcch_defaultPagingCycle_NB
);
break
;
}
switch
(
nprach_CP_Length
)
{
case
0
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_CP_Length
[
j
]
=
NPRACH_ConfigSIB_NB_r13__nprach_CP_Length_r13_us66dot7
;
break
;
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_CP_Length
[
j
]
=
NPRACH_ConfigSIB_NB_r13__nprach_CP_Length_r13_us266dot7
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_CP_Length choice: 0,1 "
,
lib_config_file_name_pP
,
i
,
nprach_CP_Length
);
break
;
}
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_rsrp_range
[
j
]
=
nprach_rsrp_range
;
if
((
nprach_rsrp_range
<
0
)
||
(
nprach_rsrp_range
>
96
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_rsrp_range choice: 0..96 !
\n
"
,
lib_config_file_name_pP
,
i
,
nprach_rsrp_range
);
enb_properties
.
properties
[
enb_properties_index
]
->
npdsch_nrs_Power
[
j
]
=
npdsch_nrs_Power
;
if
((
npdsch_nrs_Power
<-
60
)
||
(
npdsch_nrs_Power
>
50
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npdsch_nrs_Power choice: -60..50 !
\n
"
,
lib_config_file_name_pP
,
i
,
npdsch_nrs_Power
);
switch
(
npusch_ack_nack_numRepetitions_NB
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r2
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r4
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_ack_nack_numRepetitions_NB
[
j
]
=
ACK_NACK_NumRepetitions_NB_r13_r128
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_ack_nack_numRepetitions_NB choice: 1,2,4,8,16,32,64,128 "
,
lib_config_file_name_pP
,
i
,
npusch_ack_nack_numRepetitions_NB
);
break
;
}
switch
(
npusch_srs_SubframeConfig_NB
)
{
case
0
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc0
;
break
;
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc2
;
break
;
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc4
;
break
;
case
5
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc5
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc6
;
break
;
case
7
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc7
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc8
;
break
;
case
9
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc9
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc10
;
break
;
case
11
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc11
;
break
;
case
12
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc12
;
break
;
case
13
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc13
;
break
;
case
14
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc14
;
break
;
case
15
:
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_srs_SubframeConfig_NB
[
j
]
=
NPUSCH_ConfigCommon_NB_r13__srs_SubframeConfig_r13_sc15
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_srs_SubframeConfig_NB choice: 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 "
,
lib_config_file_name_pP
,
i
,
npusch_srs_SubframeConfig_NB
);
break
;
}
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_threeTone_CyclicShift_r13
[
j
]
=
npusch_threeTone_CyclicShift_r13
;
if
((
npusch_threeTone_CyclicShift_r13
<
0
)
||
(
npusch_threeTone_CyclicShift_r13
>
2
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_threeTone_CyclicShift_r13 choice: 0..2 !
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_threeTone_CyclicShift_r13
);
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_sixTone_CyclicShift_r13
[
j
]
=
npusch_sixTone_CyclicShift_r13
;
if
((
npusch_sixTone_CyclicShift_r13
<
0
)
||
(
npusch_sixTone_CyclicShift_r13
>
3
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_sixTone_CyclicShift_r13 choice: 0..3 !
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_sixTone_CyclicShift_r13
);
if
(
!
npusch_groupHoppingEnabled
)
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d define %s: ENABLE,DISABLE!
\n
"
,
lib_config_file_name_pP
,
i
,
ENB_CONFIG_STRING_NPUSCH_GROUP_HOPPING_EN_NB_IOT
);
else
if
(
strcmp
(
npusch_groupHoppingEnabled
,
"ENABLE"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_groupHoppingEnabled
[
j
]
=
TRUE
;
}
else
if
(
strcmp
(
npusch_groupHoppingEnabled
,
"DISABLE"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_groupHoppingEnabled
[
j
]
=
FALSE
;
}
else
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%s
\"
for npusch_groupHoppingEnabled choice: ENABLE,DISABLE!
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_groupHoppingEnabled
);
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_groupAssignmentNPUSCH_r13
[
j
]
=
npusch_groupAssignmentNPUSCH_r13
;
if
((
npusch_groupAssignmentNPUSCH_r13
<
0
)
||
(
npusch_groupAssignmentNPUSCH_r13
>
29
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_groupAssignmentNPUSCH_r13 choice: 0..29!
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_groupAssignmentNPUSCH_r13
);
switch
(
dl_GapThreshold_NB
)
{
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapThreshold_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapThreshold_r13_n32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapThreshold_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapThreshold_r13_n64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapThreshold_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapThreshold_r13_n128
;
break
;
case
256
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapThreshold_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapThreshold_r13_n256
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for dl_GapThreshold_NB choice: 32,64,128,256 "
,
lib_config_file_name_pP
,
i
,
dl_GapThreshold_NB
);
break
;
}
switch
(
dl_GapPeriodicity_NB
)
{
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapPeriodicity_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapPeriodicity_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf128
;
break
;
case
256
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapPeriodicity_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf256
;
break
;
case
512
:
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapPeriodicity_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapPeriodicity_r13_sf512
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for dl_GapPeriodicity_NB choice: 64,128,256,512 "
,
lib_config_file_name_pP
,
i
,
dl_GapPeriodicity_NB
);
break
;
}
if
(
strcmp
(
dl_GapDurationCoeff_NB
,
"oneEighth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapDurationCoeff_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneEighth
;
}
else
if
(
strcmp
(
dl_GapDurationCoeff_NB
,
"oneFourth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapDurationCoeff_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneFourth
;
}
else
if
(
strcmp
(
dl_GapDurationCoeff_NB
,
"threeEighth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapDurationCoeff_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_threeEighth
;
}
else
if
(
strcmp
(
dl_GapDurationCoeff_NB
,
"oneHalf"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
dl_GapDurationCoeff_NB
[
j
]
=
DL_GapConfig_NB_r13__dl_GapDurationCoeff_r13_oneHalf
;
}
else
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%s
\"
for dl_GapDurationCoeff_NB choice: oneEighth,oneFourth,threeEighth,oneHalf !
\n
"
,
lib_config_file_name_pP
,
i
,
dl_GapDurationCoeff_NB
);
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_p0_NominalNPUSCH
[
j
]
=
npusch_p0_NominalNPUSCH
;
if
((
npusch_p0_NominalNPUSCH
<
-
126
)
||
(
npusch_p0_NominalNPUSCH
>
24
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npusch_p0_NominalNPUSCH choice: -126..24 !
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_p0_NominalNPUSCH
);
if
(
strcmp
(
npusch_alpha
,
"AL0"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al0
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL04"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al04
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL05"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al05
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL06"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al06
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL07"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al07
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL08"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al08
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL09"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al09
;
}
else
if
(
strcmp
(
npusch_alpha
,
"AL1"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npusch_alpha
[
j
]
=
UplinkPowerControlCommon_NB_r13__alpha_r13_al1
;
}
else
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%s
\"
for npusch_alpha choice: AL0,AL04,AL05,AL06,AL07,AL08,AL09,AL1!
\n
"
,
lib_config_file_name_pP
,
i
,
npusch_alpha
);
enb_properties
.
properties
[
enb_properties_index
]
->
deltaPreambleMsg3
[
j
]
=
deltaPreambleMsg3
;
if
((
deltaPreambleMsg3
<
-
1
)
||
(
deltaPreambleMsg3
>
6
))
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for deltaPreambleMsg3 choice: -1..6 !
\n
"
,
lib_config_file_name_pP
,
i
,
deltaPreambleMsg3
);
//************************************************************************* NB-IoT Timer ************************************************************
switch
(
ue_TimersAndConstants_t300_NB
)
{
case
2500
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms2500
;
break
;
case
4000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms4000
;
break
;
case
6000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms6000
;
break
;
case
10000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms10000
;
break
;
case
15000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms15000
;
break
;
case
25000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms25000
;
break
;
case
40000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms40000
;
break
;
case
60000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t300_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t300_r13_ms60000
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_t300_NB choice: 2500,4000,6000,10000,15000,25000,40000,60000 "
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_t300_NB
);
break
;
}
switch
(
ue_TimersAndConstants_t301_NB
)
{
case
2500
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms2500
;
break
;
case
4000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms4000
;
break
;
case
6000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms6000
;
break
;
case
10000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms10000
;
break
;
case
15000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms15000
;
break
;
case
25000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms25000
;
break
;
case
40000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms40000
;
break
;
case
60000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t301_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t301_r13_ms60000
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_t301_NB choice: 2500,4000,6000,10000,15000,25000,40000,60000 "
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_t301_NB
);
break
;
}
switch
(
ue_TimersAndConstants_t310_NB
)
{
case
0
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms0
;
break
;
case
200
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms200
;
break
;
case
500
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms500
;
break
;
case
1000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms1000
;
break
;
case
2000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms2000
;
break
;
case
4000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms4000
;
break
;
case
8000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t310_r13_ms8000
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_t310_NB choice: 0,200,500,1000,2000,4000,8000 "
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_t310_NB
);
break
;
}
switch
(
ue_TimersAndConstants_t311_NB
)
{
case
1000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms1000
;
break
;
case
3000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms3000
;
break
;
case
5000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms5000
;
break
;
case
10000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms10000
;
break
;
case
15000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms15000
;
break
;
case
20000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms20000
;
break
;
case
30000
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_t311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__t311_r13_ms30000
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_t311_NB choice: 1000,3000,5000,10000,150000,20000,30000"
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_t311_NB
);
break
;
}
switch
(
ue_TimersAndConstants_n310_NB
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n2
;
break
;
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n4
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n6
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n8
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n10
;
break
;
case
20
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n310_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n310_r13_n20
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_n310_NB choice: 1,2,3,4,6,8,10,20"
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_n310_NB
);
break
;
}
switch
(
ue_TimersAndConstants_n311_NB
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n2
;
break
;
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n4
;
break
;
case
5
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n5
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n6
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n8
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
ue_TimersAndConstants_n311_NB
[
j
]
=
UE_TimersAndConstants_NB_r13__n311_r13_n10
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for ue_TimersAndConstants_n311_NB choice: 1,2,3,4,5,6,8,10"
,
lib_config_file_name_pP
,
i
,
ue_TimersAndConstants_n311_NB
);
break
;
}
//************************************************************************** NBPRACH NB-IoT *****************************************************
switch
(
nprach_Periodicity
)
{
case
40
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms40
;
break
;
case
80
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms80
;
break
;
case
160
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms160
;
break
;
case
240
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms240
;
break
;
case
320
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms320
;
break
;
case
640
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms640
;
break
;
case
1280
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms1280
;
break
;
case
2560
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_Periodicity
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_Periodicity_r13_ms2560
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_Periodicity choice: 40,80,160,240,320,640,1280,2560"
,
lib_config_file_name_pP
,
i
,
nprach_Periodicity
);
break
;
}
switch
(
nprach_StartTime
)
{
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms128
;
break
;
case
256
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms256
;
break
;
case
512
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms512
;
break
;
case
1024
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_StartTime
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_StartTime_r13_ms1024
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_StartTime choice: 8,16,32,64,128,256,512,1024"
,
lib_config_file_name_pP
,
i
,
nprach_StartTime
);
break
;
}
switch
(
nprach_SubcarrierOffset
)
{
case
40
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n0
;
break
;
case
80
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n12
;
break
;
case
160
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n24
;
break
;
case
240
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n36
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n2
;
break
;
case
18
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n18
;
break
;
case
34
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierOffset
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_n34
;
break
;
//case 1:
// enb_properties.properties[enb_properties_index]->nprach_SubcarrierOffset[j] = NPRACH_Parameters_NB_r13__nprach_SubcarrierOffset_r13_spare1;
// break;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_SubcarrierOffset choice: 0,12,24,36,2,18,34"
,
lib_config_file_name_pP
,
i
,
nprach_SubcarrierOffset
);
break
;
}
switch
(
nprach_NumSubcarriers
)
{
case
12
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_NumSubcarriers
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n12
;
break
;
case
24
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_NumSubcarriers
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n24
;
break
;
case
36
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_NumSubcarriers
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n36
;
break
;
case
48
:
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_NumSubcarriers
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_NumSubcarriers_r13_n48
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for nprach_NumSubcarriers choice: 12,24,36,48"
,
lib_config_file_name_pP
,
i
,
nprach_NumSubcarriers
);
break
;
}
if
(
strcmp
(
nprach_SubcarrierMSG3_RangeStart
,
"zero"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierMSG3_RangeStart
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_zero
;
}
else
if
(
strcmp
(
nprach_SubcarrierMSG3_RangeStart
,
"oneThird"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierMSG3_RangeStart
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_oneThird
;
}
else
if
(
strcmp
(
nprach_SubcarrierMSG3_RangeStart
,
"twoThird"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierMSG3_RangeStart
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_twoThird
;
}
else
if
(
strcmp
(
nprach_SubcarrierMSG3_RangeStart
,
"one"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
nprach_SubcarrierMSG3_RangeStart
[
j
]
=
NPRACH_Parameters_NB_r13__nprach_SubcarrierMSG3_RangeStart_r13_one
;
}
else
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%s
\"
for nprach_SubcarrierMSG3_RangeStart choice: zero,oneThird,twoThird,one !
\n
"
,
lib_config_file_name_pP
,
i
,
nprach_SubcarrierMSG3_RangeStart
);
switch
(
maxNumPreambleAttemptCE_NB
)
{
case
3
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n3
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n4
;
break
;
case
5
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n5
;
break
;
case
6
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n6
;
break
;
case
7
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n7
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n8
;
break
;
case
10
:
enb_properties
.
properties
[
enb_properties_index
]
->
maxNumPreambleAttemptCE_NB
[
j
]
=
NPRACH_Parameters_NB_r13__maxNumPreambleAttemptCE_r13_n10
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for maxNumPreambleAttemptCE_NB choice: 3,4,5,6,7,8,10"
,
lib_config_file_name_pP
,
i
,
maxNumPreambleAttemptCE_NB
);
break
;
}
switch
(
numRepetitionsPerPreambleAttempt
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n2
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n4
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
numRepetitionsPerPreambleAttempt
[
j
]
=
NPRACH_Parameters_NB_r13__numRepetitionsPerPreambleAttempt_r13_n128
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for numRepetitionsPerPreambleAttempt choice: 1,2,4,8,16,32,64,128"
,
lib_config_file_name_pP
,
i
,
numRepetitionsPerPreambleAttempt
);
break
;
}
switch
(
npdcch_NumRepetitions_RA
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r4
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r64
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r128
;
break
;
case
256
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r256
;
break
;
case
512
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r512
;
break
;
case
1024
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r1024
;
break
;
case
2048
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_NumRepetitions_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_NumRepetitions_RA_r13_r2048
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npdcch_NumRepetitions_RA choice: 1,2,4,8,16,32,64,128,512,1024,2048"
,
lib_config_file_name_pP
,
i
,
npdcch_NumRepetitions_RA
);
break
;
}
switch
(
npdcch_StartSF_CSS_RA
)
{
case
1
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v1dot5
;
break
;
case
2
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v2
;
break
;
case
4
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v4
;
break
;
case
8
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v8
;
break
;
case
16
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v16
;
break
;
case
32
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v32
;
break
;
case
64
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v48
;
break
;
case
128
:
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_StartSF_CSS_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_StartSF_CSS_RA_r13_v64
;
break
;
default:
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%d
\"
for npdcch_StartSF_CSS_RA choice: 1.5,2,4,8,16,32,48,64"
,
lib_config_file_name_pP
,
i
,
npdcch_StartSF_CSS_RA
);
break
;
}
if
(
strcmp
(
npdcch_Offset_RA
,
"zero"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_Offset_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_zero
;
}
else
if
(
strcmp
(
npdcch_Offset_RA
,
"oneEighth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_Offset_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneEighth
;
}
else
if
(
strcmp
(
npdcch_Offset_RA
,
"oneFourth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_Offset_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_oneFourth
;
}
else
if
(
strcmp
(
npdcch_Offset_RA
,
"threeEighth"
)
==
0
)
{
enb_properties
.
properties
[
enb_properties_index
]
->
npdcch_Offset_RA
[
j
]
=
NPRACH_Parameters_NB_r13__npdcch_Offset_RA_r13_threeEighth
;
}
else
AssertFatal
(
0
,
"Failed to parse eNB configuration file %s, enb %d unknown value
\"
%s
\"
for npdcch_Offset_RA choice: zero,oneEighth,oneFourth,threeEighth !
\n
"
,
lib_config_file_name_pP
,
i
,
npdcch_Offset_RA
);
//****************************************************************************************************************
//***********************************************END**************************************************************
//****************************************************************************************************************
}
}
...
...
openair2/ENB_APP/enb_config.h
View file @
5a13a7d4
...
...
@@ -208,6 +208,51 @@ typedef struct Enb_properties_s {
RrcConfigurationReq
RrcReq
;
#endif
long
ue_TransmissionMode
[
1
+
MAX_NUM_CCs
];
//
//*************************************** NB-IoT **********************************************
//
long
rach_raResponseWindowSize_NB
[
1
+
MAX_NUM_CCs
];
long
rach_macContentionResolutionTimer_NB
[
1
+
MAX_NUM_CCs
];
long
rach_powerRampingStep_NB
[
1
+
MAX_NUM_CCs
];
long
rach_preambleInitialReceivedTargetPower_NB
[
1
+
MAX_NUM_CCs
];
long
rach_preambleTransMax_CE_NB
[
1
+
MAX_NUM_CCs
];
long
bcch_modificationPeriodCoeff_NB
[
1
+
MAX_NUM_CCs
];
long
pcch_defaultPagingCycle_NB
[
1
+
MAX_NUM_CCs
];
long
nprach_CP_Length
[
1
+
MAX_NUM_CCs
];
long
nprach_rsrp_range
[
1
+
MAX_NUM_CCs
];
char
*
nprach_SubcarrierMSG3_RangeStart
;
long
maxNumPreambleAttemptCE_NB
[
1
+
MAX_NUM_CCs
];
long
npdsch_nrs_Power
[
1
+
MAX_NUM_CCs
];
long
npusch_ack_nack_numRepetitions_NB
[
1
+
MAX_NUM_CCs
];
long
npusch_srs_SubframeConfig_NB
[
1
+
MAX_NUM_CCs
];
long
npusch_threeTone_CyclicShift_r13
[
1
+
MAX_NUM_CCs
];
long
npusch_sixTone_CyclicShift_r13
[
1
+
MAX_NUM_CCs
];
BOOLEAN_t
npusch_groupHoppingEnabled
[
1
+
MAX_NUM_CCs
];
long
npusch_groupAssignmentNPUSCH_r13
[
1
+
MAX_NUM_CCs
];
long
dl_GapThreshold_NB
[
1
+
MAX_NUM_CCs
];
long
dl_GapPeriodicity_NB
[
1
+
MAX_NUM_CCs
];
char
*
dl_GapDurationCoeff_NB
;
long
npusch_p0_NominalNPUSCH
[
1
+
MAX_NUM_CCs
];
long
npusch_alpha
[
1
+
MAX_NUM_CCs
];
long
deltaPreambleMsg3
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t300_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t301_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t310_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_t311_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_n310_NB
[
1
+
MAX_NUM_CCs
];
long
ue_TimersAndConstants_n311_NB
[
1
+
MAX_NUM_CCs
];
long
nprach_Periodicity
[
1
+
MAX_NUM_CCs
];
long
nprach_StartTime
[
1
+
MAX_NUM_CCs
];
long
nprach_SubcarrierOffset
[
1
+
MAX_NUM_CCs
];
long
nprach_NumSubcarriers
[
1
+
MAX_NUM_CCs
];
long
numRepetitionsPerPreambleAttempt
[
1
+
MAX_NUM_CCs
];
long
npdcch_NumRepetitions_RA
[
1
+
MAX_NUM_CCs
];
long
npdcch_StartSF_CSS_RA
[
1
+
MAX_NUM_CCs
];
char
*
npdcch_Offset_RA
;
//********************************************END******************************************************
long
srb1_timer_poll_retransmit
;
long
srb1_timer_reordering
;
long
srb1_timer_status_prohibit
;
...
...
@@ -285,36 +330,36 @@ const Enb_properties_array_t *enb_config_get(void);
// ******************************************************** NB-IoT ********************************************************** //
typedef
struct
Enb_properties_NB_IoT_s
{
//
typedef struct Enb_properties_NB_IoT_s {
/* Unique eNB_id to identify the eNB within EPC.
* For macro eNB ids this field should be 20 bits long.
* For home eNB ids this field should be 28 bits long.
*/
uint32_t
eNB_id
;
//
uint32_t eNB_id;
/* The type of the cell */
enum
cell_type_e
cell_type
;
//
enum cell_type_e cell_type;
/* Optional name for the cell
* NOTE: the name can be NULL (i.e no name) and will be cropped to 150
* characters.
*/
char
*
eNB_name
;
//
char *eNB_name;
/* Tracking area code */
uint16_t
tac
;
//
uint16_t tac;
/* Mobile Country Code
* Mobile Network Code
*/
uint16_t
mcc
;
/*
uint16_t mcc;
uint16_t mnc;
uint8_t mnc_digit_length;
*/
/* Physical parameters */
/*
// Physical parameters //
int16_t nb_cc;
#ifndef OCP_FRAMEWORK
eNB_func_t cc_node_function[1+MAX_NUM_CCs];
...
...
@@ -398,7 +443,7 @@ typedef struct Enb_properties_NB_IoT_s {
#endif
long ue_TransmissionMode[1+MAX_NUM_CCs];
//
//
*************** NB-IoT *****************
//
///////////////////////////////// NB-IoT /////////////////////////////////////////////////////////
//
long rach_raResponseWindowSize_NB[1+MAX_NUM_CCs];
long rach_macContentionResolutionTimer_NB[1+MAX_NUM_CCs];
...
...
@@ -441,16 +486,16 @@ typedef struct Enb_properties_NB_IoT_s {
long npdcch_StartSF_CSS_RA[1+MAX_NUM_CCs];
char* npdcch_Offset_RA;
//
****************************************
//
///////////////////////////////////////////END///////////////////////////////////////////////////////
long srb1_timer_poll_retransmit;
long srb1_timer_reordering;
long srb1_timer_status_prohibit;
long srb1_poll_pdu;
long srb1_poll_byte;
long srb1_max_retx_threshold;
/
* Nb of MME to connect to *
/
/
/ Nb of MME to connect to
/
uint8_t nb_mme;
/
* List of MME to connect to *
/
/
/ List of MME to connect to
/
mme_ip_address_t mme_ip_address[S1AP_MAX_NB_MME_IP_ADDRESS];
int sctp_in_streams;
...
...
@@ -468,17 +513,17 @@ typedef struct Enb_properties_NB_IoT_s {
tcp_udp_port_t flexran_agent_port;
char *flexran_agent_cache;
/
* Nb of RRH to connect to *
/
/
/ Nb of RRH to connect to
/
uint8_t nb_rrh_gw;
char *rrh_gw_if_name;
/
* List of MME to connect to *
/
/
/ List of MME to connect to
/
rrh_gw_config_t rrh_gw_config[4];
#ifndef OCP_FRAMEWORK
// otg config
/
* Nb of OTG elements */
/
/ Nb of OTG elements
uint8_t num_otg_elements;
/
* element config*/
/
/ element config
uint16_t otg_ue_id[NB_MODULES_MAX+1];
uint8_t otg_app_type[NB_MODULES_MAX+1];
uint8_t otg_bg_traffic[NB_MODULES_MAX+1];
...
...
@@ -505,7 +550,8 @@ typedef struct Enb_properties_NB_IoT_s {
int16_t osa_log_verbosity;
#endif
} Enb_properties_NB_IoT_t;
*/
/*
typedef struct Enb_properties_array_NB_IoT_s {
int number;
Enb_properties_NB_IoT_t *properties[MAX_ENB];
...
...
@@ -516,6 +562,8 @@ void enb_config_display_NB_IoT(void);
const Enb_properties_array_NB_IoT_t *enb_config_init_NB_IoT(char* lib_config_file_name_pP);
const Enb_properties_array_NB_IoT_t *enb_config_get_NB_IoT(void);
*/
#endif
#endif
/* ENB_CONFIG_H_ */
/* ENB_CONFIG_H_ */
/** @} */
openair2/LAYER2/MAC/main_NB_IoT.c
View file @
5a13a7d4
...
...
@@ -20,22 +20,26 @@
int
mac_init_global_param_NB_IoT
(
void
)
{
if
(
rlc_module_init
()
!=
0
)
{
return
(
-
1
);
}
///// removed since already called by mac_init_global_param //////////////
/*
if (rlc_module_init()!=0) {
return(-1);
}
*/
/////////////////////////////////////////////////////////////////////////////
LOG_I
(
MAC
,
"[MAIN] RRC NB-IoT initialization of global params
\n
"
);
rrc_init_global_param_NB_IoT
();
///// removed since already called by mac_init_global_param //////////////
/*
LOG_I(MAC,"[MAIN] PDCP layer init\n");
#ifdef USER_MODE
#ifdef USER_MODE
pdcp_layer_init ();
#else
#else
pdcp_module_init ();
#endif
#endif
*/
////////////////////////////////////////////////////////////////////////
return
0
;
}
...
...
targets/RT/USER/lte-enb.c
View file @
5a13a7d4
...
...
@@ -587,19 +587,19 @@ int wait_CCs(eNB_rxtx_proc_t *proc) {
static
inline
int
rxtx_NB_IoT
(
PHY_VARS_eNB_NB_IoT
*
eNB
,
eNB_rxtx_proc_t
*
proc
,
char
*
thread_name
)
{
//Allocate memory for the structures used by PHY and MAC
UL_IND_t
*
UL_INFO
;
Sched_Rsp_t
*
Sched_Rsp
;
//
UL_IND_t *UL_INFO;
//
Sched_Rsp_t *Sched_Rsp;
UL_INFO
=
(
UL_IND_t
*
)
malloc
(
sizeof
(
UL_IND_t
));
Sched_Rsp
=
(
Sched_Rsp_t
*
)
malloc
(
sizeof
(
Sched_Rsp_t
));
//
UL_INFO = (UL_IND_t*) malloc(sizeof(UL_IND_t));
//
Sched_Rsp = (Sched_Rsp_t*) malloc(sizeof(Sched_Rsp_t));
start_meas
(
&
softmodem_stats_rxtx_sf
);
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5_NB_IoT
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
// for NB-IoT testing // do_prach commented
//
if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)))
//
eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
/*UE-specific RX processing for subframe n*/
...
...
@@ -608,14 +608,14 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_t *proc, ch
* stored the Upink information in UL_info struct, process it and made it into FAPI style,
*/
phy_procedures_eNB_uespec_RX_NB_IoT
(
eNB
,
proc
,
UL_INFO
);
//
phy_procedures_eNB_uespec_RX_NB_IoT(eNB,proc,UL_INFO);
/*
* send the UL_Indication to higher layer that also provide a tick to the scheduler_dlsch_ulsch
* (on its turn the scheduler will trigger the phy_procedure_eNB_TX through schedule_responce function
*/
if
(
if_inst
->
UL_indication
)
if_inst
->
UL_indication
(
UL_INFO
);
//
if(if_inst->UL_indication) if_inst->UL_indication(UL_INFO);
if
(
oai_exit
)
return
(
-
1
);
...
...
@@ -636,12 +636,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
// ****************************************
// Common RX procedures subframe n
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)))
if
((
eNB
->
do_prach
)
&&
((
eNB
->
node_function
!=
NGFI_RCC_IF4p5
)))
eNB
->
do_prach
(
eNB
,
proc
->
frame_rx
,
proc
->
subframe_rx
);
phy_procedures_eNB_common_RX
(
eNB
,
proc
);
// UE-specific RX processing for subframe n
if
(
eNB
->
proc_uespec_rx
)
eNB
->
proc_uespec_rx
(
eNB
,
proc
,
no_relay
);
// for NB-IoT testing // activating only TX part
//if (eNB->proc_uespec_rx) eNB->proc_uespec_rx(eNB, proc, no_relay );
// *****************************************
// TX processing for subframe n+4
...
...
@@ -1755,8 +1757,9 @@ static void* eNB_thread_single( void* param ) {
// If this proc is to provide synchronization, do so
wakeup_slaves
(
proc
);
if
(
rxtx
(
eNB
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
if
(
rxtx_NB_IoT
(
eNB_NB_IoT
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
if
(
rxtx
(
eNB
,
proc_rxtx
,
"eNB_thread_single"
)
<
0
)
break
;
}
...
...
targets/RT/USER/lte-softmodem.c
View file @
5a13a7d4
...
...
@@ -54,12 +54,15 @@
#include "PHY_INTERFACE/vars.h"
#include "PHY_INTERFACE/defs.h"
//
NB-IoT Parameters here
//
///////////////////////////NB-IoT Parameters here////////////////////////////////////////
#include "LAYER2/MAC/proto_NB_IoT.h"
//#include "LAYER2/MAC/defs_NB_IoT.h"
//#include "LAYER2/MAC/vars_NB_IoT.h"
///////////////////////////////////////END/////////////////////////////////////////////////
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
unsigned
short
config_frames
[
4
]
=
{
2
,
9
,
11
,
13
};
...
...
@@ -175,15 +178,18 @@ int otg_enabled;
//int number_of_cards = 1;
static
LTE_DL_FRAME_PARMS
*
frame_parms
[
MAX_NUM_CCs
];
//NB-IoT
static
NB_IoT_DL_FRAME_PARMS
*
frame_parms_NB_IoT
[
MAX_NUM_CCs
];
// this will be still inside the PHY_VARS of LTE
eNB_func_t
node_function
[
MAX_NUM_CCs
];
eNB_timing_t
node_timing
[
MAX_NUM_CCs
];
////////////////////////////////////// NB-IoT //////////////////////////////////////////////
static
NB_IoT_DL_FRAME_PARMS
*
frame_parms_NB_IoT
[
MAX_NUM_CCs
];
// this will be still inside the PHY_VARS of LTE
eNB_func_NB_IoT_t
node_function_NB_IoT
[
MAX_NUM_CCs
];
eNB_timing_NB_IoT_t
node_timing_NB_IoT
[
MAX_NUM_CCs
];
/////////////////////////////////////////END/////////////////////////////////////////////////
int16_t
node_synch_ref
[
MAX_NUM_CCs
];
uint32_t
target_dl_mcs
=
28
;
//maximum allowed mcs
...
...
@@ -624,9 +630,7 @@ static void get_options (int argc, char **argv) {
int
CC_id
;
// const Enb_properties_array_t *enb_properties; // temporarily replaced for NB_IoT testing
const
Enb_properties_array_NB_IoT_t
*
enb_properties
;
const
Enb_properties_array_t
*
enb_properties
;
enum
long_option_e
{
LONG_OPTION_START
=
0x100
,
/* Start after regular single char options */
...
...
@@ -953,7 +957,7 @@ static void get_options (int argc, char **argv) {
case
'r'
:
UE_scan
=
0
;
///////////////////////////////////////////////////////////////// frame_parms for NB-IoT are added for test
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
switch
(
atoi
(
optarg
))
{
case
6
:
...
...
@@ -1066,7 +1070,7 @@ static void get_options (int argc, char **argv) {
/* Read eNB configuration file */
// enb_properties = enb_config_init(conf_config_file_name);
enb_properties
=
enb_config_init
_NB_IoT
(
conf_config_file_name
);
enb_properties
=
enb_config_init
(
conf_config_file_name
);
AssertFatal
(
NB_eNB_INST
<=
enb_properties
->
number
,
"Number of eNB is greater than eNB defined in configuration file %s (%d/%d)!"
,
...
...
@@ -1153,7 +1157,7 @@ static void get_options (int argc, char **argv) {
frame_parms
[
CC_id
]
->
nb_antenna_ports_eNB
=
enb_properties
->
properties
[
i
]
->
nb_antenna_ports
[
CC_id
];
frame_parms
[
CC_id
]
->
nb_antennas_rx
=
enb_properties
->
properties
[
i
]
->
nb_antennas_rx
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
Nid_cell
=
enb_properties
->
properties
[
i
]
->
Nid_cell
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
Nid_cell
=
enb_properties
->
properties
[
i
]
->
Nid_cell
[
CC_id
];
// in case different CellID this value can be modified
frame_parms_NB_IoT
[
CC_id
]
->
N_RB_DL
=
enb_properties
->
properties
[
i
]
->
N_RB_DL
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
N_RB_UL
=
enb_properties
->
properties
[
i
]
->
N_RB_DL
[
CC_id
];
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
=
enb_properties
->
properties
[
i
]
->
nb_antennas_tx
[
CC_id
];
...
...
@@ -1634,14 +1638,14 @@ int main( int argc, char **argv ) {
LOG_I
(
PHY
,
"Set nb_rx_antenna %d , nb_tx_antenna %d
\n
"
,
frame_parms
[
CC_id
]
->
nb_antennas_rx
,
frame_parms
[
CC_id
]
->
nb_antennas_tx
);
//#ifdef NB_IOT //
for NB-IoT testing
//#ifdef NB_IOT //
///////////// for NB-IoT testing ///////////////////////////
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
=
nb_antenna_tx
;
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_rx
=
nb_antenna_rx
;
frame_parms_NB_IoT
[
CC_id
]
->
nb_antenna_ports_eNB
=
1
;
//initial value overwritten by initial sync later
LOG_I
(
PHY
,
"[NB-IoT] Set nb_rx_antenna %d , nb_tx_antenna %d
\n
"
,
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_rx
,
frame_parms_NB_IoT
[
CC_id
]
->
nb_antennas_tx
);
//#endif
//#endif
//////////////////////////// END //////////////////////////////////
}
...
...
@@ -1651,12 +1655,17 @@ int main( int argc, char **argv ) {
// phy_init_top(frame_parms[CC_id]);
phy_init_lte_top
(
frame_parms
[
CC_id
]);
// for testing
//XXXX we need to modify it for NB-IoT????
//init_ul_hopping(frame_parms[CC_id]);
/////////////////////////////////////////////////////// NB-IoT ////////////////////////////////////////////////////////
init_frame_parms_NB_IoT
(
frame_parms_NB_IoT
[
CC_id
],
1
);
// phy_init_top(frame_parms[CC_id]);
phy_init_lte_top_NB_IoT
(
frame_parms_NB_IoT
[
CC_id
]);
/////////////////////////////////////////////////////// END //////////////////////////////////////////////////////////
}
...
...
@@ -1736,15 +1745,15 @@ int main( int argc, char **argv ) {
// printf("tx_max_power = %d -> amp %d\n",tx_max_power,get_tx_amp(tx_max_poHwer,tx_max_power));
}
else
{
//this is eNB
/////////////////////////////////////////////////// this is eNB /////////////////////////////////////////////////////////////
PHY_vars_eNB_g
=
malloc
(
sizeof
(
PHY_VARS_eNB
**
));
//global PHY_vars --> is a matrix
PHY_vars_eNB_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB
*
));
// for NB-IoT testing
///////////////////////// for NB-IoT testing ////////////////////////
PHY_vars_eNB_NB_IoT_g
=
malloc
(
sizeof
(
PHY_VARS_eNB_NB_IoT
**
));
//global PHY_vars --> is a matrix
PHY_vars_eNB_NB_IoT_g
[
0
]
=
malloc
(
sizeof
(
PHY_VARS_eNB_NB_IoT
*
));
///////////////////////////// END //////////////////////////////////
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
//we initialiaze DL/UL buffer and HARQ (inside the LTE_eNB_DLSCH)
...
...
@@ -1827,7 +1836,7 @@ int main( int argc, char **argv ) {
// for NB-IoT testing
PHY_vars_eNB_
_
NB_IoT_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
PHY_vars_eNB_NB_IoT_g
[
0
][
CC_id
]
->
rx_total_gain_dB
=
(
int
)
rx_gain
[
CC_id
][
0
];
if
(
frame_parms_NB_IoT
[
CC_id
]
->
frame_type
==
FDD
)
{
PHY_vars_eNB_NB_IoT_g
[
0
][
CC_id
]
->
N_TA_offset
=
0
;
...
...
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