Commit 89264079 authored by chenhsunyang0922's avatar chenhsunyang0922

fix lte-enb-nbiot.c

parent 00b6fe81
...@@ -166,6 +166,7 @@ enum transmission_access_mode { ...@@ -166,6 +166,7 @@ enum transmission_access_mode {
SCHEDULED_ACCESS, SCHEDULED_ACCESS,
CBA_ACCESS}; CBA_ACCESS};
typedef enum { typedef enum {
eNodeB_3GPP=0, // classical eNodeB function eNodeB_3GPP=0, // classical eNodeB function
eNodeB_3GPP_BBU, // eNodeB with NGFI IF5 eNodeB_3GPP_BBU, // eNodeB with NGFI IF5
...@@ -175,6 +176,7 @@ typedef enum { ...@@ -175,6 +176,7 @@ typedef enum {
NGFI_RRU_IF4p5 // NGFI_RRU (NGFI remote radio-unit,IF4p5) NGFI_RRU_IF4p5 // NGFI_RRU (NGFI remote radio-unit,IF4p5)
} eNB_func_t; } eNB_func_t;
typedef enum { typedef enum {
synch_to_ext_device=0, // synch to RF or Ethernet device synch_to_ext_device=0, // synch to RF or Ethernet device
synch_to_other // synch to another source (timer, other CC_id) synch_to_other // synch to another source (timer, other CC_id)
......
...@@ -758,6 +758,8 @@ typedef struct { ...@@ -758,6 +758,8 @@ typedef struct {
pthread_cond_t cond_RUs; pthread_cond_t cond_RUs;
/// mutex for RXn-TXnp4 processing thread /// mutex for RXn-TXnp4 processing thread
pthread_mutex_t mutex_RUs; pthread_mutex_t mutex_RUs;
uint16_t HFN;
} L1_rxtx_proc_t; } L1_rxtx_proc_t;
typedef struct { typedef struct {
......
...@@ -90,7 +90,7 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -90,7 +90,7 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_tx.h"
#include "UTIL/OTG/otg_externs.h" #include "UTIL/OTG/otg_externs.h"
#include "UTIL/MATH/oml.h" #include "UTIL/MATH/oml.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "common/utils/LOG/vcd_signal_dumper.h"
#include "UTIL/OPT/opt.h" #include "UTIL/OPT/opt.h"
#include "enb_config.h" #include "enb_config.h"
//#include "PHY/TOOLS/time_meas.h" //#include "PHY/TOOLS/time_meas.h"
...@@ -109,21 +109,22 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -109,21 +109,22 @@ unsigned short config_frames[4] = {2,9,11,13};
#endif #endif
#include "T.h" #include "T.h"
extern volatile int oai_exit;
void init_eNB_NB_IoT(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst,eth_params_t *,int,int); void init_eNB_NB_IoT(eNB_func_NB_IoT_t node_function[], eNB_timing_NB_IoT_t node_timing[],int nb_inst,eth_params_t *,int,int);
extern void do_prach(PHY_VARS_eNB *eNB,int frame,int subframe); extern void do_prach(PHY_VARS_eNB_NB_IoT *eNB,int frame,int subframe);
//Modify for NB-IoT merge //Modify for NB-IoT merge
static inline int rxtx_NB_IoT(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thread_name) { static inline int rxtx_NB_IoT(PHY_VARS_eNB_NB_IoT *eNB,L1_rxtx_proc_t *proc, char *thread_name) {
///start_meas(&softmodem_stats_rxtx_sf); ///start_meas(&softmodem_stats_rxtx_sf);
// **************************************** // ****************************************
// Common RX procedures subframe n // Common RX procedures subframe n
if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5))) if ((eNB->do_prach)&&((eNB->node_function != NGFI_RCC_IF4p5_NB_IoT)))
eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx); eNB->do_prach(eNB,proc->frame_rx,proc->subframe_rx);
phy_procedures_eNB_common_RX(eNB,proc); phy_procedures_eNB_common_RX(eNB,proc);
...@@ -145,7 +146,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thre ...@@ -145,7 +146,7 @@ static inline int rxtx_NB_IoT(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thre
eNB->UL_INFO.CC_id = eNB->CC_id; eNB->UL_INFO.CC_id = eNB->CC_id;
eNB->UL_INFO.hypersfn = proc->HFN; eNB->UL_INFO.hypersfn = proc->HFN;
eNB->if_inst->UL_indication(&eNB->UL_INFO); eNB->if_inst_NB_IoT->UL_indication(&eNB->UL_INFO);
pthread_mutex_unlock(&eNB->UL_INFO_mutex); pthread_mutex_unlock(&eNB->UL_INFO_mutex);
...@@ -210,7 +211,7 @@ static void* eNB_thread_prach_NB_IoT( void* param ) { ...@@ -210,7 +211,7 @@ static void* eNB_thread_prach_NB_IoT( void* param ) {
///Modify to NB-IoT merge ///Modify to NB-IoT merge
void init_eNB_NB_IoT(eNB_func_t node_function[], eNB_timing_t node_timing[],int nb_inst,eth_params_t *eth_params,int single_thread_flag,int wait_for_sync) { void init_eNB_NB_IoT(eNB_func_NB_IoT_t node_function[], eNB_timing_NB_IoT_t node_timing[],int nb_inst,eth_params_t *eth_params,int single_thread_flag,int wait_for_sync) {
int CC_id; int CC_id;
int inst; int inst;
......
...@@ -21,18 +21,20 @@ ...@@ -21,18 +21,20 @@
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs_eNB.h" #include "PHY/defs_eNB.h"
#include "PHY/defs_L1_NB_IoT.h"
#include "PHY/defs_common.h"
PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms, PHY_VARS_eNB* init_lte_eNB(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t eNB_id, uint8_t eNB_id,
uint16_t Nid_cell, uint16_t Nid_cell,
eNB_func_t node_function, node_function_t node_function,
uint8_t abstraction_flag); uint8_t abstraction_flag);
PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms, PHY_VARS_UE* init_lte_UE(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id, uint8_t UE_id,
uint8_t abstraction_flag); uint8_t abstraction_flag);
PHY_VARS_RN* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms, PHY_VARS_RN_NB_IoT* init_lte_RN(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t RN_id, uint8_t RN_id,
uint8_t eMBMS_active_state); uint8_t eMBMS_active_state);
......
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