Commit cef6d0af authored by Nick Ho's avatar Nick Ho

Input all the MAC parameters, prepare for the next step function integration

parent b8a38a2d
...@@ -55,7 +55,7 @@ extern PHY_VARS_eNB_NB_IoT * PHY_vars_eNB_NB_IoT_g[MAX_eNB_NB_IoT][MAX_NUM_CCs]; ...@@ -55,7 +55,7 @@ extern PHY_VARS_eNB_NB_IoT * PHY_vars_eNB_NB_IoT_g[MAX_eNB_NB_IoT][MAX_NUM_CCs];
#endif #endif
extern MAC_xface_NB_IoT *mac_xface_NB_IoT; //extern MAC_xface_NB_IoT *mac_xface_NB_IoT;
extern IF_Module_t *if_inst; extern IF_Module_t *if_inst;
/* /*
......
This diff is collapsed.
...@@ -45,15 +45,12 @@ ...@@ -45,15 +45,12 @@
#include "openair2/PHY_INTERFACE/defs_NB_IoT.h" #include "openair2/PHY_INTERFACE/defs_NB_IoT.h"
//#include "RRC/LITE/defs_NB_IoT.h" //#include "RRC/LITE/defs_NB_IoT.h"
//#ifdef NB_IOT
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
//NB-IoT //NB-IoT
extern IF_Module_t *if_inst; extern IF_Module_t *if_inst;
extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; extern eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT;
//#endif
extern const uint32_t BSR_TABLE_NB_IoT[BSR_TABLE_SIZE_NB_IoT];
// //extern uint32_t EBSR_Level[63]; // //extern uint32_t EBSR_Level[63];
// extern const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE]; // extern const uint32_t Extended_BSR_TABLE[BSR_TABLE_SIZE];
// //extern uint32_t Extended_BSR_TABLE[63]; ----currently not used // //extern uint32_t Extended_BSR_TABLE[63]; ----currently not used
...@@ -73,13 +70,8 @@ extern const uint32_t BSR_TABLE_NB_IoT[BSR_TABLE_SIZE_NB_IoT]; ...@@ -73,13 +70,8 @@ extern const uint32_t BSR_TABLE_NB_IoT[BSR_TABLE_SIZE_NB_IoT];
// extern uint8_t Is_rrc_registered; // extern uint8_t Is_rrc_registered;
extern eNB_ULSCH_INFO_NB_IoT eNB_ulsch_info_NB_IoT[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT]; // eNBxUE = 8x8
extern eNB_DLSCH_INFO_NB_IoT eNB_dlsch_info_NB_IoT[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT]; // eNBxUE = 8x8
//#ifndef USER_MODE //#ifndef USER_MODE
extern MAC_xface_NB_IoT *mac_xface_NB_IoT;
// extern RRC_XFACE *Rrc_xface; //// to uncomment when it is used // extern RRC_XFACE *Rrc_xface; //// to uncomment when it is used
extern uint8_t Is_rrc_registered; extern uint8_t Is_rrc_registered;
...@@ -100,33 +92,6 @@ extern EMULATION_VARS *Emul_vars; ...@@ -100,33 +92,6 @@ extern EMULATION_VARS *Emul_vars;
#endif //PHY_EMUL #endif //PHY_EMUL
// extern int cqi_to_mcs[16];
// extern uint32_t RRC_CONNECTION_FLAG;
// extern uint8_t rb_table[33];
// extern DCI0_5MHz_TDD_1_6_t UL_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t RA_alloc_pdu;
extern DCI1A_5MHz_TDD_1_6_t DLSCH_alloc_pdu1A;
// extern DCI1A_5MHz_TDD_1_6_t BCCH_alloc_pdu;
// extern DCI1A_5MHz_TDD_1_6_t CCCH_alloc_pdu;
// extern DCI1_5MHz_TDD_t DLSCH_alloc_pdu;
// extern DCI0_5MHz_FDD_t UL_alloc_pdu_fdd;
// extern DCI1A_5MHz_FDD_t DLSCH_alloc_pdu1A_fdd;
// extern DCI1A_5MHz_FDD_t RA_alloc_pdu_fdd;
// extern DCI1A_5MHz_FDD_t BCCH_alloc_pdu_fdd;
// extern DCI1A_5MHz_FDD_t CCCH_alloc_pdu_fdd;
// extern DCI1_5MHz_FDD_t DLSCH_alloc_pdu_fdd;
// extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu1;
// extern DCI2_5MHz_2A_TDD_t DLSCH_alloc_pdu2;
// extern DCI1E_5MHz_2A_M10PRB_TDD_t DLSCH_alloc_pdu1E;
//NB-IoT--------------------------------- //NB-IoT---------------------------------
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
#include "LAYER2/MAC/proto_NB_IoT.h" #include "LAYER2/MAC/proto_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h" #include "LAYER2/MAC/extern_NB_IoT.h"
#include "vars_NB_IoT.h"
#include "RRC/LITE/proto_NB_IoT.h" #include "RRC/LITE/proto_NB_IoT.h"
int mac_init_global_param_NB_IoT(void) int mac_init_global_param_NB_IoT(void)
...@@ -67,7 +68,6 @@ int mac_top_init_NB_IoT() ...@@ -67,7 +68,6 @@ int mac_top_init_NB_IoT()
int l2_init_eNB_NB_IoT() int l2_init_eNB_NB_IoT()
{ {
LOG_I(MAC,"[MAIN] Mapping L2 IF-Module functions\n"); LOG_I(MAC,"[MAIN] Mapping L2 IF-Module functions\n");
IF_Module_init_L2(); IF_Module_init_L2();
......
...@@ -41,24 +41,8 @@ ...@@ -41,24 +41,8 @@
//#include "PHY_INTERFACE/defs.h" //#include "PHY_INTERFACE/defs.h"
//#include "COMMON/mac_rrc_primitives.h" //#include "COMMON/mac_rrc_primitives.h"
#ifdef NB_IOT
//NB-IoT
eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT;
IF_Module_t *if_inst;
#endif
const uint32_t BSR_TABLE_NB_IoT[BSR_TABLE_SIZE_NB_IoT]= {0,10,12,14,17,19,22,26,31,36,42,49,57,67,78,91, IF_Module_t *if_inst;
105,125,146,171,200,234,274,321,376,440,515,603,706,826,967,1132,
1326,1552,1817,2127,2490,2915,3413,3995,4677,5467,6411,7505,8787,10287,12043,14099,
16507,19325,22624,26487,31009,36304,42502,49759,58255,68201,79846,93479,109439, 128125,150000, 300000
};
eNB_ULSCH_INFO_NB_IoT eNB_ulsch_info_NB_IoT[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT]; // eNBxUE = 8x8
eNB_DLSCH_INFO_NB_IoT eNB_dlsch_info_NB_IoT[NUMBER_OF_eNB_MAX][MAX_NUM_CCs][NUMBER_OF_UE_MAX_NB_IoT]; // eNBxUE = 8x8
MAC_xface_NB_IoT *mac_xface_NB_IoT;
//NB-IoT-------------------------------------- //NB-IoT--------------------------------------
eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT; eNB_MAC_INST_NB_IoT *eNB_mac_inst_NB_IoT;
......
...@@ -10,6 +10,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -10,6 +10,7 @@ void UL_indication(UL_IND_t *UL_INFO)
{ {
for(i=0;i<UL_INFO->NRACH.number_of_initial_scs_detected;i++) for(i=0;i<UL_INFO->NRACH.number_of_initial_scs_detected;i++)
{ {
/*
initiate_ra_proc_NB_IoT(UL_INFO->module_id, initiate_ra_proc_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id, UL_INFO->CC_id,
UL_INFO->frame, UL_INFO->frame,
...@@ -17,7 +18,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -17,7 +18,7 @@ void UL_indication(UL_IND_t *UL_INFO)
//timing_offset = Timing_advance * 16 //timing_offset = Timing_advance * 16
(UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance * 16, (UL_INFO->NRACH.nrach_pdu_list+i)->nrach_indication_rel13.timing_advance * 16,
UL_INFO->subframe UL_INFO->subframe
); );*/
} }
} }
if(UL_INFO->RX_NPUSCH.number_of_pdus>0) if(UL_INFO->RX_NPUSCH.number_of_pdus>0)
...@@ -25,7 +26,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -25,7 +26,7 @@ void UL_indication(UL_IND_t *UL_INFO)
/*If there is a Uplink SDU (even MSG3, NAK) need to send to MAC*/ /*If there is a Uplink SDU (even MSG3, NAK) need to send to MAC*/
for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++) for(i=0;i<UL_INFO->RX_NPUSCH.number_of_pdus;i++)
{ {
/*For MSG3, Normal Uplink Data, NAK*/ /*For MSG3, Normal Uplink Data, NAK
rx_sdu_NB_IoT(UL_INFO->module_id, rx_sdu_NB_IoT(UL_INFO->module_id,
UL_INFO->CC_id, UL_INFO->CC_id,
UL_INFO->frame, UL_INFO->frame,
...@@ -34,7 +35,7 @@ void UL_indication(UL_IND_t *UL_INFO) ...@@ -34,7 +35,7 @@ void UL_indication(UL_IND_t *UL_INFO)
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->data, (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->data,
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_indication_rel8.length, (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_indication_rel8.length,
(UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.harq_pid (UL_INFO->RX_NPUSCH.rx_pdu_list+i)->rx_ue_information.harq_pid
); );*/
} }
......
This diff is collapsed.
...@@ -704,9 +704,9 @@ int rrc_mac_config_req_eNB_NB_IoT( ...@@ -704,9 +704,9 @@ int rrc_mac_config_req_eNB_NB_IoT(
} }
//Now trigger the phy_config_xxx for configuring PHY through the PHY_config_req //Now trigger the phy_config_xxx for configuring PHY through the PHY_config_req
/*AssertFatal(if_inst->PHY_config_req != NULL, "rrc_mac_config_req_eNB_NB_IoT: PHY_config_req pointer function is NULL\n"); AssertFatal(if_inst->PHY_config_req != NULL, "rrc_mac_config_req_eNB_NB_IoT: PHY_config_req pointer function is NULL\n");
if(if_inst->PHY_config_req) if(if_inst->PHY_config_req)
if_inst->PHY_config_req(config_INFO);*/ if_inst->PHY_config_req(config_INFO);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_OUT);
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
#include "PHY/defs_NB_IoT.h" #include "PHY/defs_NB_IoT.h"
#include "SCHED/defs_NB_IoT.h" #include "SCHED/defs_NB_IoT.h"
#include "PHY_INTERFACE/IF_Module_NB_IoT.h" #include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/MAC/extern_NB_IoT.h"
#include "PHY/extern_NB_IoT.h" #include "PHY/extern_NB_IoT.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/extern.h" #include "LAYER2/MAC/extern.h"
...@@ -614,7 +615,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_NB_IoT_t *p ...@@ -614,7 +615,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,eNB_rxtx_proc_NB_IoT_t *p
* (on its turn the scheduler will trigger the phy_procedure_eNB_TX through schedule_responce function * (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); if (oai_exit) return(-1);
......
...@@ -1811,10 +1811,10 @@ int main( int argc, char **argv ) { ...@@ -1811,10 +1811,10 @@ int main( int argc, char **argv ) {
if (node_function[0] <= NGFI_RAU_IF4p5) { // don't initialize L2 for RRU 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)); if_inst = malloc(sizeof(IF_Module_t));
LOG_I(PHY,"Allocate IF-Module for NB-IoT\n"); LOG_I(PHY,"Allocate IF-Module for NB-IoT\n");
#endif
//--------------------------- //---------------------------
LOG_I(PHY,"Intializing L2\n"); LOG_I(PHY,"Intializing L2\n");
...@@ -1825,9 +1825,8 @@ int main( int argc, char **argv ) { ...@@ -1825,9 +1825,8 @@ int main( int argc, char **argv ) {
0); // HO flag 0); // HO flag
//initialize L2 for NB-IoT stuff (complementary to legacy OAI initialization) //initialize L2 for NB-IoT stuff (complementary to legacy OAI initialization)
#ifdef NB_IOT
l2_init_eNB_NB_IoT(); l2_init_eNB_NB_IoT();
#endif
mac_xface->macphy_exit = &exit_fun; mac_xface->macphy_exit = &exit_fun;
......
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