diff --git a/openair1/PHY/defs_UE.h b/openair1/PHY/defs_UE.h old mode 100644 new mode 100755 index 55f8c9639a..0a4bd36731 --- a/openair1/PHY/defs_UE.h +++ b/openair1/PHY/defs_UE.h @@ -889,6 +889,7 @@ typedef struct { struct rx_tx_thread_data { PHY_VARS_UE *UE; UE_rxtx_proc_t *proc; + uint16_t ue_thread_id; }; diff --git a/targets/RT/USER/lte-softmodem.h b/targets/RT/USER/lte-softmodem.h index 9682bb0a56..56598a6c14 100755 --- a/targets/RT/USER/lte-softmodem.h +++ b/targets/RT/USER/lte-softmodem.h @@ -148,6 +148,7 @@ {"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \ {"L2-emul", NULL, 0, u8ptr:&nfapi_mode, defuintval:3, TYPE_UINT8, 0}, \ {"num-ues", NULL, 0, u16ptr:&(NB_UE_INST), defuintval:1, TYPE_UINT16, 0}, \ +{"nums_ue_thread" , NULL, 0, u16ptr:&(NB_THREAD_INST), defuintval:1, TYPE_UINT16, 0}, \ {"r" , CONFIG_HLP_PRB, 0, u8ptr:&(frame_parms[0]->N_RB_DL), defintval:25, TYPE_UINT8, 0}, \ {"dlsch-demod-shift", CONFIG_HLP_DLSHIFT, 0, iptr:(int32_t *)&dlsch_demod_shift, defintval:0, TYPE_INT, 0}, \ {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \ diff --git a/targets/RT/USER/lte-uesoftmodem.c b/targets/RT/USER/lte-uesoftmodem.c index 0081e7be8b..2a2c874a91 100755 --- a/targets/RT/USER/lte-uesoftmodem.c +++ b/targets/RT/USER/lte-uesoftmodem.c @@ -823,7 +823,7 @@ int main( int argc, char **argv ) // Default value for the number of UEs. It will hold, // if not changed from the command line option --num-ues NB_UE_INST=1; - + NB_THREAD_INST=1; #if defined (XFORMS) int ret; #endif @@ -859,6 +859,16 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con printf("NFAPI_MODE value: %d \n", nfapi_mode); + // Checking option of nums_ue_thread. + if(NB_THREAD_INST < 1){ + printf("Running with 0 UE rxtx thread, exiting.\n"); + abort(); + } + // Checking option's relation between nums_ue_thread and num-ues + if(NB_UE_INST