add thread pool for dlsch
This commit is contained in:
@@ -206,6 +206,7 @@ int oaisim_flag=0;
|
|||||||
int emulate_rf = 0;
|
int emulate_rf = 0;
|
||||||
|
|
||||||
tpool_t *Tpool;
|
tpool_t *Tpool;
|
||||||
|
tpool_t *Tpool_dl;
|
||||||
|
|
||||||
char *usrp_args=NULL;
|
char *usrp_args=NULL;
|
||||||
|
|
||||||
@@ -672,8 +673,12 @@ int main( int argc, char **argv ) {
|
|||||||
set_taus_seed (0);
|
set_taus_seed (0);
|
||||||
tpool_t pool;
|
tpool_t pool;
|
||||||
Tpool = &pool;
|
Tpool = &pool;
|
||||||
char params[]="-1,-1";
|
char params[]="-1,-1,-1";
|
||||||
initTpool(params, Tpool, false);
|
initTpool(params, Tpool, false);
|
||||||
|
tpool_t pool_dl;
|
||||||
|
Tpool_dl = &pool_dl;
|
||||||
|
char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1";
|
||||||
|
initTpool(params_dl, Tpool_dl, false);
|
||||||
cpuf=get_cpu_freq_GHz();
|
cpuf=get_cpu_freq_GHz();
|
||||||
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
itti_init(TASK_MAX, THREAD_MAX, MESSAGES_ID_MAX, tasks_info, messages_info);
|
||||||
|
|
||||||
|
|||||||
@@ -103,4 +103,5 @@ extern void print_opp_meas(void);
|
|||||||
void *UE_thread(void *arg);
|
void *UE_thread(void *arg);
|
||||||
PHY_VARS_NR_UE *init_nr_ue_vars(NR_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag);
|
PHY_VARS_NR_UE *init_nr_ue_vars(NR_DL_FRAME_PARMS *frame_parms, uint8_t UE_id, uint8_t abstraction_flag);
|
||||||
extern tpool_t *Tpool;
|
extern tpool_t *Tpool;
|
||||||
|
extern tpool_t *Tpool_dl;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -531,7 +531,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
|
|
||||||
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
|
//LOG_E(PHY,"AbsSubframe %d.%d Start LDPC segment %d/%d A %d ",frame%1024,nr_tti_rx,r,harq_process->C-1, A);
|
||||||
|
|
||||||
//printf("harq process dr iteration %d\n", p_decParams->numMaxIter);
|
printf("harq process dr iteration %d\n", p_decParams->numMaxIter);
|
||||||
|
|
||||||
memset(pv,0,2*harq_process->Z*sizeof(int16_t));
|
memset(pv,0,2*harq_process->Z*sizeof(int16_t));
|
||||||
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
|
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
|
||||||
@@ -570,7 +570,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
ret = no_iteration_ldpc;
|
ret = no_iteration_ldpc;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("\x1B[33m" "CRC NOK\n\033[0m");
|
printf("\x1B[33m" "Segment %d CRC NOK\n",r);
|
||||||
ret = 1 + dlsch->max_ldpc_iterations;
|
ret = 1 + dlsch->max_ldpc_iterations;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -943,7 +943,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
opp_enabled=1;
|
opp_enabled=1;
|
||||||
if (harq_process->C>1) {
|
if (harq_process->C>1) {
|
||||||
for (int nb_seg =1 ; nb_seg<harq_process->C; nb_seg++){
|
for (int nb_seg =1 ; nb_seg<harq_process->C; nb_seg++){
|
||||||
if ( (res=tryPullTpool(&nf, Tpool)) != NULL ) {
|
if ( (res=tryPullTpool(&nf, Tpool_dl)) != NULL ) {
|
||||||
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -961,7 +961,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
curMsg->proc.llr8_flag = llr8_flag;
|
curMsg->proc.llr8_flag = llr8_flag;
|
||||||
|
|
||||||
msgToPush->key=nb_seg;
|
msgToPush->key=nb_seg;
|
||||||
pushTpool(Tpool, msgToPush);
|
pushTpool(Tpool_dl, msgToPush);
|
||||||
|
|
||||||
/*Qm= harq_process->Qm;
|
/*Qm= harq_process->Qm;
|
||||||
Nl=harq_process->Nl;
|
Nl=harq_process->Nl;
|
||||||
@@ -1112,7 +1112,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
start_meas(dlsch_turbo_decoding_stats);
|
start_meas(dlsch_turbo_decoding_stats);
|
||||||
#endif
|
#endif
|
||||||
LOG_D(PHY,"mthread AbsSubframe %d.%d Start LDPC segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
|
LOG_I(PHY,"mthread AbsSubframe %d.%d Start LDPC segment %d/%d \n",frame%1024,nr_tti_rx,r,harq_process->C-1);
|
||||||
|
|
||||||
/*for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
|
/*for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
|
||||||
inv_d[cnt] = (1)*harq_process->d[r][cnt];
|
inv_d[cnt] = (1)*harq_process->d[r][cnt];
|
||||||
@@ -1689,7 +1689,7 @@ void *nr_dlsch_decoding_process(void *arg)
|
|||||||
ret = 2;
|
ret = 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
printf("CRC NOK\n");
|
printf("Segment %d CRC NOK\n",r);
|
||||||
ret = 1+dlsch->max_ldpc_iterations;
|
ret = 1+dlsch->max_ldpc_iterations;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1757,7 +1757,7 @@ void *dlsch_thread(void *arg) {
|
|||||||
notifiedFIFO_elt_t *res;
|
notifiedFIFO_elt_t *res;
|
||||||
|
|
||||||
while (nbDlProcessing >= RX_NB_TH_DL) {
|
while (nbDlProcessing >= RX_NB_TH_DL) {
|
||||||
if ( (res=tryPullTpool(&nf, Tpool)) != NULL ) {
|
if ( (res=tryPullTpool(&nf, Tpool_dl)) != NULL ) {
|
||||||
nr_rxtx_thread_data_t *tmp=(nr_rxtx_thread_data_t *)res->msgData;
|
nr_rxtx_thread_data_t *tmp=(nr_rxtx_thread_data_t *)res->msgData;
|
||||||
nbDlProcessing--;
|
nbDlProcessing--;
|
||||||
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
pushNotifiedFIFO_nothreadSafe(&freeBlocks,res);
|
||||||
|
|||||||
@@ -76,9 +76,9 @@
|
|||||||
|
|
||||||
#include "defs_RU.h"
|
#include "defs_RU.h"
|
||||||
|
|
||||||
#define RX_NB_TH_MAX 2
|
#define RX_NB_TH_MAX 3
|
||||||
#define RX_NB_TH 2
|
#define RX_NB_TH 3
|
||||||
#define RX_NB_TH_DL 2
|
#define RX_NB_TH_DL 12
|
||||||
|
|
||||||
#define LTE_SLOTS_PER_SUBFRAME 2
|
#define LTE_SLOTS_PER_SUBFRAME 2
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user