diff --git a/openair1/SIMULATION/LTE_PHY/dlsim.c b/openair1/SIMULATION/LTE_PHY/dlsim.c index fd649ec0e4d9c513720c08318c265abda8ff477a..6d85b47a10f579f6f01ec20a343f8443d8ecfc6d 100644 --- a/openair1/SIMULATION/LTE_PHY/dlsim.c +++ b/openair1/SIMULATION/LTE_PHY/dlsim.c @@ -82,14 +82,21 @@ double t_rx_min = 1000000000; /*!< \brief initial min process time for rx */ int n_tx_dropped = 0; /*!< \brief initial max process time for tx */ int n_rx_dropped = 0; /*!< \brief initial max process time for rx */ +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -1057,6 +1064,9 @@ int main(int argc, char **argv) break; } } + if() + set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT"); + set_worker_conf("WORKER_ENABLE"); if (transmission_mode>1) pa=dBm3; printf("dlsim: tmode %d, pa %d\n",transmission_mode,pa); diff --git a/openair1/SIMULATION/LTE_PHY/ulsim.c b/openair1/SIMULATION/LTE_PHY/ulsim.c index 826f185d2abe98112f09680b54a50081c98479c1..89c0d09b1da0639d95390642f8285a0568486500 100644 --- a/openair1/SIMULATION/LTE_PHY/ulsim.c +++ b/openair1/SIMULATION/LTE_PHY/ulsim.c @@ -97,14 +97,21 @@ nfapi_tx_request_pdu_t tx_pdu_list[MAX_NUM_TX_REQUEST_PDU]; nfapi_tx_request_t TX_req; Sched_Rsp_t sched_resp; +char *parallel_config = NULL; +char *worker_config = NULL; static THREAD_STRUCT thread_struct; -void set_parallel_conf(int parallel_conf) +void set_parallel_conf(char *parallel_conf) { - thread_struct.parallel_conf = (PARALLEL_CONF_t)parallel_conf; + if(strcmp(parallel_conf,"PARALLEL_SINGLE_THREAD")==0) thread_struct.parallel_conf = PARALLEL_SINGLE_THREAD; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_SPLIT; + else if(strcmp(parallel_conf,"PARALLEL_RU_L1_TRX_SPLIT")==0) thread_struct.parallel_conf = PARALLEL_RU_L1_TRX_SPLIT; + printf("[CONFIG] parallel conf is set to %d\n",thread_struct.parallel_conf); } -void set_parallel_worker_conf(int worker_conf) +void set_worker_conf(char *worker_conf) { - thread_struct.worker_conf = (WORKER_CONF_t)worker_conf; + if(strcmp(worker_conf,"WORKER_DISABLE")==0) thread_struct.worker_conf = WORKER_DISABLE; + else if(strcmp(worker_conf,"WORKER_ENABLE")==0) thread_struct.worker_conf = WORKER_ENABLE; + printf("[CONFIG] worker conf is set to %d\n",thread_struct.worker_conf); } PARALLEL_CONF_t get_thread_parallel_conf(void) { @@ -741,6 +748,8 @@ int main(int argc, char **argv) break; } } + set_parallel_conf("PARALLEL_RU_L1_TRX_SPLIT"); + set_worker_conf("WORKER_ENABLE"); RC.nb_L1_inst = 1; RC.nb_RU = 1; diff --git a/openair2/ENB_APP/enb_config.c b/openair2/ENB_APP/enb_config.c index 2d6ebc966e2964f4d4a179802522d8be61c5ec66..73a7cfb9ca31af83627e53eb6a65f0e164c88ac4 100644 --- a/openair2/ENB_APP/enb_config.c +++ b/openair2/ENB_APP/enb_config.c @@ -61,8 +61,8 @@ #include "enb_paramdef.h" extern uint16_t sf_ahead; -extern void set_parallel_conf(int parallel_conf); -extern void set_parallel_worker_conf(int worker_conf); +extern void set_parallel_conf(char* parallel_conf); +extern void set_worker_conf(char* worker_conf); extern PARALLEL_CONF_t get_thread_parallel_conf(void); extern WORKER_CONF_t get_thread_worker_conf(void);