Commit 2b0097a8 authored by Y_Tomita's avatar Y_Tomita

Add UE's thread ID for L2 FAPI simulator.

parent 0e0a04fb
...@@ -889,6 +889,7 @@ typedef struct { ...@@ -889,6 +889,7 @@ typedef struct {
struct rx_tx_thread_data { struct rx_tx_thread_data {
PHY_VARS_UE *UE; PHY_VARS_UE *UE;
UE_rxtx_proc_t *proc; UE_rxtx_proc_t *proc;
uint16_t ue_thread_id;
}; };
......
...@@ -148,6 +148,7 @@ ...@@ -148,6 +148,7 @@
{"emul-iface", CONFIG_HLP_EMULIFACE, 0, strptr:&emul_iface, defstrval:"lo", TYPE_STRING, 100}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"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}, \ {"usrp-args", CONFIG_HLP_USRP_ARGS, 0, strptr:(char **)&usrp_args, defstrval:"type=b200", TYPE_STRING, 0}, \
......
...@@ -823,7 +823,7 @@ int main( int argc, char **argv ) ...@@ -823,7 +823,7 @@ int main( int argc, char **argv )
// Default value for the number of UEs. It will hold, // Default value for the number of UEs. It will hold,
// if not changed from the command line option --num-ues // if not changed from the command line option --num-ues
NB_UE_INST=1; NB_UE_INST=1;
NB_THREAD_INST=1;
#if defined (XFORMS) #if defined (XFORMS)
int ret; int ret;
#endif #endif
...@@ -859,6 +859,16 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con ...@@ -859,6 +859,16 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con
printf("NFAPI_MODE value: %d \n", nfapi_mode); 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 <NB_THREAD_INST ){
printf("Number of UEs < number of UE rxtx threads, exiting.\n");
abort();
}
// Not sure if the following is needed here // Not sure if the following is needed here
/*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) { /*if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
if (UE_flag == 0) { if (UE_flag == 0) {
...@@ -1051,7 +1061,7 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con ...@@ -1051,7 +1061,7 @@ printf("~~~~~~~~~~~~~~~~~~~~successfully get the parallel config[%d], worker con
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
if (create_tasks_ue(1) < 0) { if (create_tasks_ue(NB_UE_INST) < 0) {
printf("cannot create ITTI tasks\n"); printf("cannot create ITTI tasks\n");
exit(-1); // need a softer mode exit(-1); // need a softer mode
} }
......
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