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
d805f3a5
Commit
d805f3a5
authored
Jun 19, 2017
by
Michele Paffetti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updates on the initialization procedures for NB_IoT
parent
b5aa2b2b
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
30 deletions
+33
-30
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
+1
-1
openair2/LAYER2/MAC/defs_nb_iot.h
openair2/LAYER2/MAC/defs_nb_iot.h
+2
-0
openair2/LAYER2/MAC/main_nb_iot.c
openair2/LAYER2/MAC/main_nb_iot.c
+15
-25
openair2/LAYER2/MAC/proto_nb_iot.h
openair2/LAYER2/MAC/proto_nb_iot.h
+2
-2
openair2/RRC/LITE/rrc_common_nb_iot.c
openair2/RRC/LITE/rrc_common_nb_iot.c
+2
-1
targets/RT/USER/lte-softmodem.c
targets/RT/USER/lte-softmodem.c
+11
-1
No files found.
openair1/PHY/LTE_TRANSPORT/dci_nb_iot.h
View file @
d805f3a5
openair2/LAYER2/MAC/defs_nb_iot.h
View file @
d805f3a5
...
...
@@ -305,6 +305,7 @@ typedef struct {
int32_t
ul_out_of_sync
;
int32_t
phr_received
;
// received from Msg3 MAC Control Element
}
UE_sched_ctrl_NB
;
/*! \brief UE list used by eNB to order UEs/CC for scheduling*/
typedef
struct
{
/// DLSCH pdu
...
...
@@ -330,6 +331,7 @@ typedef struct {
int
num_UEs
;
boolean_t
active
[
NUMBER_OF_UE_MAX
];
}
UE_list_NB_t
;
/*!\brief Values of BCCH0 logical channel for MIB*/
#define BCCH0 11 // MIB-NB
/*!\brief Values of BCCH1 logical channel for SIBs */
...
...
openair2/LAYER2/MAC/main_nb_iot.c
View file @
d805f3a5
...
...
@@ -81,7 +81,7 @@ int mac_init_global_param_NB(void)
return
0
;
}
int
mac_top_init_NB
(
int
eMBMS_active
,
char
*
uecap_xer
,
uint8_t
cba_group_active
,
uint8_t
HO_active
)
int
mac_top_init_NB
()
{
module_id_t
Mod_id
,
i
,
j
;
...
...
@@ -90,10 +90,11 @@ int mac_top_init_NB(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
int
size_bytes1
,
size_bytes2
,
size_bits1
,
size_bits2
;
int
CC_id
;
int
list_el
;
UE_list_NB_t
*
UE_list
;
UE_list_NB_t
*
UE_list
;
//XXX to review if elements are correct
// delete the part to init the UE_INST
//XXX NB_eNB_INST is global and set in lte-softmodem = 1 always (should be modified???)
LOG_I
(
MAC
,
"[MAIN] Init function start:Nb_eNB_INST=%d
\n
"
,
NB_eNB_INST
);
if
(
NB_eNB_INST
>
0
)
{
...
...
@@ -104,10 +105,11 @@ int mac_top_init_NB(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
LOG_I
(
MAC
,
"[MAC][MAIN] not enough memory for eNB
\n
"
);
exit
(
1
);
}
else
{
LOG_D
(
MAC
,
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p
\n
"
,
sizeof
(
eNB_MAC_INST
),
NB_eNB_INST
,
eNB_mac_inst
);
LOG_D
(
MAC
,
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p
\n
"
,
sizeof
(
eNB_MAC_INST
),
NB_eNB_INST
,
eNB_mac_inst
_NB
);
bzero
(
eNB_mac_inst_NB
,
NB_eNB_INST
*
sizeof
(
eNB_MAC_INST_NB
));
}
}
else
{
LOG_I
(
MAC
,
"No instance allocated for the MAC layer (NB-IoT)
\n
"
);
eNB_mac_inst_NB
=
NULL
;
}
...
...
@@ -129,32 +131,24 @@ int mac_top_init_NB(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
UE_list
->
next_ul
[
list_el
]
=-
1
;
}
// TODO : check the pointer to TX
if
(
Is_rrc_nb_iot_registered
==
1
)
{
LOG_I
(
MAC
,
"[MAIN] calling RRC
\n
"
);
LOG_I
(
MAC
,
"[MAIN] calling RRC
NB-IoT
\n
"
);
#ifndef CELLULAR //nothing to be done yet for cellular
openair_rrc_top_init
(
eMBMS_active
,
uecap_xer
,
cba_group_active
,
HO_active
);
openair_rrc_top_init
_NB
(
);
#endif
}
else
{
LOG_I
(
MAC
,
"[MAIN] Running without an RRC
\n
"
);
}
#ifndef USER_MODE
#ifndef PHY_EMUL
LOG_I
(
MAC
,
"[MAIN] add openair2 proc
\n
"
);
//// add_openair2_stats();
#endif
#endif
// initialization for the RA template
for
(
i
=
0
;
i
<
NB_eNB_INST
;
i
++
)
for
(
CC_id
=
0
;
CC_id
<
MAX_NUM_CCs
;
CC_id
++
)
{
LOG_D
(
MAC
,
"[MAIN][eNB %d] CC_id %d initializing RA_template
\n
"
,
i
,
CC_id
);
LOG_D
(
MAC
,
"[MAIN][eNB %d] CC_id %d initializing RA_template
(NB-IoT)
\n
"
,
i
,
CC_id
);
LOG_D
(
MAC
,
"[MSC_NEW][FRAME 00000][MAC_eNB][MOD %02d][]
\n
"
,
i
);
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst
[
i
].
common_channels
[
CC_id
].
RA_template
[
0
];
RA_template
=
(
RA_TEMPLATE_NB
*
)
&
eNB_mac_inst
_NB
[
i
].
common_channels
[
CC_id
].
RA_template
[
0
];
for
(
j
=
0
;
j
<
NB_RA_PROC_MAX
;
j
++
)
{
size_bytes1
=
sizeof
(
DCIN1_RAR_t
);
...
...
@@ -171,7 +165,7 @@ int mac_top_init_NB(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
RA_template
[
j
].
RA_dci_size_bits2
=
size_bits2
;
RA_template
[
j
].
RA_dci_fmt1
=
DCIFormatN1_RAR
;
RA_template
[
j
].
RA_dci_fmt2
=
DCIFormatN1
;
RA_template
[
j
].
RA_dci_fmt2
=
DCIFormatN1
;
//for MSG4
}
memset
(
&
eNB_mac_inst_NB
[
i
].
eNB_stats
,
0
,
sizeof
(
eNB_STATS_NB
));
...
...
@@ -185,11 +179,9 @@ int mac_top_init_NB(int eMBMS_active, char *uecap_xer, uint8_t cba_group_active,
}
//ICIC
init param
//ICIC
not used
//end ALU's algo
LOG_I
(
MAC
,
"[MAIN][INIT] Init function finished
\n
"
);
LOG_I
(
MAC
,
"[MAIN][INIT][NB-IoT] Init function finished
\n
"
);
return
(
0
);
...
...
@@ -209,12 +201,10 @@ int l2_init_eNB_NB()
Is_rrc_nb_iot_registered
=
1
;
LOG_D
(
MAC
,
"[MAIN] ALL INIT OK
\n
"
);
//
// mac_xface->macphy_init(eMBMS_active,uecap_xer,cba_group_active,HO_active);
LOG_D
(
MAC
,
"[MAIN][NB-IoT] ALL INIT OK
\n
"
);
//XXX call mac_top_init_NB!!!
// mac_xface->macphy_init(eMBMS_active,uecap_xer,cba_group_active,HO_active); (old mac_top_init)
mac_top_init_NB
();
return
(
1
);
}
...
...
openair2/LAYER2/MAC/proto_nb_iot.h
View file @
d805f3a5
...
...
@@ -65,8 +65,8 @@ uint8_t *NB_get_dlsch_sdu(module_id_t module_idP,int CC_id,frame_t frameP,rnti_t
int
NB_rrc_mac_remove_ue
(
module_id_t
Mod_id
,
rnti_t
rntiP
);
int
NB_l2_init_e
NB
(
void
);
int
l2_init_eNB_
NB
(
void
);
int
mac_init_global_param_NB
(
void
);
int
mac_top_init_NB
(
void
);
openair2/RRC/LITE/rrc_common_nb_iot.c
View file @
d805f3a5
...
...
@@ -259,6 +259,7 @@ openair_rrc_top_init_eNB_NB(void)//MP: XXX Raymond put this directly the definit
if
(
NB_eNB_INST
>
0
)
{
eNB_rrc_inst_NB
=
(
eNB_RRC_INST_NB
*
)
malloc16
(
NB_eNB_INST
*
sizeof
(
eNB_RRC_INST_NB
));
memset
(
eNB_rrc_inst_NB
,
0
,
NB_eNB_INST
*
sizeof
(
eNB_RRC_INST_NB
));
LOG_D
(
RRC
,
"ALLOCATE %d Bytes for eNB_RRC_INST NB-IoT @ %p
\n
"
,
(
unsigned
int
)(
NB_eNB_INST
*
sizeof
(
eNB_RRC_INST_NB
)),
eNB_rrc_inst_NB
);
//no CBA, no LOcalization, no MBMS flag
...
...
@@ -269,7 +270,7 @@ openair_rrc_top_init_eNB_NB(void)//MP: XXX Raymond put this directly the definit
}
//this stuff below i think are no more used
//
XXX
this stuff below i think are no more used
#ifndef NO_RRM
#ifndef USER_MODE
...
...
targets/RT/USER/lte-softmodem.c
View file @
d805f3a5
...
...
@@ -1681,6 +1681,11 @@ int main( int argc, char **argv ) {
NB_eNB_INST
=
1
;
NB_INST
=
1
;
//#ifdef NB_IOT
// NB_eNB_INST_NB =1;
// NB_INST_NB = 1;
//#endif
}
fill_modeled_runtime_table
(
runtime_phy_rx
,
runtime_phy_tx
);
...
...
@@ -1738,9 +1743,11 @@ int main( int argc, char **argv ) {
int
eMBMS_active
=
0
;
if
(
node_function
[
0
]
<=
NGFI_RAU_IF4p5
)
{
// don't initialize L2 for RRU
// MP, Nick: Initialization of IF module for NB-IoT should be here----------
// MP, Nick: Initialization of IF module for NB-IoT should be here
#ifdef NB_IOT
if_inst
=
malloc
(
sizeof
(
IF_Module_t
));
LOG_I
(
PHY
,
"Allocate IF-Module for NB-IoT
\n
"
);
#endif
//---------------------------
LOG_I
(
PHY
,
"Intializing L2
\n
"
);
...
...
@@ -1864,8 +1871,11 @@ int main( int argc, char **argv ) {
}
}
else
{
#ifdef NB_IOT
printf
(
"Initializing IF Module in PHY layer
\n
"
);
//register function
IF_Module_init_L1
();
#endif
printf
(
"Initializing eNB threads
\n
"
);
init_eNB
(
node_function
,
node_timing
,
1
,
eth_params
,
single_thread_flag
,
wait_for_sync
);
...
...
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