Commit 973a0795 authored by Hongzhi Wang's avatar Hongzhi Wang
Browse files

update ue dlsch decoding multi-threading

parent 08e91003
...@@ -742,6 +742,7 @@ void init_UE(int nb_inst) { ...@@ -742,6 +742,7 @@ void init_UE(int nb_inst) {
int inst; int inst;
NR_UE_MAC_INST_t *mac_inst; NR_UE_MAC_INST_t *mac_inst;
pthread_t threads[nb_inst]; pthread_t threads[nb_inst];
pthread_t dlsch0_threads;
for (inst=0; inst < nb_inst; inst++) { for (inst=0; inst < nb_inst; inst++) {
PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0]; PHY_VARS_NR_UE *UE = PHY_vars_UE_g[inst][0];
...@@ -763,6 +764,11 @@ void init_UE(int nb_inst) { ...@@ -763,6 +764,11 @@ void init_UE(int nb_inst) {
mac_inst->initial_bwp_ul.cyclic_prefix = UE->frame_parms.Ncp; mac_inst->initial_bwp_ul.cyclic_prefix = UE->frame_parms.Ncp;
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]); LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX); threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
#ifdef UE_DLSCH_PARALLELISATION
threadCreate(&dlsch0_threads, dlsch_thread, (void *)UE, "DLthread", -1, OAI_PRIORITY_RT_MAX-1);
#endif
} }
printf("UE threads created by %ld\n", gettid()); printf("UE threads created by %ld\n", gettid());
......
...@@ -1818,6 +1818,6 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue, ...@@ -1818,6 +1818,6 @@ int nr_extract_dci_info(PHY_VARS_NR_UE *ue,
uint16_t n_RB_DLBWP, uint16_t n_RB_DLBWP,
uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]); uint16_t crc_scrambled_values[TOTAL_NBR_SCRAMBLED_VALUES]);
void *dlsch_thread(void *arg);
/**@}*/ /**@}*/
#endif #endif
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
#define RX_NB_TH_MAX 2 #define RX_NB_TH_MAX 2
#define RX_NB_TH 2 #define RX_NB_TH 2
#define RX_NB_TH_DL 2
#define LTE_SLOTS_PER_SUBFRAME 2 #define LTE_SLOTS_PER_SUBFRAME 2
......
...@@ -1221,10 +1221,10 @@ typedef struct { ...@@ -1221,10 +1221,10 @@ typedef struct {
/* this structure is used to pass both UE phy vars and /* this structure is used to pass both UE phy vars and
* proc to the function UE_thread_rxn_txnp4 * proc to the function UE_thread_rxn_txnp4
*/ */
struct nr_rxtx_thread_data { typedef struct nr_rxtx_thread_data_s {
UE_nr_rxtx_proc_t proc;
PHY_VARS_NR_UE *UE; PHY_VARS_NR_UE *UE;
UE_nr_rxtx_proc_t *proc; } nr_rxtx_thread_data_t;
};
/*static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) { /*static inline int wait_on_condition(pthread_mutex_t *mutex,pthread_cond_t *cond,int *instance_cnt,char *name) {
......
...@@ -60,7 +60,7 @@ typedef struct { ...@@ -60,7 +60,7 @@ typedef struct {
uint8_t decoder_thread_available; uint8_t decoder_thread_available;
uint8_t decoder_main_available; uint8_t decoder_main_available;
uint8_t decoder_switch; uint8_t decoder_switch;
int counter_decoder; int num_seg;
uint8_t channel_level; uint8_t channel_level;
int eNB_id; int eNB_id;
int harq_pid; int harq_pid;
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6 #define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6
//#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size //#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size
//#define UE_SLOT_PARALLELISATION //#define UE_SLOT_PARALLELISATION
//#define UE_DLSCH_PARALLELISATION #define UE_DLSCH_PARALLELISATION//
/*enum openair_SCHED_STATUS { /*enum openair_SCHED_STATUS {
openair_SCHED_STOPPED=1, openair_SCHED_STOPPED=1,
......
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