From 33e8577f941360e2f3dd29748478be073ce194e2 Mon Sep 17 00:00:00 2001 From: Y_Tomita Date: Wed, 17 Oct 2018 10:01:05 +0900 Subject: [PATCH] Fix for problems that L2sim finishes in case of multiple UEs and UE L2sim keeps wating for a signal. --- targets/RT/USER/lte-uesoftmodem.c | 35 +++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) mode change 100644 => 100755 targets/RT/USER/lte-uesoftmodem.c diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c old mode 100644 new mode 100755 index 69556b19f2..0081e7be8b --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -852,7 +852,7 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con printf("Running with %d UE instances\n",NB_UE_INST); - if (NB_UE_INST > 1 && simL1flag != 1) { + if (NB_UE_INST > 1 && simL1flag != 1 && nfapi_mode != 3) { printf("Running with more than 1 UE instance and simL1 is not active, this will result in undefined behaviour for now, exiting.\n"); abort(); } @@ -971,6 +971,8 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con RCConfig_sim(); } +// source code written in below moved to later to avoid keeping waiting for nfapi_sync_cond in wait_nfapi_init. +/* // start the main UE threads int eMBMS_active = 0; @@ -1001,7 +1003,7 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; } } - +*/ cpuf=get_cpu_freq_GHz(); @@ -1090,7 +1092,36 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con } printf("NFAPI MODE:%s\n", nfapi_mode_str); + // start the main UE threads + int eMBMS_active = 0; + if (nfapi_mode==3) // UE-STUB-PNF + { + config_sync_var=0; + wait_nfapi_init("main?"); + //Panos: Temporarily we will be using single set of threads for multiple UEs. + //init_UE_stub(1,eMBMS_active,uecap_xer_in,emul_iface); + init_UE_stub_single_thread(NB_UE_INST,eMBMS_active,uecap_xer_in,emul_iface); + } + else { + init_UE(NB_UE_INST,eMBMS_active,uecap_xer_in,0,phy_test,UE_scan,UE_scan_carrier,mode,(int)rx_gain[0][0],tx_max_power[0], + frame_parms[0]); + } + + + if (phy_test==0) { + printf("Filling UE band info\n"); + fill_ue_band_info(); + dl_phy_sync_success (0, 0, 0, 1); + } + + if (nfapi_mode!=3){ + number_of_cards = 1; + for(CC_id=0; CC_idrf_map.card=0; + PHY_vars_UE_g[0][CC_id]->rf_map.chain=CC_id+chain_offset; + } + } // connect the TX/RX buffers