Commit fc54cbf4 authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'NR_RRCConfiguration' of...

Merge branch 'NR_RRCConfiguration' of https://gitlab.eurecom.fr/oai/openairinterface5g into NR_RRCConfiguration
parents 9cf9ea7c 7b9be874
...@@ -581,13 +581,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -581,13 +581,13 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
// Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int // Fixme: correct type is unsigned, but nrLDPC_decoder and all called behind use signed int
if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) { if (check_crc((uint8_t*)llrProcBuf,length_dec,harq_process->F,crc_type)) {
LOG_D(PHY,"Segment %u CRC OK\n\033[0m",r); LOG_I(PHY,"Segment %u CRC OK\n\033[0m",r);
//Temporary hack //Temporary hack
no_iteration_ldpc = dlsch->max_ldpc_iterations; no_iteration_ldpc = dlsch->max_ldpc_iterations;
ret = no_iteration_ldpc; ret = no_iteration_ldpc;
} }
else { else {
LOG_D(PHY,"CRC NOK\n\033[0m"); LOG_I(PHY,"CRC NOK\n\033[0m");
ret = 1 + dlsch->max_ldpc_iterations; ret = 1 + dlsch->max_ldpc_iterations;
} }
...@@ -799,13 +799,12 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -799,13 +799,12 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
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_dl_config_dlsch_pdu_rel15_t *dl_config_pdu = &harq_processes[harq_pid]->dl_config_pdu uint8_t dmrs_type = harq_process->dmrsConfigType;
uint8_t dmrs_type = dl_config_pdu->dmrsConfigType;
//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==1)?6:4; uint8_t nb_re_dmrs = (dmrs_type==1)?6:4;
uint16_t length_dmrs = get_num_dmrs(dl_config_pdu->dlDmrsSymbPos); uint16_t length_dmrs = get_num_dmrs(harq_process->dlDmrsSymbPos);
uint32_t i,j; uint32_t i,j;
// int nbDlProcessing =0; // int nbDlProcessing =0;
...@@ -861,7 +860,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -861,7 +860,8 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
A = harq_process->TBS; A = harq_process->TBS;
ret = dlsch->max_ldpc_iterations; ret = dlsch->max_ldpc_iterations + 1;
dlsch->last_iteration_cnt = ret;
harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, harq_process->Qm,harq_process->Nl); harq_process->G = nr_get_G(nb_rb, nb_symb_sch, nb_re_dmrs, length_dmrs, harq_process->Qm,harq_process->Nl);
...@@ -929,9 +929,10 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -929,9 +929,10 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
&harq_process->F, &harq_process->F,
p_decParams->BG); p_decParams->BG);
p_decParams->Z = harq_process->Z;
} }
p_decParams->Z = harq_process->Z;
//printf("coderate %f kc %d \n", Coderate, kc); //printf("coderate %f kc %d \n", Coderate, kc);
p_decParams->numMaxIter = dlsch->max_ldpc_iterations; p_decParams->numMaxIter = dlsch->max_ldpc_iterations;
...@@ -1149,11 +1150,13 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -1149,11 +1150,13 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j])); pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j]));
} }
for (i=Kr_bytes,j=K_bytes_F-((2*p_decParams->Z)>>3); i < ((kc*p_decParams->Z)>>3); i++, j++) j+=(harq_process->F>>3);
// for (i=Kr_bytes,j=K_bytes_F-((2*p_decParams->Z)>>3); i < ((kc*p_decParams->Z)>>3); i++, j++)
for (i=Kr_bytes; i < ((kc*p_decParams->Z)>>3); i++,j++)
{ {
pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j])); pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j]));
} }
for (i=0, j=0; j < ((kc*p_decParams->Z)>>4); i+=2, j++) for (i=0, j=0; j < ((kc*p_decParams->Z)>>4); i+=2, j++)
{ {
pl[j] = _mm_packs_epi16(pv[i],pv[i+1]); pl[j] = _mm_packs_epi16(pv[i],pv[i+1]);
...@@ -1480,7 +1483,7 @@ void nr_dlsch_decoding_process(void *arg) ...@@ -1480,7 +1483,7 @@ void nr_dlsch_decoding_process(void *arg)
} }
harq_process->round =0; 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)
harq_process->B = A+24; harq_process->B = A+24;
...@@ -1498,7 +1501,7 @@ void nr_dlsch_decoding_process(void *arg) ...@@ -1498,7 +1501,7 @@ void nr_dlsch_decoding_process(void *arg)
p_decParams->Z = harq_process->Z; p_decParams->Z = harq_process->Z;
} // }
//printf("round %d Z %d K %d BG %d\n", harq_process->round, p_decParams->Z, harq_process->K, p_decParams->BG); //printf("round %d Z %d K %d BG %d\n", harq_process->round, p_decParams->Z, harq_process->K, p_decParams->BG);
...@@ -1683,9 +1686,11 @@ void nr_dlsch_decoding_process(void *arg) ...@@ -1683,9 +1686,11 @@ void nr_dlsch_decoding_process(void *arg)
pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j])); pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j]));
} }
for (i=Kr_bytes,j=K_bytes_F-((2*p_decParams->Z)>>3); i < ((kc*p_decParams->Z)>>3); i++, j++) j+=(harq_process->F>>3);
// for (i=Kr_bytes,j=K_bytes_F-((2*p_decParams->Z)>>3); i < ((kc*p_decParams->Z)>>3); i++, j++)
for (i=Kr_bytes; i < ((kc*p_decParams->Z)>>3); i++,j++)
{ {
pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j])); pv[i]= _mm_loadu_si128((__m128i*)(&harq_process->d[r][8*j]));
} }
for (i=0, j=0; j < ((kc*p_decParams->Z)>>4); i+=2, j++) for (i=0, j=0; j < ((kc*p_decParams->Z)>>4); i+=2, j++)
......
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