Commit 2ccbef43 authored by Nick Ho's avatar Nick Ho

Add the compilation option NB_IOT

parent 711a4fb9
......@@ -567,6 +567,12 @@ add_boolean_option(MESSAGE_CHART_GENERATOR_PHY False "trace some PHY exchang
add_boolean_option(FLEXRAN_AGENT_SB_IF False "enable FlexRAN agent to inteface with a SDN controller")
################################################################
# NB-IOT
################################################################
add_boolean_option(NB_IOT True "Enabling NB-IoT code")
########################
# Include order
##########################
......
......@@ -38,7 +38,6 @@
#endif //USER_MODE
#include "PHY/defs.h"
#include "defs.h"
#include "defs_nb_iot.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef PHY_EMUL
//#include "SIMULATION/simulation_defs.h"
......@@ -46,9 +45,13 @@
#include "PHY_INTERFACE/defs.h"
#include "RRC/LITE/defs.h"
//NB-IoT
#ifdef NB_IOT
#include "defs_nb_iot.h"
//NB-IoT
extern IF_Module_t *if_inst;
extern eNB_MAC_INST_NB *eNB_mac_inst_NB;
#endif
extern const uint32_t BSR_TABLE[BSR_TABLE_SIZE];
//extern uint32_t EBSR_Level[63];
......@@ -69,8 +72,6 @@ extern UE_MAC_INST *ue_mac_inst;
extern MAC_RLC_XFACE *Mac_rlc_xface;
extern uint8_t Is_rrc_registered;
//NB-IoT
extern eNB_MAC_INST_NB *eNB_mac_inst_NB;
extern eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
......
......@@ -41,9 +41,11 @@
#include "PHY_INTERFACE/defs.h"
#include "COMMON/mac_rrc_primitives.h"
#ifdef NB_IOT
//NB-IoT
eNB_MAC_INST_NB *eNB_mac_inst_NB;
IF_Module_t *if_inst;
#endif
const uint32_t BSR_TABLE[BSR_TABLE_SIZE]= {0,10,12,14,17,19,22,26,31,36,42,49,57,67,78,91,
105,125,146,171,200,234,274,321,376,440,515,603,706,826,967,1132,
......@@ -103,9 +105,6 @@ MAC_RLC_XFACE *Mac_rlc_xface;
/// Primary component carrier index of eNB
int pCC_id[NUMBER_OF_eNB_MAX];
//NB-IoT
eNB_MAC_INST_NB *eNB_mac_inst_NB;
eNB_ULSCH_INFO eNB_ulsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
eNB_DLSCH_INFO eNB_dlsch_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX]; // eNBxUE = 8x8
......
......@@ -1623,9 +1623,11 @@ int main( int argc, char **argv ) {
//this is eNB
PHY_vars_eNB_g = malloc(sizeof(PHY_VARS_eNB**));
PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
#ifdef NB_IOT
// do the initialization for the IF Module
if_inst = malloc(sizeof(IF_Module_t *));
#endif
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
PHY_vars_eNB_g[0][CC_id] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag);
PHY_vars_eNB_g[0][CC_id]->ue_dl_rb_alloc=0x1fff;
......@@ -1852,10 +1854,10 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
}
} else {
#ifdef NB_IOT
printf("Initializing IF Module in PHY layer\n");
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment