Commit f4772f2b authored by Hongzhi Wang's avatar Hongzhi Wang

bug fix dlsch thread

parent 82aebfa6
...@@ -673,11 +673,11 @@ int main( int argc, char **argv ) { ...@@ -673,11 +673,11 @@ 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,-1"; char params[]="-1,-1";
initTpool(params, Tpool, false); initTpool(params, Tpool, false);
tpool_t pool_dl; tpool_t pool_dl;
Tpool_dl = &pool_dl; Tpool_dl = &pool_dl;
char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1"; char params_dl[]="-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
initTpool(params_dl, Tpool_dl, false); 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);
......
...@@ -775,16 +775,16 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -775,16 +775,16 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
int16_t z [68*384]; int16_t z [68*384];
int8_t l [68*384]; int8_t l [68*384];
//__m128i l; //__m128i l;
int16_t inv_d [68*384]; //int16_t inv_d [68*384];
//int16_t *p_invd =&inv_d; //int16_t *p_invd =&inv_d;
uint8_t kb, kc; uint8_t kb, kc;
uint8_t Ilbrm = 1; uint8_t Ilbrm = 1;
uint32_t Tbslbrm = 950984; uint32_t Tbslbrm = 950984;
uint16_t nb_rb = 30; uint16_t nb_rb = 30;
double Coderate = 0.0; double Coderate = 0.0;
nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config; //nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value; //uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
uint8_t nb_re_dmrs = (dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4; uint8_t nb_re_dmrs = 6; //(dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value; uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value;
uint32_t i,j; uint32_t i,j;
...@@ -1034,7 +1034,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -1034,7 +1034,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
if (harq_process->Nl < Nl) if (harq_process->Nl < Nl)
Nl = harq_process->Nl; Nl = harq_process->Nl;
Tbslbrm = nr_compute_tbslbrm(rel15.mcs_table,nb_rb,Nl,dlsch->harq_processes[harq_pid]->C); Tbslbrm = nr_compute_tbslbrm(harq_process->mcs_table,nb_rb,harq_process->Nl,harq_process->C);
if (nr_rate_matching_ldpc_rx(Ilbrm, if (nr_rate_matching_ldpc_rx(Ilbrm,
Tbslbrm, Tbslbrm,
...@@ -1323,7 +1323,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -1323,7 +1323,7 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
#endif #endif
#ifdef UE_DLSCH_PARALLELISATION #ifdef UE_DLSCH_PARALLELISATION
void *nr_dlsch_decoding_process(void *arg) void nr_dlsch_decoding_process(void *arg)
{ {
nr_rxtx_thread_data_t *rxtxD= (nr_rxtx_thread_data_t *)arg; nr_rxtx_thread_data_t *rxtxD= (nr_rxtx_thread_data_t *)arg;
UE_nr_rxtx_proc_t *proc = &rxtxD->proc; UE_nr_rxtx_proc_t *proc = &rxtxD->proc;
...@@ -1340,8 +1340,8 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1340,8 +1340,8 @@ void *nr_dlsch_decoding_process(void *arg)
int16_t z [68*384]; int16_t z [68*384];
int8_t l [68*384]; int8_t l [68*384];
//__m128i l; //__m128i l;
int16_t inv_d [68*384]; //int16_t inv_d [68*384];
int16_t *p_invd =&inv_d; //int16_t *p_invd =&inv_d;
uint8_t kb, kc; uint8_t kb, kc;
uint8_t Ilbrm = 1; uint8_t Ilbrm = 1;
uint32_t Tbslbrm = 950984; uint32_t Tbslbrm = 950984;
...@@ -1463,6 +1463,7 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1463,6 +1463,7 @@ void *nr_dlsch_decoding_process(void *arg)
} }
} }
harq_process->round =0;
if (harq_process->round == 0) { if (harq_process->round == 0) {
// This is a new packet, so compute quantities regarding segmentation // This is a new packet, so compute quantities regarding segmentation
if (A > 3824) if (A > 3824)
...@@ -1483,6 +1484,7 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1483,6 +1484,7 @@ void *nr_dlsch_decoding_process(void *arg)
} }
//printf("round %d Z %d K %d BG %d\n", harq_process->round, p_decParams->Z, harq_process->K, p_decParams->BG);
p_decParams->numMaxIter = dlsch->max_ldpc_iterations; p_decParams->numMaxIter = dlsch->max_ldpc_iterations;
...@@ -1654,9 +1656,9 @@ void *nr_dlsch_decoding_process(void *arg) ...@@ -1654,9 +1656,9 @@ void *nr_dlsch_decoding_process(void *arg)
#endif #endif
// LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,r,harq_process->C-1); // LOG_D(PHY,"AbsSubframe %d.%d Start turbo segment %d/%d \n",frame%1024,subframe,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];
} }*/
memset(pv,0,2*p_decParams->Z*sizeof(int16_t)); memset(pv,0,2*p_decParams->Z*sizeof(int16_t));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t)); //memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
...@@ -1746,11 +1748,9 @@ void *dlsch_thread(void *arg) { ...@@ -1746,11 +1748,9 @@ void *dlsch_thread(void *arg) {
int nbDlProcessing=0; int nbDlProcessing=0;
initNotifiedFIFO_nothreadSafe(&freeBlocks); initNotifiedFIFO_nothreadSafe(&freeBlocks);
for (int i=0; i<RX_NB_TH_DL+1; i++) for (int i=0; i<RX_NB_TH_DL+1; i++){
pushNotifiedFIFO_nothreadSafe(&freeBlocks, pushNotifiedFIFO_nothreadSafe(&freeBlocks,
newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&nf,nr_dlsch_decoding_process)); newNotifiedFIFO_elt(sizeof(nr_rxtx_thread_data_t), 0,&nf,nr_dlsch_decoding_process));}
printf("dlsch_thread\n");
displayList(&freeBlocks);
while (!oai_exit) { while (!oai_exit) {
...@@ -1772,6 +1772,7 @@ void *dlsch_thread(void *arg) { ...@@ -1772,6 +1772,7 @@ void *dlsch_thread(void *arg) {
} // while !oai_exit } // while !oai_exit
return NULL;
} }
#endif #endif
...@@ -76,9 +76,9 @@ ...@@ -76,9 +76,9 @@
#include "defs_RU.h" #include "defs_RU.h"
#define RX_NB_TH_MAX 3 #define RX_NB_TH_MAX 2
#define RX_NB_TH 3 #define RX_NB_TH 2
#define RX_NB_TH_DL 12 #define RX_NB_TH_DL 14
#define LTE_SLOTS_PER_SUBFRAME 2 #define LTE_SLOTS_PER_SUBFRAME 2
......
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