Commit 29e058df authored by Hongzhi Wang's avatar Hongzhi Wang

ue pdsch config from fapi removing hardcoded values

parent 2da6fb8e
...@@ -235,10 +235,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ...@@ -235,10 +235,12 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
uint8_t kc; uint8_t kc;
uint8_t Ilbrm = 0; uint8_t Ilbrm = 0;
uint32_t Tbslbrm = 950984; uint32_t Tbslbrm = 950984;
uint16_t nb_rb = 30; //to update uint16_t nb_rb = 30;
uint8_t nb_re_dmrs = 6;
uint16_t length_dmrs = 1;
double Coderate = 0.0; double Coderate = 0.0;
nfapi_nr_config_request_t *cfg = &phy_vars_ue->nrUE_config;
uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
uint8_t nb_re_dmrs = (dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value;
uint32_t i,j; uint32_t i,j;
......
...@@ -114,7 +114,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -114,7 +114,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
unsigned char aatx,aarx; unsigned char aatx,aarx;
unsigned short nb_rb = 0, nb_re =0, round; unsigned short nb_rb = 0, round;
int avgs = 0;// rb; int avgs = 0;// rb;
NR_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0; NR_DL_UE_HARQ_t *dlsch0_harq,*dlsch1_harq = 0;
...@@ -137,9 +137,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -137,9 +137,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
//int16_t *pllr_symbol_cw1_deint; //int16_t *pllr_symbol_cw1_deint;
uint32_t llr_offset_symbol; uint32_t llr_offset_symbol;
//uint16_t bundle_L = 2; //uint16_t bundle_L = 2;
uint8_t l0 =2; uint8_t l0 =2, pilots=0;
uint16_t n_tx=1, n_rx=1; uint16_t n_tx=1, n_rx=1;
int32_t median[16]; int32_t median[16];
uint32_t len;
switch (type) { switch (type) {
case SI_PDSCH: case SI_PDSCH:
...@@ -159,16 +160,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -159,16 +160,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
case PDSCH: case PDSCH:
pdsch_vars = ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]]; pdsch_vars = ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]];
dlsch = ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id]; dlsch = ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id];
//set active for testing -> to be removed dlsch[0]->harq_processes[harq_pid]->Qm = nr_get_Qm(dlsch[0]->harq_processes[harq_pid]->mcs, 1);;
dlsch[0]->harq_processes[harq_pid]->status = ACTIVE;
dlsch[0]->harq_processes[harq_pid]->Qm = 2;
dlsch[0]->harq_processes[harq_pid]->mcs = 9;
dlsch[0]->harq_processes[harq_pid]->Nl=1;
dlsch[0]->harq_processes[harq_pid]->round=0;
dlsch[0]->harq_processes[harq_pid]->nb_rb = nb_rb_pdsch;
frame_parms->nushift = 0;
//printf("status TB0 = %d, status TB1 = %d \n", dlsch[0]->harq_processes[harq_pid]->status, dlsch[1]->harq_processes[harq_pid]->status); //printf("status TB0 = %d, status TB1 = %d \n", dlsch[0]->harq_processes[harq_pid]->status, dlsch[1]->harq_processes[harq_pid]->status);
LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n", LOG_D(PHY,"AbsSubframe %d.%d / Sym %d harq_pid %d, harq status %d.%d \n",
...@@ -223,6 +217,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -223,6 +217,10 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
printf("[DEMOD] cw for TB0 = %d, cw for TB1 = %d\n", codeword_TB0, codeword_TB1); printf("[DEMOD] cw for TB0 = %d, cw for TB1 = %d\n", codeword_TB0, codeword_TB1);
#endif #endif
start_rb = dlsch0_harq->start_rb;
nb_rb_pdsch = dlsch0_harq->nb_rb;
l0 = dlsch0_harq->start_symbol;
DevAssert(dlsch0_harq); DevAssert(dlsch0_harq);
round = dlsch0_harq->round; round = dlsch0_harq->round;
//printf("round = %d\n", round); //printf("round = %d\n", round);
...@@ -284,9 +282,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -284,9 +282,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc); printf("Demod dlsch0_harq->pmi_alloc %d\n", dlsch0_harq->pmi_alloc);
#endif #endif
pilots = (symbol==l0) ? 1 : 0;
if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) { if (frame_parms->nb_antenna_ports_eNB>1 && beamforming_mode==0) {
#ifdef DEBUG_DLSCH_MOD #ifdef DEBUG_DLSCH_MOD
LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch[0],dlsch0_harq->rb_alloc_even[0]); LOG_I(PHY,"dlsch: using pmi %x (%p)\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch[0]);
#endif #endif
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
...@@ -298,8 +298,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -298,8 +298,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[eNB_id]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id]->pmi_ext, pdsch_vars[eNB_id]->pmi_ext,
rballoc,
symbol, symbol,
pilots,
start_rb, start_rb,
nb_rb_pdsch, nb_rb_pdsch,
nr_tti_rx, nr_tti_rx,
...@@ -307,7 +307,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -307,7 +307,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
frame_parms, frame_parms,
dlsch0_harq->mimo_mode); dlsch0_harq->mimo_mode);
#ifdef DEBUG_DLSCH_MOD #ifdef DEBUG_DLSCH_MOD
printf("dlsch: using pmi %lx, rb_alloc %x, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),*rballoc); printf("dlsch: using pmi %lx, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc));
for (rb=0;rb<nb_rb;rb++) for (rb=0;rb<nb_rb;rb++)
printf("%d",pdsch_vars[eNB_id]->pmi_ext[rb]); printf("%d",pdsch_vars[eNB_id]->pmi_ext[rb]);
printf("\n"); printf("\n");
...@@ -321,8 +321,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -321,8 +321,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id_i]->pmi_ext, pdsch_vars[eNB_id_i]->pmi_ext,
rballoc,
symbol, symbol,
pilots,
start_rb, start_rb,
nb_rb_pdsch, nb_rb_pdsch,
nr_tti_rx, nr_tti_rx,
...@@ -336,8 +336,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -336,8 +336,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id_i]->pmi_ext, pdsch_vars[eNB_id_i]->pmi_ext,
rballoc,
symbol, symbol,
pilots,
start_rb, start_rb,
nb_rb_pdsch, nb_rb_pdsch,
nr_tti_rx, nr_tti_rx,
...@@ -353,8 +353,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -353,8 +353,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[eNB_id]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id]->pmi_ext, pdsch_vars[eNB_id]->pmi_ext,
rballoc,
symbol, symbol,
pilots,
start_rb, start_rb,
nb_rb_pdsch, nb_rb_pdsch,
nr_tti_rx, nr_tti_rx,
...@@ -410,6 +410,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -410,6 +410,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
return(-1); return(-1);
} }
len = (symbol==l0)? (nb_rb*6):(nb_rb*12);
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]); stop_meas(&ue->generic_stat_bis[ue->current_thread_id[nr_tti_rx]][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
...@@ -426,12 +428,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -426,12 +428,12 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif #endif
n_tx = frame_parms->nb_antenna_ports_eNB; n_tx = frame_parms->nb_antenna_ports_eNB;
n_rx = frame_parms->nb_antennas_rx; n_rx = frame_parms->nb_antennas_rx;
nb_re= (symbol==l0)? (nb_rb*6):(nb_rb*12);
nr_dlsch_scale_channel(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_scale_channel(pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
dlsch, dlsch,
symbol, symbol,
pilots,
nb_rb); nb_rb);
if ((dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) && if ((dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) &&
...@@ -444,6 +446,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -444,6 +446,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
frame_parms, frame_parms,
dlsch, dlsch,
symbol, symbol,
pilots,
nb_rb); nb_rb);
} }
...@@ -466,6 +469,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -466,6 +469,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
frame_parms, frame_parms,
avg, avg,
symbol, symbol,
len,
nb_rb); nb_rb);
avgs = 0; avgs = 0;
for (aatx=0;aatx<frame_parms->nb_antenna_ports_eNB;aatx++) for (aatx=0;aatx<frame_parms->nb_antenna_ports_eNB;aatx++)
...@@ -482,7 +486,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -482,7 +486,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
median, median,
n_tx, n_tx,
n_rx, n_rx,
2*nb_re,// subcarriers Re Im 2*len,// subcarriers Re Im
0); 0);
for (aatx = 0; aatx < n_tx; ++aatx) for (aatx = 0; aatx < n_tx; ++aatx)
...@@ -588,6 +592,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -588,6 +592,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
(aatx>1) ? pdsch_vars[eNB_id]->rho : NULL, (aatx>1) ? pdsch_vars[eNB_id]->rho : NULL,
frame_parms, frame_parms,
symbol, symbol,
pilots,
first_symbol_flag, first_symbol_flag,
dlsch0_harq->Qm, dlsch0_harq->Qm,
nb_rb, nb_rb,
...@@ -641,7 +646,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -641,7 +646,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
n_rx, n_rx,
dlsch0_harq->Qm, dlsch0_harq->Qm,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[eNB_id]->log2_maxh,
2*nb_re, // subcarriers Re Im 2*len, // subcarriers Re Im
0); // we start from the beginning of the vector 0); // we start from the beginning of the vector
/* if (symbol == 5) { /* if (symbol == 5) {
write_output("rxF_comp_d00.m","rxF_c_d00",&pdsch_vars[eNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM write_output("rxF_comp_d00.m","rxF_c_d00",&pdsch_vars[eNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM
...@@ -656,7 +661,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -656,7 +661,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
n_tx, n_tx,
n_rx, n_rx,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[eNB_id]->log2_maxh,
2*nb_re, 2*len,
0); 0);
//printf("rho stream1 =%d\n", &pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] ); //printf("rho stream1 =%d\n", &pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] );
nr_dlsch_dual_stream_correlation_core(&(pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]), nr_dlsch_dual_stream_correlation_core(&(pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]),
...@@ -665,7 +670,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -665,7 +670,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
n_tx, n_tx,
n_rx, n_rx,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[eNB_id]->log2_maxh,
2*nb_re, 2*len,
0); 0);
// printf("rho stream2 =%d\n",&pdsch_vars[eNB_id]->dl_ch_rho2_ext ); // printf("rho stream2 =%d\n",&pdsch_vars[eNB_id]->dl_ch_rho2_ext );
//printf("TM3 log2_maxh : %d\n",pdsch_vars[eNB_id]->log2_maxh); //printf("TM3 log2_maxh : %d\n",pdsch_vars[eNB_id]->log2_maxh);
...@@ -705,7 +710,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -705,7 +710,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
NULL, NULL,
n_tx, n_tx,
n_rx, n_rx,
2*nb_re, 2*len,
0); 0);
/* if (symbol == 5) { /* if (symbol == 5) {
write_output("rho0_mrc.m","rho0_0",&pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM write_output("rho0_mrc.m","rho0_0",&pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM
...@@ -778,7 +783,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -778,7 +783,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pllr_symbol_cw0 += llr_offset_symbol; pllr_symbol_cw0 += llr_offset_symbol;
pllr_symbol_cw1 += llr_offset_symbol; pllr_symbol_cw1 += llr_offset_symbol;
pdsch_vars[eNB_id]->llr_offset[symbol] = nb_re*dlsch0_harq->Qm + llr_offset_symbol; pdsch_vars[eNB_id]->llr_offset[symbol] = len*dlsch0_harq->Qm + llr_offset_symbol;
/*LOG_I(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n", /*LOG_I(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
symbol, symbol,
...@@ -803,6 +808,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -803,6 +808,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
symbol, symbol,
len,
first_symbol_flag, first_symbol_flag,
nb_rb, nb_rb,
beamforming_mode); beamforming_mode);
...@@ -813,6 +819,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -813,6 +819,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pllr_symbol_cw1, pllr_symbol_cw1,
symbol, symbol,
len,
first_symbol_flag, first_symbol_flag,
nb_rb, nb_rb,
beamforming_mode); beamforming_mode);
...@@ -824,7 +831,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -824,7 +831,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[eNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[eNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[eNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
...@@ -833,7 +840,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -833,7 +840,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[eNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[eNB_id]->llr128_2ndstream);
} }
...@@ -890,7 +897,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -890,7 +897,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], pdsch_vars[eNB_id]->llr[0],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128, pdsch_vars[eNB_id]->llr128,
beamforming_mode); beamforming_mode);
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
...@@ -898,7 +905,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -898,7 +905,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[1], pdsch_vars[eNB_id]->llr[1],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128_2ndstream, pdsch_vars[eNB_id]->llr128_2ndstream,
beamforming_mode); beamforming_mode);
} }
...@@ -933,7 +940,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -933,7 +940,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[eNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[eNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[eNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
...@@ -944,7 +951,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -944,7 +951,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[eNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[eNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[eNB_id]->llr128_2ndstream);
} }
...@@ -982,7 +989,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -982,7 +989,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
(int16_t*)pllr_symbol_cw0, (int16_t*)pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[eNB_id]->dl_ch_magb0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[eNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
...@@ -991,7 +998,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -991,7 +998,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pllr_symbol_cw1, pllr_symbol_cw1,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[eNB_id]->dl_ch_magb0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[eNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
...@@ -1050,7 +1057,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1050,7 +1057,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[eNB_id]->dl_ch_rho2_ext,
(int16_t*)pllr_symbol_layer0, (int16_t*)pllr_symbol_layer0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr_offset[symbol]); pdsch_vars[eNB_id]->llr_offset[symbol]);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
...@@ -1061,7 +1068,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1061,7 +1068,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[eNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
pllr_symbol_layer1, pllr_symbol_layer1,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_tti_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_tti_rx,symbol),
pdsch_vars[eNB_id]->llr_offset[symbol]); pdsch_vars[eNB_id]->llr_offset[symbol]);
} }
...@@ -1080,7 +1087,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1080,7 +1087,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
nr_dlsch_qpsk_llr(frame_parms, nr_dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
beamforming_mode); beamforming_mode);
} }
break; break;
...@@ -1090,7 +1097,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1090,7 +1097,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], pdsch_vars[eNB_id]->llr[0],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128, pdsch_vars[eNB_id]->llr128,
beamforming_mode); beamforming_mode);
} }
...@@ -1102,7 +1109,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1102,7 +1109,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
pllr_symbol_cw0, pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[eNB_id]->dl_ch_magb0,
symbol,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[eNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
...@@ -1182,6 +1189,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -1182,6 +1189,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
} }
void nr_dlsch_deinterleaving(uint8_t symbol, void nr_dlsch_deinterleaving(uint8_t symbol,
uint8_t start_symbol,
uint16_t L, uint16_t L,
uint16_t *llr, uint16_t *llr,
uint16_t *llr_deint, uint16_t *llr_deint,
...@@ -1200,7 +1208,7 @@ void nr_dlsch_deinterleaving(uint8_t symbol, ...@@ -1200,7 +1208,7 @@ void nr_dlsch_deinterleaving(uint8_t symbol,
printf("N_bundle %d L %d nb_rb_pdsch %d\n",N_bundle, L,nb_rb_pdsch); printf("N_bundle %d L %d nb_rb_pdsch %d\n",N_bundle, L,nb_rb_pdsch);
if (symbol==2) if (symbol==start_symbol)
nb_re = 6; nb_re = 6;
else else
nb_re = 12; nb_re = 12;
...@@ -1238,6 +1246,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1238,6 +1246,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
int **rho, int **rho,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
unsigned char symbol, unsigned char symbol,
uint8_t pilots,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
unsigned char mod_order, unsigned char mod_order,
unsigned short nb_rb, unsigned short nb_rb,
...@@ -1248,16 +1257,11 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1248,16 +1257,11 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
#if defined(__i386) || defined(__x86_64) #if defined(__i386) || defined(__x86_64)
unsigned short rb; unsigned short rb;
unsigned char aatx,aarx,pilots=0; unsigned char aatx,aarx;
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b;
QAM_amp128b = _mm_setzero_si128(); QAM_amp128b = _mm_setzero_si128();
if (symbol == 2){
pilots=1;
}
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) { for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) {
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
...@@ -1902,19 +1906,19 @@ void nr_dlsch_scale_channel(int **dl_ch_estimates_ext, ...@@ -1902,19 +1906,19 @@ void nr_dlsch_scale_channel(int **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
NR_UE_DLSCH_t **dlsch_ue, NR_UE_DLSCH_t **dlsch_ue,
uint8_t symbol, uint8_t symbol,
uint8_t pilots,
unsigned short nb_rb) unsigned short nb_rb)
{ {
#if defined(__x86_64__)||defined(__i386__) #if defined(__x86_64__)||defined(__i386__)
short rb, ch_amp; short rb, ch_amp;
unsigned char aatx,aarx,pilots=0; unsigned char aatx,aarx;
__m128i *dl_ch128, ch_amp128; __m128i *dl_ch128, ch_amp128;
if (symbol==2){ if (pilots==1){
nb_rb = nb_rb>>1; nb_rb = nb_rb>>1;
pilots=1;
} }
// Determine scaling amplitude based the symbol // Determine scaling amplitude based the symbol
...@@ -1962,6 +1966,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext, ...@@ -1962,6 +1966,7 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
int32_t *avg, int32_t *avg,
uint8_t symbol, uint8_t symbol,
uint32_t len,
unsigned short nb_rb) unsigned short nb_rb)
{ {
...@@ -1971,14 +1976,9 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext, ...@@ -1971,14 +1976,9 @@ void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
unsigned char aatx,aarx,nre=12; unsigned char aatx,aarx,nre=12;
__m128i *dl_ch128, avg128D; __m128i *dl_ch128, avg128D;
if (symbol==2) //assume start symbol 2
nre=6;
else
nre=12;
//nb_rb*nre = y * 2^x //nb_rb*nre = y * 2^x
int16_t x = factor2(nb_rb*nre); int16_t x = factor2(len);
int16_t y = (nb_rb*nre)>>x; int16_t y = (len)>>x;
//printf("nb_rb*nre = %d = %d * 2^(%d)\n",nb_rb*nre,y,x); //printf("nb_rb*nre = %d = %d * 2^(%d)\n",nb_rb*nre,y,x);
for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++) for (aatx=0; aatx<frame_parms->nb_antenna_ports_eNB; aatx++)
...@@ -2477,8 +2477,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, ...@@ -2477,8 +2477,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
unsigned short pmi, unsigned short pmi,
unsigned char *pmi_ext, unsigned char *pmi_ext,
unsigned int *rb_alloc, //unused in NR
unsigned char symbol, unsigned char symbol,
uint8_t pilots,
unsigned short start_rb, unsigned short start_rb,
unsigned short nb_rb_pdsch, unsigned short nb_rb_pdsch,
unsigned char nr_tti_rx, unsigned char nr_tti_rx,
...@@ -2493,9 +2493,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, ...@@ -2493,9 +2493,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
unsigned char pilots=0,j=0; unsigned char j=0;
pilots = (symbol==2) ? 1 : 0; //to updated from config!!!
k = frame_parms->first_carrier_offset + 12*start_rb; k = frame_parms->first_carrier_offset + 12*start_rb;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
...@@ -2578,8 +2577,8 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF, ...@@ -2578,8 +2577,8 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
unsigned short pmi, unsigned short pmi,
unsigned char *pmi_ext, unsigned char *pmi_ext,
unsigned int *rb_alloc,
unsigned char symbol, unsigned char symbol,
uint8_t pilots,
unsigned short start_rb, unsigned short start_rb,
unsigned short nb_rb_pdsch, unsigned short nb_rb_pdsch,
unsigned char nr_tti_rx, unsigned char nr_tti_rx,
...@@ -2590,18 +2589,14 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF, ...@@ -2590,18 +2589,14 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF,
int prb,nb_rb=0; int prb,nb_rb=0;
unsigned short k; unsigned short k;
//int prb_off,prb_off2; //int prb_off,prb_off2;
int skip_half=0,l;//sss_symb,pss_symb=0,nsymb int skip_half=0;//sss_symb,pss_symb=0,nsymb
int i,aarx; int i,aarx;
int32_t *dl_ch0,*dl_ch0p,*dl_ch0_ext,*dl_ch1,*dl_ch1p,*dl_ch1_ext,*rxF,*rxF_ext; int32_t *dl_ch0,*dl_ch0p,*dl_ch0_ext,*dl_ch1,*dl_ch1p,*dl_ch1_ext,*rxF,*rxF_ext;
int symbol_mod,pilots=0,j=0; int j=0;
unsigned char *pmi_loc; unsigned char *pmi_loc;
pilots = (symbol==2) ? 1 : 0; //to updated from config
k = frame_parms->first_carrier_offset + 516; //0 k = frame_parms->first_carrier_offset + 516; //0
//nsymb = (frame_parms->Ncp==NORMAL) ? 14:12;
l=symbol;
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) { for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
if (high_speed_flag==1) { if (high_speed_flag==1) {
......
...@@ -632,6 +632,7 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -632,6 +632,7 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *dlsch_llr, int16_t *dlsch_llr,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t beamforming_mode) uint8_t beamforming_mode)
...@@ -639,7 +640,7 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -639,7 +640,7 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][((int32_t)symbol*nb_rb*12)]; uint32_t *rxF = (uint32_t*)&rxdataF_comp[0][((int32_t)symbol*nb_rb*12)];
uint32_t *llr32; uint32_t *llr32;
int i,len; int i;
llr32 = (uint32_t*)dlsch_llr; llr32 = (uint32_t*)dlsch_llr;
if (!llr32) { if (!llr32) {
...@@ -647,10 +648,6 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -647,10 +648,6 @@ int nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
return(-1); return(-1);
} }
if (symbol ==2) //to update from config
len = nb_rb*6;
else
len = nb_rb*12;
/* /*
LOG_I(PHY,"dlsch_qpsk_llr: [symb %d / Length %d]: @LLR Buff %x, @LLR Buff(symb) %x \n", LOG_I(PHY,"dlsch_qpsk_llr: [symb %d / Length %d]: @LLR Buff %x, @LLR Buff(symb) %x \n",
symbol, symbol,
...@@ -677,6 +674,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -677,6 +674,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int16_t *dlsch_llr, int16_t *dlsch_llr,
int32_t **dl_ch_mag, int32_t **dl_ch_mag,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
int16_t **llr32p, int16_t **llr32p,
...@@ -696,7 +694,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -696,7 +694,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
#endif #endif
int i,len; int i;
unsigned char len_mod4=0; unsigned char len_mod4=0;
...@@ -720,11 +718,6 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -720,11 +718,6 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)]; ch_mag = (int16x8_t*)&dl_ch_mag[0][(symbol*nb_rb*12)];
#endif #endif
if (symbol ==2) //to update from config
len = nb_rb*6;
else
len = nb_rb*12;
// update output pointer according to number of REs in this symbol (<<2 because 4 bits per RE) // update output pointer according to number of REs in this symbol (<<2 because 4 bits per RE)
if (first_symbol_flag == 1) if (first_symbol_flag == 1)
*llr32p = dlsch_llr + (len<<2); *llr32p = dlsch_llr + (len<<2);
...@@ -798,6 +791,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -798,6 +791,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **dl_ch_mag, int32_t **dl_ch_mag,
int32_t **dl_ch_magb, int32_t **dl_ch_magb,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint32_t llr_offset, uint32_t llr_offset,
...@@ -810,7 +804,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -810,7 +804,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*nb_rb*12)]; int16x8_t *rxF = (int16x8_t*)&rxdataF_comp[0][(symbol*nb_rb*12)];
int16x8_t *ch_mag,*ch_magb,xmm1,xmm2; int16x8_t *ch_mag,*ch_magb,xmm1,xmm2;
#endif #endif
int i,len,len2; int i,len2;
unsigned char len_mod4; unsigned char len_mod4;
short *llr; short *llr;
int16_t *llr2; int16_t *llr2;
...@@ -835,11 +829,6 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -835,11 +829,6 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)]; ch_magb = (int16x8_t*)&dl_ch_magb[0][(symbol*frame_parms->N_RB_DL*12)];
#endif #endif
if (symbol ==2) //to update from config
len = nb_rb*6;
else
len = nb_rb*12;
// printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); // printf("nr_dlsch_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
/* LOG_I(PHY,"nr_dlsch_64qam_llr [symb %d / FirstSym %d / Length %d]: @LLR Buff %x \n", /* LOG_I(PHY,"nr_dlsch_64qam_llr [symb %d / FirstSym %d / Length %d]: @LLR Buff %x \n",
...@@ -1131,6 +1120,7 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -1131,6 +1120,7 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int **rho_i, int **rho_i,
short *dlsch_llr, short *dlsch_llr,
unsigned char symbol, unsigned char symbol,
uint32_t len,
unsigned char first_symbol_flag, unsigned char first_symbol_flag,
unsigned short nb_rb, unsigned short nb_rb,
uint16_t pbch_pss_sss_adjust, uint16_t pbch_pss_sss_adjust,
...@@ -1141,8 +1131,6 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -1141,8 +1131,6 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int16_t *rxF_i=(int16_t*)&rxdataF_comp_i[0][(symbol*nb_rb*12)]; int16_t *rxF_i=(int16_t*)&rxdataF_comp_i[0][(symbol*nb_rb*12)];
int16_t *rho=(int16_t*)&rho_i[0][(symbol*nb_rb*12)]; int16_t *rho=(int16_t*)&rho_i[0][(symbol*nb_rb*12)];
int16_t *llr16; int16_t *llr16;
int len;
//uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
if (first_symbol_flag == 1) { if (first_symbol_flag == 1) {
llr16 = (int16_t*)dlsch_llr; llr16 = (int16_t*)dlsch_llr;
...@@ -1152,11 +1140,6 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -1152,11 +1140,6 @@ int nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
AssertFatal(llr16!=NULL,"nr_dlsch_qpsk_qpsk_llr: llr is null, symbol %d\n",symbol); AssertFatal(llr16!=NULL,"nr_dlsch_qpsk_qpsk_llr: llr is null, symbol %d\n",symbol);
if (symbol ==2) //to update from config
len = nb_rb*6;
else
len = nb_rb*12;
// printf("nr_dlsch_qpsk_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); // printf("nr_dlsch_qpsk_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
// printf("qpsk_qpsk: len %d, llr16 %p\n",len,llr16); // printf("qpsk_qpsk: len %d, llr16 %p\n",len,llr16);
qpsk_qpsk((short *)rxF, qpsk_qpsk((short *)rxF,
...@@ -2972,6 +2955,7 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -2972,6 +2955,7 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **rho_i, int32_t **rho_i,
int16_t *dlsch_llr, int16_t *dlsch_llr,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint16_t pbch_pss_sss_adjust, uint16_t pbch_pss_sss_adjust,
...@@ -2984,8 +2968,6 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -2984,8 +2968,6 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int16_t *ch_mag_i = (int16_t*)&dl_ch_mag_i[0][(symbol*nb_rb*12)]; int16_t *ch_mag_i = (int16_t*)&dl_ch_mag_i[0][(symbol*nb_rb*12)];
int16_t *rho = (int16_t*)&rho_i[0][(symbol*nb_rb*12)]; int16_t *rho = (int16_t*)&rho_i[0][(symbol*nb_rb*12)];
int16_t *llr16; int16_t *llr16;
int len;
//uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
// first symbol has different structure due to more pilots // first symbol has different structure due to more pilots
if (first_symbol_flag == 1) { if (first_symbol_flag == 1) {
...@@ -2997,11 +2979,6 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -2997,11 +2979,6 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
AssertFatal(llr16!=NULL,"nr_dlsch_16qam_16qam_llr: llr is null, symbol %d\n",symbol); AssertFatal(llr16!=NULL,"nr_dlsch_16qam_16qam_llr: llr is null, symbol %d\n",symbol);
if (symbol ==2) //to update from config
len = nb_rb*6;
else
len = nb_rb*12;
// printf("symbol %d: qam16_llr, len %d (llr16 %p)\n",symbol,len,llr16); // printf("symbol %d: qam16_llr, len %d (llr16 %p)\n",symbol,len,llr16);
qam16_qam16((short *)rxF, qam16_qam16((short *)rxF,
...@@ -8514,6 +8491,7 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -8514,6 +8491,7 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **rho_i, int32_t **rho_i,
int16_t *dlsch_llr, int16_t *dlsch_llr,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint16_t pbch_pss_sss_adjust, uint16_t pbch_pss_sss_adjust,
...@@ -8521,15 +8499,13 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -8521,15 +8499,13 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
uint32_t llr_offset) uint32_t llr_offset)
{ {
int16_t *rxF = (int16_t*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)]; int16_t *rxF = (int16_t*)&rxdataF_comp[0][(symbol*nb_rb*12)];
int16_t *rxF_i = (int16_t*)&rxdataF_comp_i[0][(symbol*frame_parms->N_RB_DL*12)]; int16_t *rxF_i = (int16_t*)&rxdataF_comp_i[0][(symbol*nb_rb*12)];
int16_t *ch_mag = (int16_t*)&dl_ch_mag[0][(symbol*frame_parms->N_RB_DL*12)]; int16_t *ch_mag = (int16_t*)&dl_ch_mag[0][(symbol*nb_rb*12)];
int16_t *ch_mag_i = (int16_t*)&dl_ch_mag_i[0][(symbol*frame_parms->N_RB_DL*12)]; int16_t *ch_mag_i = (int16_t*)&dl_ch_mag_i[0][(symbol*nb_rb*12)];
int16_t *rho = (int16_t*)&rho_i[0][(symbol*frame_parms->N_RB_DL*12)]; int16_t *rho = (int16_t*)&rho_i[0][(symbol*nb_rb*12)];
int16_t *llr16; int16_t *llr16;
int8_t *pllr_symbol; // pointer where llrs should filled for this ofdm symbol int8_t *pllr_symbol; // pointer where llrs should filled for this ofdm symbol
int len;
uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
//first symbol has different structure due to more pilots //first symbol has different structure due to more pilots
/*if (first_symbol_flag == 1) { /*if (first_symbol_flag == 1) {
...@@ -8543,19 +8519,6 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -8543,19 +8519,6 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
AssertFatal(llr16!=NULL,"nr_dlsch_16qam_64qam_llr:llr is null, symbol %d\n",symbol); AssertFatal(llr16!=NULL,"nr_dlsch_16qam_64qam_llr:llr is null, symbol %d\n",symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
// if symbol has pilots
if (frame_parms->nb_antenna_ports_eNB!=1)
// in 2 antenna ports we have 8 REs per symbol per RB
len = (nb_rb*8) - (2*pbch_pss_sss_adjust/3);
else
// for 1 antenna port we have 10 REs per symbol per RB
len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6);
} else {
// symbol has no pilots
len = (nb_rb*12) - pbch_pss_sss_adjust;
}
pllr_symbol = (int8_t*)dlsch_llr; pllr_symbol = (int8_t*)dlsch_llr;
pllr_symbol += llr_offset; pllr_symbol += llr_offset;
//printf("nr_dlsch_64qam_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); //printf("nr_dlsch_64qam_64qam_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
......
...@@ -113,6 +113,7 @@ int32_t nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -113,6 +113,7 @@ int32_t nr_dlsch_qpsk_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **rho_i, int32_t **rho_i,
int16_t *dlsch_llr, int16_t *dlsch_llr,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint16_t pbch_pss_sss_adj, uint16_t pbch_pss_sss_adj,
...@@ -268,6 +269,7 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -268,6 +269,7 @@ int nr_dlsch_16qam_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int **rho_i, int **rho_i,
short *dlsch_llr, short *dlsch_llr,
unsigned char symbol, unsigned char symbol,
uint32_t len,
unsigned char first_symbol_flag, unsigned char first_symbol_flag,
unsigned short nb_rb, unsigned short nb_rb,
uint16_t pbch_pss_sss_adjust, uint16_t pbch_pss_sss_adjust,
...@@ -464,6 +466,7 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -464,6 +466,7 @@ int nr_dlsch_64qam_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int **rho_i, int **rho_i,
short *dlsch_llr, short *dlsch_llr,
unsigned char symbol, unsigned char symbol,
uint32_t len,
unsigned char first_symbol_flag, unsigned char first_symbol_flag,
unsigned short nb_rb, unsigned short nb_rb,
uint16_t pbch_pss_sss_adjust, uint16_t pbch_pss_sss_adjust,
...@@ -486,6 +489,7 @@ int32_t nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -486,6 +489,7 @@ int32_t nr_dlsch_qpsk_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *dlsch_llr, int16_t *dlsch_llr,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t beamforming_mode); uint8_t beamforming_mode);
...@@ -520,6 +524,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -520,6 +524,7 @@ void nr_dlsch_16qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int16_t *dlsch_llr, int16_t *dlsch_llr,
int32_t **dl_ch_mag, int32_t **dl_ch_mag,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
int16_t **llr32p, int16_t **llr32p,
...@@ -568,6 +573,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms, ...@@ -568,6 +573,7 @@ void nr_dlsch_64qam_llr(NR_DL_FRAME_PARMS *frame_parms,
int32_t **dl_ch_mag, int32_t **dl_ch_mag,
int32_t **dl_ch_magb, int32_t **dl_ch_magb,
uint8_t symbol, uint8_t symbol,
uint32_t len,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint16_t nb_rb, uint16_t nb_rb,
uint32_t llr_offset, uint32_t llr_offset,
...@@ -722,8 +728,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF, ...@@ -722,8 +728,8 @@ unsigned short nr_dlsch_extract_rbs_single(int **rxdataF,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
unsigned short pmi, unsigned short pmi,
unsigned char *pmi_ext, unsigned char *pmi_ext,
unsigned int *rb_alloc,
unsigned char symbol, unsigned char symbol,
uint8_t pilots,
unsigned short start_rb, unsigned short start_rb,
unsigned short nb_pdsch_rb, unsigned short nb_pdsch_rb,
unsigned char nr_tti_rx, unsigned char nr_tti_rx,
...@@ -759,8 +765,8 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF, ...@@ -759,8 +765,8 @@ unsigned short nr_dlsch_extract_rbs_dual(int **rxdataF,
int **dl_ch_estimates_ext, int **dl_ch_estimates_ext,
unsigned short pmi, unsigned short pmi,
unsigned char *pmi_ext, unsigned char *pmi_ext,
unsigned int *rb_alloc,
unsigned char symbol, unsigned char symbol,
uint8_t pilots,
unsigned short start_rb, unsigned short start_rb,
unsigned short nb_rb_pdsch, unsigned short nb_rb_pdsch,
unsigned char nr_tti_rx, unsigned char nr_tti_rx,
...@@ -822,6 +828,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext, ...@@ -822,6 +828,7 @@ void nr_dlsch_channel_compensation(int32_t **rxdataF_ext,
int32_t **rho, int32_t **rho,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
uint8_t symbol, uint8_t symbol,
uint8_t start_symbol,
uint8_t first_symbol_flag, uint8_t first_symbol_flag,
uint8_t mod_order, uint8_t mod_order,
uint16_t nb_rb, uint16_t nb_rb,
...@@ -842,6 +849,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext, ...@@ -842,6 +849,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
int start_point); int start_point);
void nr_dlsch_deinterleaving(uint8_t symbol, void nr_dlsch_deinterleaving(uint8_t symbol,
uint8_t start_symbol,
uint16_t L, uint16_t L,
uint16_t *llr, uint16_t *llr,
uint16_t *llr_deint, uint16_t *llr_deint,
...@@ -974,11 +982,12 @@ void dlsch_channel_compensation_TM34(NR_DL_FRAME_PARMS *frame_parms, ...@@ -974,11 +982,12 @@ void dlsch_channel_compensation_TM34(NR_DL_FRAME_PARMS *frame_parms,
@param pilots_flag Flag to indicate pilots in symbol @param pilots_flag Flag to indicate pilots in symbol
@param nb_rb Number of allocated RBs @param nb_rb Number of allocated RBs
*/ */
void nr_dlsch_channel_level(int32_t **dl_ch_estimates_ext, void nr_dlsch_channel_level(int **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
int32_t *avg, int32_t *avg,
uint8_t pilots_flag, uint8_t symbol,
uint16_t nb_rb); uint32_t len,
unsigned short nb_rb);
void dlsch_channel_level_TM34(int **dl_ch_estimates_ext, void dlsch_channel_level_TM34(int **dl_ch_estimates_ext,
...@@ -1007,7 +1016,8 @@ void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext, ...@@ -1007,7 +1016,8 @@ void dlsch_channel_level_TM7(int32_t **dl_bf_ch_estimates_ext,
void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext, void nr_dlsch_scale_channel(int32_t **dl_ch_estimates_ext,
NR_DL_FRAME_PARMS *frame_parms, NR_DL_FRAME_PARMS *frame_parms,
NR_UE_DLSCH_t **dlsch_ue, NR_UE_DLSCH_t **dlsch_ue,
uint8_t symbol_mod, uint8_t symbol,
uint8_t start_symbol,
uint16_t nb_rb); uint16_t nb_rb);
/** \brief This is the top-level entry point for DLSCH decoding in UE. It should be replicated on several /** \brief This is the top-level entry point for DLSCH decoding in UE. It should be replicated on several
......
...@@ -916,6 +916,7 @@ typedef struct { ...@@ -916,6 +916,7 @@ typedef struct {
NR_UE_COMMON common_vars; NR_UE_COMMON common_vars;
nr_ue_if_module_t *if_inst; nr_ue_if_module_t *if_inst;
nfapi_nr_config_request_t nrUE_config;
nr_downlink_indication_t dl_indication; nr_downlink_indication_t dl_indication;
nr_uplink_indication_t ul_indication; nr_uplink_indication_t ul_indication;
......
...@@ -123,7 +123,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){ ...@@ -123,7 +123,10 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH; dlsch0->g_pucch = dlsch_config_pdu->accumulated_delta_PUCCH;
dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id; dlsch0_harq->harq_ack.pucch_resource_indicator = dlsch_config_pdu->pucch_resource_id;
dlsch0_harq->harq_ack.slot_for_feedback_ack = dlsch_config_pdu->pdsch_to_harq_feedback_time_ind; dlsch0_harq->harq_ack.slot_for_feedback_ack = dlsch_config_pdu->pdsch_to_harq_feedback_time_ind;
dlsch0_harq->Nl=1;
dlsch0_harq->status = ACTIVE;
LOG_D(MAC,">>>> \tdlsch0->g_pucch=%d\tdlsch0_harq.mcs=%d\n",dlsch0->g_pucch,dlsch0_harq->mcs); LOG_D(MAC,">>>> \tdlsch0->g_pucch=%d\tdlsch0_harq.mcs=%d\n",dlsch0->g_pucch,dlsch0_harq->mcs);
} }
} }
}else{ }else{
......
...@@ -3784,9 +3784,10 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -3784,9 +3784,10 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
NR_UE_PDSCH *pdsch_vars; NR_UE_PDSCH *pdsch_vars;
uint8_t is_cw0_active = 0; uint8_t is_cw0_active = 0;
uint8_t is_cw1_active = 0; uint8_t is_cw1_active = 0;
// to be updated by higher layer nfapi_nr_config_request_t *cfg = &ue->nrUE_config;
uint8_t nb_re_dmrs = 6; uint8_t dmrs_type = cfg->pdsch_config.dmrs_type.value;
uint16_t length_dmrs = 1; uint8_t nb_re_dmrs = (dmrs_type==NFAPI_NR_DMRS_TYPE1)?6:4;
uint16_t length_dmrs = 1; //cfg->pdsch_config.dmrs_max_length.value;
uint16_t nb_symb_sch = 9; uint16_t nb_symb_sch = 9;
if (dlsch0==NULL) if (dlsch0==NULL)
...@@ -3794,6 +3795,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -3794,6 +3795,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
harq_pid = dlsch0->current_harq_pid; harq_pid = dlsch0->current_harq_pid;
is_cw0_active = dlsch0->harq_processes[harq_pid]->status; is_cw0_active = dlsch0->harq_processes[harq_pid]->status;
nb_symb_sch = dlsch0->harq_processes[harq_pid]->nb_symbols;
if(dlsch1) if(dlsch1)
is_cw1_active = dlsch1->harq_processes[harq_pid]->status; is_cw1_active = dlsch1->harq_processes[harq_pid]->status;
...@@ -3908,7 +3910,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, ...@@ -3908,7 +3910,7 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
nb_symb_sch, nb_symb_sch,
nr_tti_rx, nr_tti_rx,
harq_pid, harq_pid,
pdsch==PDSCH?1:0,//proc->decoder_switch, pdsch==PDSCH?1:0,
dlsch0->harq_processes[harq_pid]->TBS>256?1:0); dlsch0->harq_processes[harq_pid]->TBS>256?1:0);
//printf("start cW0 dlsch decoding\n"); //printf("start cW0 dlsch decoding\n");
#endif #endif
...@@ -4324,11 +4326,13 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN ...@@ -4324,11 +4326,13 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,UE_nr_rxtx_proc_t *proc,uint8_t eN
int l,l2; int l,l2;
int pilot1; int pilot1;
int frame_rx = proc->frame_rx; int frame_rx = proc->frame_rx;
int nr_tti_rx = proc->nr_tti_rx; int nr_tti_rx = proc->nr_tti_rx;
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][0]; NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[ue->current_thread_id[nr_tti_rx]][0];
uint16_t nb_symb_sch = 9; // to be updated by higher layer NR_UE_DLSCH_t **dlsch = ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id];
uint8_t harq_pid = ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->current_harq_pid;
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
uint8_t nb_symb_pdcch = pdcch_vars->coreset[0].duration; uint8_t nb_symb_pdcch = pdcch_vars->coreset[0].duration;
uint8_t dci_cnt = 0; uint8_t dci_cnt = 0;
......
...@@ -1087,7 +1087,7 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment( ...@@ -1087,7 +1087,7 @@ int8_t nr_ue_process_dci_freq_dom_resource_assignment(
start_RB = riv%n_RB_DLBWP; start_RB = riv%n_RB_DLBWP;
// if (l_RB - 1) > floor (n_RB_DLBWP/2) we need to recalculate them using the following lines // if (l_RB - 1) > floor (n_RB_DLBWP/2) we need to recalculate them using the following lines
tmp_RIV = n_RB_DLBWP * (l_RB - 1) + start_RB; tmp_RIV = n_RB_DLBWP * (l_RB - 1) + start_RB;
if (tmp_RIV != riv) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB if ((tmp_RIV != riv) || ((start_RB+l_RB)>n_RB_DLBWP)) { // then (l_RB - 1) > floor (n_RB_DLBWP/2) and we need to recalculate l_RB and start_RB
l_RB = n_RB_DLBWP - l_RB + 2; l_RB = n_RB_DLBWP - l_RB + 2;
start_RB = n_RB_DLBWP - start_RB - 1; start_RB = n_RB_DLBWP - start_RB - 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