Commit f0274ed3 authored by Y_Tomita's avatar Y_Tomita

Modify to use Mod_id = 0 in L2 FAPI simulator's eNB to avoid Segmentation Fault

parent 7a755d8d
......@@ -236,8 +236,13 @@ static inline int rxtx(PHY_VARS_eNB *eNB,eNB_rxtx_proc_t *proc, char *thread_nam
if (nfapi_mode == 2){
new_dlsch_ue_select_tbl_in_use = dlsch_ue_select_tbl_in_use;
dlsch_ue_select_tbl_in_use = !dlsch_ue_select_tbl_in_use;
memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
// L2-emulator can work only one eNB.
// memcpy(&pre_scd_eNB_UE_stats,&RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
// memcpy(&pre_scd_activeUE, &RC.mac[ru->eNB_list[0]->Mod_id]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_eNB_UE_stats,&RC.mac[0]->UE_list.eNB_UE_stats, sizeof(eNB_UE_STATS)*MAX_NUM_CCs*NUMBER_OF_UE_MAX);
memcpy(&pre_scd_activeUE, &RC.mac[0]->UE_list.active, sizeof(boolean_t)*NUMBER_OF_UE_MAX);
if (pthread_mutex_lock(&ru->proc.mutex_pre_scd)!= 0) {
LOG_E( PHY, "[eNB] error locking proc mutex for eNB pre scd\n");
exit_fun("error locking mutex_time");
......
......@@ -121,7 +121,7 @@ extern int emulate_rf;
extern int numerology;
extern clock_source_t clock_source;
extern uint8_t dlsch_ue_select_tbl_in_use;
extern uint8_t nfapi_mode;
extern PARALLEL_CONF_t get_thread_parallel_conf(void);
extern WORKER_CONF_t get_thread_worker_conf(void);
extern void phy_init_RU(RU_t*);
......@@ -1923,7 +1923,12 @@ void* pre_scd_thread( void* param ){
int CC_id;
int Mod_id;
RU_t *ru = (RU_t*)param;
Mod_id = ru->eNB_list[0]->Mod_id;
// L2-emulator can work only one eNB
if( nfapi_mode == 2)
Mod_id = 0;
else
Mod_id = ru->eNB_list[0]->Mod_id;
frame = 0;
subframe = 4;
......
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