Commit de4712e7 authored by hbilel's avatar hbilel

UE add new dlsch thread

parent 2528ed13
This diff is collapsed.
......@@ -166,6 +166,8 @@ int32_t dlsch_encoding_2threads(PHY_VARS_eNB *eNB,
time_stats_t *te_stats,
time_stats_t *i_stats);
uint32_t dlsch_decoding_2thread0(void *arg);
void dlsch_encoding_emul(PHY_VARS_eNB *phy_vars_eNB,
uint8_t *DLSCH_pdu,
LTE_eNB_DLSCH_t *dlsch);
......@@ -1324,6 +1326,19 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
uint8_t harq_pid,
uint8_t is_crnti,
uint8_t llr8_flag);
/*
uint32_t dlsch_decoding_mthread(PHY_VARS_UE *phy_vars_ue,
UE_rxtx_proc_t *proc,
int eNB_id,
int16_t *dlsch_llr,
LTE_DL_FRAME_PARMS *lte_frame_parms,
LTE_UE_DLSCH_t *dlsch,
LTE_DL_UE_HARQ_t *harq_process,
uint32_t frame,
uint8_t subframe,
uint8_t harq_pid,
uint8_t is_crnti,
uint8_t llr8_flag);*/
uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
uint8_t subframe,
......
......@@ -424,6 +424,20 @@ typedef struct {
/// mutex for UE synch thread
//pthread_mutex_t mutex_slot0_dl_processing;
pthread_mutex_t mutex_slot1_dl_processing;
//int instance_cnt_slot0_dl_processing;
int instance_cnt_dlsch_td;
/// pthread descriptor fep_slot1 thread
//pthread_t pthread_slot0_dl_processing;
pthread_t pthread_dlsch_td;
/// pthread attributes for fep_slot1 processing thread
// pthread_attr_t attr_slot0_dl_processing;
pthread_attr_t attr_dlsch_td;
/// condition variable for UE fep_slot1 thread;
//pthread_cond_t cond_slot0_dl_processing;
pthread_cond_t cond_dlsch_td;
/// mutex for UE synch thread
//pthread_mutex_t mutex_slot0_dl_processing;
pthread_mutex_t mutex_dlsch_td;
//
uint8_t chan_est_pilot0_slot1_available;
uint8_t chan_est_slot1_available;
......@@ -431,6 +445,9 @@ typedef struct {
uint8_t dci_slot0_available;
uint8_t first_symbol_available;
//uint8_t channel_level;
int eNB_id;
int harq_pid;
int llr8_flag;
/// scheduling parameters for fep_slot1 thread
struct sched_param sched_param_fep_slot1;
......
......@@ -44,6 +44,7 @@ enum THREAD_INDEX { OPENAIR_THREAD_INDEX = 0,
#define OPENAIR_THREAD_STACK_SIZE PTHREAD_STACK_MIN //4096 //RTL_PTHREAD_STACK_MIN*6
//#define DLC_THREAD_STACK_SIZE 4096 //DLC stack size
//#define UE_SLOT_PARALLELISATION
//#define UE_DLSCH_PARALLELISATION
enum openair_SCHED_STATUS {
openair_SCHED_STOPPED=1,
......
......@@ -3553,6 +3553,17 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
ue->dlsch_MCH[0]->harq_processes[0]->G,
ue->pdsch_vars_MCH[0]->llr[0],0,nr_tti_rx<<1);
#ifdef UE_DLSCH_PARALLELISATION
ret = dlsch_decoding_mthread(ue,proc, eNB_id,
ue->pdsch_vars_MCH[0]->llr[0],
&ue->frame_parms,
ue->dlsch_MCH[0],
ue->dlsch_MCH[0]->harq_processes[0],
frame_rx,
nr_tti_rx,
0,
0,1);
#else
ret = dlsch_decoding(ue,
ue->pdsch_vars_MCH[0]->llr[0],
&ue->frame_parms,
......@@ -3562,6 +3573,8 @@ void ue_pmch_procedures(PHY_VARS_UE *ue, UE_rxtx_proc_t *proc,int eNB_id,int abs
nr_tti_rx,
0,
0,1);
printf("start pmch dlsch decoding\n");
#endif
} else { // abstraction
#ifdef PHY_ABSTRACTION
ret = dlsch_decoding_emul(ue,
......@@ -3973,6 +3986,19 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
#if UE_TIMING_TRACE
start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]]);
#endif
#ifdef UE_DLSCH_PARALLELISATION
ret = dlsch_decoding_mthread(ue,proc,eNB_id,
pdsch_vars->llr[0],
&ue->frame_parms,
dlsch0,
dlsch0->harq_processes[harq_pid],
frame_rx,
nr_tti_rx,
harq_pid,
pdsch==PDSCH?1:0,
dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
#else
ret = dlsch_decoding(ue,
pdsch_vars->llr[0],
&ue->frame_parms,
......@@ -3983,6 +4009,8 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
harq_pid,
pdsch==PDSCH?1:0,
dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
printf("start cW0 dlsch decoding\n");
#endif
#if UE_TIMING_TRACE
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]]);
......@@ -4039,6 +4067,19 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
start_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]]);
#endif
#ifdef UE_DLSCH_PARALLELISATION
ret1 = dlsch_decoding_mthread(ue,proc, eNB_id,
pdsch_vars->llr[1],
&ue->frame_parms,
dlsch1,
dlsch1->harq_processes[harq_pid],
frame_rx,
nr_tti_rx,
harq_pid,
pdsch==PDSCH?1:0,
dlsch1->harq_processes[harq_pid]->TBS>256?1:0);
#else
ret1 = dlsch_decoding(ue,
pdsch_vars->llr[1],
&ue->frame_parms,
......@@ -4049,6 +4090,8 @@ void ue_dlsch_procedures(PHY_VARS_UE *ue,
harq_pid,
pdsch==PDSCH?1:0,
dlsch1->harq_processes[harq_pid]->TBS>256?1:0);
printf("start cw1 dlsch decoding\n");
#endif
#if UE_TIMING_TRACE
stop_meas(&ue->dlsch_decoding_stats[ue->current_thread_id[nr_tti_rx]]);
......
......@@ -9,6 +9,9 @@ typedef struct threads_s {
int slot1_proc_one;
int slot1_proc_two;
int slot1_proc_three;
int dlsch_td_one;
int dlsch_td_two;
int dlsch_td_three;
} threads_t;
#endif /* _THREADS_T_H_ */
......@@ -649,6 +649,9 @@ static void get_options (int argc, char **argv) {
LONG_OPTION_THREADSLOT1PROCONE,
LONG_OPTION_THREADSLOT1PROCTWO,
LONG_OPTION_THREADSLOT1PROCTHREE,
LONG_OPTION_THREADDLSCHTDONE,
LONG_OPTION_THREADDLSCHTDTWO,
LONG_OPTION_THREADDLSCHTDTHREE,
LONG_OPTION_DCIFORMAT,
LONG_OPTION_AGREGATIONLEVEL,
LONG_OPTION_DEMOD_SHIFT,
......@@ -691,6 +694,9 @@ static void get_options (int argc, char **argv) {
{"threadSlot1ProcOne", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCONE},
{"threadSlot1ProcTwo", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCTWO},
{"threadSlot1ProcThree", required_argument, NULL, LONG_OPTION_THREADSLOT1PROCTHREE},
{"threadDlschTdOne", required_argument, NULL, LONG_OPTION_THREADDLSCHTDONE},
{"threadDlschTdTwo", required_argument, NULL, LONG_OPTION_THREADDLSCHTDTWO},
{"threadDlschTdThree", required_argument, NULL, LONG_OPTION_THREADDLSCHTDTHREE},
{"DCIformat", required_argument, NULL, LONG_OPTION_DCIFORMAT},
{"AgregationLevel", required_argument, NULL, LONG_OPTION_AGREGATIONLEVEL},
{"dlsch-demod-shift", required_argument, NULL, LONG_OPTION_DEMOD_SHIFT},
......@@ -836,6 +842,15 @@ static void get_options (int argc, char **argv) {
case LONG_OPTION_THREADSLOT1PROCTHREE:
threads.slot1_proc_three=atoi(optarg);
break;
case LONG_OPTION_THREADDLSCHTDONE:
threads.dlsch_td_one=atoi(optarg);
break;
case LONG_OPTION_THREADDLSCHTDTWO:
threads.dlsch_td_two=atoi(optarg);
break;
case LONG_OPTION_THREADDLSCHTDTHREE:
threads.dlsch_td_three=atoi(optarg);
break;
case LONG_OPTION_DCIFORMAT:
dci_Format = atoi(optarg);
break;
......
......@@ -46,6 +46,7 @@
#include "SCHED/extern.h"
#include "LAYER2/MAC/extern.h"
#include "LAYER2/MAC/proto.h"
#include "PHY/LTE_TRANSPORT/proto.h"
#include "UTIL/LOG/log_extern.h"
#include "UTIL/OTG/otg_tx.h"
......@@ -930,6 +931,12 @@ void init_UE_threads(PHY_VARS_UE *UE) {
printf("Init_UE_threads rtd %d proc %d nb_threads %d i %d\n",rtd->proc->sub_frame_start, UE->proc.proc_rxtx[i].sub_frame_start,nb_threads, i);
pthread_create(&UE->proc.proc_rxtx[i].pthread_rxtx, NULL, UE_thread_rxn_txnp4, rtd);
#ifdef UE_DLSCH_PARALLELISATION
pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_dlsch_td,NULL);
pthread_cond_init(&UE->proc.proc_rxtx[i].cond_dlsch_td,NULL);
pthread_create(&UE->proc.proc_rxtx[i].pthread_dlsch_td,NULL,dlsch_decoding_2thread0, rtd);
#endif
#ifdef UE_SLOT_PARALLELISATION
//pthread_mutex_init(&UE->proc.proc_rxtx[i].mutex_slot0_dl_processing,NULL);
//pthread_cond_init(&UE->proc.proc_rxtx[i].cond_slot0_dl_processing,NULL);
......
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