Commit 711a4fb9 authored by Nick Ho's avatar Nick Ho

Add the initialization of the IF_Module at lte-softmodem main

parent e3b21d8b
...@@ -7,23 +7,23 @@ ...@@ -7,23 +7,23 @@
//called at initialization of L2 //called at initialization of L2
//TODO: define the input //TODO: define the input
IF_Module_t* IF_Module_init_L2(void) //southbound IF-Module Interface void IF_Module_init_L2(void) //southbound IF-Module Interface
{ {
//register the IF Module to MAC //register the IF Module to MAC
if_inst->UL_indication = UL_indication; if_inst->UL_indication = UL_indication;
return if_inst; //return if_inst;
} }
//called at initialization of L1 //called at initialization of L1
//TODO: define the input //TODO: define the input
IF_Module_t* IF_Module_init_L1(void) //northbound IF-Module Interface void IF_Module_init_L1(void) //northbound IF-Module Interface
{ {
//fill the Sched_Rsp_t //fill the Sched_Rsp_t
//fill the PHY_Config_t -->already done in rrc_mac_config //fill the PHY_Config_t -->already done in rrc_mac_config
if_inst->schedule_response = schedule_response; if_inst->schedule_response = schedule_response;
if_inst->PHY_config_req = PHY_config_req; if_inst->PHY_config_req = PHY_config_req;
return if_inst; //return if_inst;
} }
...@@ -172,8 +172,8 @@ typedef struct IF_Module_s{ ...@@ -172,8 +172,8 @@ typedef struct IF_Module_s{
//int IF_Module_init(IF_Module_t *if_inst); //int IF_Module_init(IF_Module_t *if_inst);
IF_Module_t* IF_Module_init_L1(void); void IF_Module_init_L1(void);
IF_Module_t* IF_Module_init_L2(void); void IF_Module_init_L2(void);
#endif #endif
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
#include "LAYER2/MAC/proto.h" #include "LAYER2/MAC/proto.h"
#include "RRC/LITE/vars.h" #include "RRC/LITE/vars.h"
#include "PHY_INTERFACE/vars.h" #include "PHY_INTERFACE/vars.h"
#include "PHY_INTERFACE/defs_nb_iot.h"
#ifdef SMBV #ifdef SMBV
#include "PHY/TOOLS/smbv.h" #include "PHY/TOOLS/smbv.h"
...@@ -1622,6 +1623,8 @@ int main( int argc, char **argv ) { ...@@ -1622,6 +1623,8 @@ int main( int argc, char **argv ) {
//this is eNB //this is eNB
PHY_vars_eNB_g = malloc(sizeof(PHY_VARS_eNB**)); PHY_vars_eNB_g = malloc(sizeof(PHY_VARS_eNB**));
PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*)); PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*));
// do the initialization for the IF Module
if_inst = malloc(sizeof(IF_Module_t *));
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { 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] = init_lte_eNB(frame_parms[CC_id],0,frame_parms[CC_id]->Nid_cell,node_function[CC_id],abstraction_flag);
...@@ -1849,9 +1852,14 @@ int main( int argc, char **argv ) { ...@@ -1849,9 +1852,14 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
} }
} else { } else {
printf("Initializing IF Module in PHY layer\n");
IF_Module_init_L1();
printf("Initializing eNB threads\n"); printf("Initializing eNB threads\n");
init_eNB(node_function,node_timing,1,eth_params,single_thread_flag,wait_for_sync); init_eNB(node_function,node_timing,1,eth_params,single_thread_flag,wait_for_sync);
number_of_cards = 1; number_of_cards = 1;
for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) { for(CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
......
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