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 @@
//called at initialization of L2
//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
if_inst->UL_indication = UL_indication;
return if_inst;
//return if_inst;
}
//called at initialization of L1
//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 PHY_Config_t -->already done in rrc_mac_config
if_inst->schedule_response = schedule_response;
if_inst->PHY_config_req = PHY_config_req;
return if_inst;
//return if_inst;
}
......@@ -172,8 +172,8 @@ typedef struct IF_Module_s{
//int IF_Module_init(IF_Module_t *if_inst);
IF_Module_t* IF_Module_init_L1(void);
IF_Module_t* IF_Module_init_L2(void);
void IF_Module_init_L1(void);
void IF_Module_init_L2(void);
#endif
......@@ -51,6 +51,7 @@
#include "LAYER2/MAC/proto.h"
#include "RRC/LITE/vars.h"
#include "PHY_INTERFACE/vars.h"
#include "PHY_INTERFACE/defs_nb_iot.h"
#ifdef SMBV
#include "PHY/TOOLS/smbv.h"
......@@ -1622,6 +1623,8 @@ 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*));
// 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++) {
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 ) {
PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset;
}
} else {
printf("Initializing IF Module in PHY layer\n");
IF_Module_init_L1();
printf("Initializing eNB threads\n");
init_eNB(node_function,node_timing,1,eth_params,single_thread_flag,wait_for_sync);
number_of_cards = 1;
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