diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c index 55043bba31..d1296a8bdb 100755 --- a/targets/RT/USER/lte-enb.c +++ b/targets/RT/USER/lte-enb.c @@ -164,7 +164,9 @@ static inline int rxtx(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thread_name // ******************************************************************* +#if defined(PRE_SCD_THREAD) RU_t *ru = RC.ru[0]; +#endif if (nfapi_mode == 1) { // I am a PNF and I need to let nFAPI know that we have a (sub)frame tick @@ -218,6 +220,8 @@ static inline int rxtx(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thread_name phy_procedures_eNB_uespec_RX(eNB, proc); } +#if 0 + // Original Code from Fujitsu w/ old structure/field name if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT && nfapi_mode != 2){ if(wait_on_condition(&proc[1].mutex_rxtx,&proc[1].cond_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) { LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc[1].frame_rx,proc[1].subframe_rx); @@ -225,6 +229,14 @@ static inline int rxtx(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc, char *thread_name } if (release_thread(&proc[1].mutex_rxtx,&proc[1].pipe_ready,"wakeup_tx")<0) return(-1); } +#endif + if(get_thread_parallel_conf() == PARALLEL_RU_L1_TRX_SPLIT && nfapi_mode != 2){ + if (wait_on_condition(&proc->mutex,&proc->cond,&proc->instance_cnt, "wakeup_tx")<0) { + LOG_E(PHY,"Frame %d, subframe %d: TX1 not ready\n",proc->frame_rx,proc->subframe_rx); + return(-1); + } + if (release_thread(&proc->mutex,&proc->instance_cnt,"wakeup_tx")<0) return(-1); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ULSCH_SCHEDULER, 1 ); @@ -951,8 +963,11 @@ void init_eNB_proc(int inst) { pthread_create( &L1_proc->pthread, attr0, L1_thread, proc ); pthread_create( &L1_proc_tx->pthread, attr1, L1_thread_tx, proc); } else if (nfapi_mode == 2) { // this is neccesary in VNF or L2 FAPI simulator. - pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, &proc_rxtx[0] ); - pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] ); + // Original Code from Fujitsu w/ old structure/field name + //pthread_create( &proc_rxtx[0].pthread_rxtx, attr0, eNB_thread_rxtx, &proc_rxtx[0] ); + //pthread_create( &proc_rxtx[1].pthread_rxtx, attr1, eNB_thread_rxtx, &proc_rxtx[1] ); + pthread_create( &L1_proc->pthread, attr0, L1_thread, proc ); + pthread_create( &L1_proc_tx->pthread, attr1, L1_thread, proc); } pthread_create( &proc->pthread_prach, attr_prach, eNB_thread_prach, eNB );