Commit 4aed32e7 authored by Bilel's avatar Bilel

[OAI-UE] slot0 / slot1 parallelization

parent 7580d021
...@@ -5138,10 +5138,70 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format, ...@@ -5138,10 +5138,70 @@ int check_dci_format2_2a_coherency(DCI_format_t dci_format,
return(1); return(1);
} }
void compute_llr_offset(LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_PDCCH *pdcch_vars,
LTE_UE_PDSCH *pdsch_vars,
LTE_DL_UE_HARQ_t *dlsch0_harq,
uint8_t nb_rb_alloc,
uint8_t subframe)
{
uint32_t pbch_pss_sss_re;
uint32_t crs_re;
uint32_t granted_re;
uint32_t data_re;
uint32_t llr_offset;
uint8_t symbol;
uint8_t symbol_mod;
pdsch_vars->llr_offset[pdcch_vars->num_pdcch_symbols] = 0;
LOG_I(PHY,"compute_llr_offset: nb RB %d - Qm %d \n", nb_rb_alloc, dlsch0_harq->Qm);
//dlsch0_harq->rb_alloc_even;
//dlsch0_harq->rb_alloc_odd;
for(symbol=pdcch_vars->num_pdcch_symbols; symbol<frame_parms->symbols_per_tti; symbol++)
{
symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol;
if((symbol_mod == 0) || symbol_mod == (4-frame_parms->Ncp))
{
if (frame_parms->mode1_flag==0)
crs_re = 4;
else
crs_re = 2;
}
else
{
crs_re = 0;
}
granted_re = nb_rb_alloc * (12-crs_re);
pbch_pss_sss_re = adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,dlsch0_harq->Qm,subframe,symbol);
pbch_pss_sss_re = (double)pbch_pss_sss_re * ((double)(12-crs_re)/12);
data_re = granted_re - pbch_pss_sss_re;
llr_offset = data_re * dlsch0_harq->Qm * 2;
pdsch_vars->llr_length[symbol] = data_re;
if(symbol < (frame_parms->symbols_per_tti-1))
pdsch_vars->llr_offset[symbol+1] = pdsch_vars->llr_offset[symbol] + llr_offset;
//LOG_I(PHY,"Granted Re subframe %d / symbol %d => %d (%d RBs)\n", subframe, symbol_mod, granted_re,dlsch0_harq->nb_rb);
//LOG_I(PHY,"Pbch/PSS/SSS Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, pbch_pss_sss_re);
//LOG_I(PHY,"CRS Re Per PRB subframe %d / symbol %d => %d \n", subframe, symbol_mod, crs_re);
//LOG_I(PHY,"Data Re subframe %d / symbol %d => %d \n", subframe, symbol_mod, data_re);
//LOG_I(PHY,"Data Re subframe %d-symbol %d => llr length %d, llr offset %d \n", subframe, symbol,
// pdsch_vars->llr_length[symbol], pdsch_vars->llr_offset[symbol]);
}
}
void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
uint8_t N_RB_DL, uint8_t N_RB_DL,
DCI_INFO_EXTRACTED_t *pdci_info_extarcted, DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_PDCCH *pdcch_vars,
LTE_UE_PDSCH *pdsch_vars,
uint8_t subframe, uint8_t subframe,
uint16_t rnti, uint16_t rnti,
uint16_t tc_rnti, uint16_t tc_rnti,
...@@ -5163,12 +5223,27 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, ...@@ -5163,12 +5223,27 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
uint8_t dai = pdci_info_extarcted->dai; uint8_t dai = pdci_info_extarcted->dai;
uint8_t NPRB = 0; uint8_t NPRB = 0;
uint8_t nb_rb_alloc = 0;
if(dci_format == format1A) if(dci_format == format1A)
{ {
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti))
{ {
NPRB = (TPC&1) + 2; NPRB = (TPC&1) + 2;
switch (N_RB_DL) {
case 6:
nb_rb_alloc = RIV2nb_rb_LUT6[rballoc];//NPRB;
break;
case 25:
nb_rb_alloc = RIV2nb_rb_LUT25[rballoc];//NPRB;
break;
case 50:
nb_rb_alloc = RIV2nb_rb_LUT50[rballoc];//NPRB;
break;
case 100:
nb_rb_alloc = RIV2nb_rb_LUT100[rballoc];//NPRB;
break;
}
} }
else else
{ {
...@@ -5186,6 +5261,7 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, ...@@ -5186,6 +5261,7 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB; NPRB = RIV2nb_rb_LUT100[rballoc];//NPRB;
break; break;
} }
nb_rb_alloc = NPRB;
} }
} }
else // format1 else // format1
...@@ -5345,7 +5421,6 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, ...@@ -5345,7 +5421,6 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
pdlsch0_harq->rb_alloc_odd[2]= pdlsch0_harq->rb_alloc_even[2]; pdlsch0_harq->rb_alloc_odd[2]= pdlsch0_harq->rb_alloc_even[2];
pdlsch0_harq->rb_alloc_odd[3]= pdlsch0_harq->rb_alloc_even[3]; pdlsch0_harq->rb_alloc_odd[3]= pdlsch0_harq->rb_alloc_even[3];
} }
if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti)) if ((rnti==si_rnti) || (rnti==p_rnti) || (rnti==ra_rnti))
{ {
pdlsch0_harq->TBS = TBStable[mcs1][NPRB-1]; pdlsch0_harq->TBS = TBStable[mcs1][NPRB-1];
...@@ -5359,11 +5434,20 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format, ...@@ -5359,11 +5434,20 @@ void prepare_dl_decoding_format1_1A(DCI_format_t dci_format,
pdlsch0_harq->Qm = get_Qm(mcs1); pdlsch0_harq->Qm = get_Qm(mcs1);
} }
} }
compute_llr_offset(frame_parms,
pdcch_vars,
pdsch_vars,
pdlsch0_harq,
nb_rb_alloc,
subframe);
} }
void prepare_dl_decoding_format1C(uint8_t N_RB_DL, void prepare_dl_decoding_format1C(uint8_t N_RB_DL,
DCI_INFO_EXTRACTED_t *pdci_info_extarcted, DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_PDCCH *pdcch_vars,
LTE_UE_PDSCH *pdsch_vars,
uint32_t rnti, uint32_t rnti,
uint32_t si_rnti, uint32_t si_rnti,
uint32_t ra_rnti, uint32_t ra_rnti,
...@@ -5466,6 +5550,14 @@ void prepare_dl_decoding_format1C(uint8_t N_RB_DL, ...@@ -5466,6 +5550,14 @@ void prepare_dl_decoding_format1C(uint8_t N_RB_DL,
AssertFatal(0,"Format 1C: Unknown N_RB_DL %d\n",frame_parms->N_RB_DL); AssertFatal(0,"Format 1C: Unknown N_RB_DL %d\n",frame_parms->N_RB_DL);
break; break;
} }
compute_llr_offset(frame_parms,
pdcch_vars,
pdsch_vars,
pdlsch0_harq,
pdlsch0_harq->nb_rb,
subframe);
} }
void compute_precoding_info_2cw(uint8_t tpmi, uint8_t tbswap, uint16_t pmi_alloc, LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch1_harq) void compute_precoding_info_2cw(uint8_t tpmi, uint8_t tbswap, uint16_t pmi_alloc, LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch1_harq)
...@@ -5639,6 +5731,8 @@ void compute_precoding_info_format2A(uint8_t tpmi, ...@@ -5639,6 +5731,8 @@ void compute_precoding_info_format2A(uint8_t tpmi,
void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
DCI_INFO_EXTRACTED_t *pdci_info_extarcted, DCI_INFO_EXTRACTED_t *pdci_info_extarcted,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
LTE_UE_PDCCH *pdcch_vars,
LTE_UE_PDSCH *pdsch_vars,
uint16_t rnti, uint16_t rnti,
uint8_t subframe, uint8_t subframe,
LTE_DL_UE_HARQ_t *dlsch0_harq, LTE_DL_UE_HARQ_t *dlsch0_harq,
...@@ -5890,9 +5984,16 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format, ...@@ -5890,9 +5984,16 @@ void prepare_dl_decoding_format2_2A(DCI_format_t dci_format,
dlsch1_harq->Qm = (mcs2-28)<<1; dlsch1_harq->Qm = (mcs2-28)<<1;
} }
//#ifdef DEBUG_HARQ
compute_llr_offset(frame_parms,
pdcch_vars,
pdsch_vars,
dlsch0_harq,
dlsch0_harq->nb_rb,
subframe);
#ifdef DEBUG_HARQ
printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status); printf("[DCI UE]: dlsch0_harq status %d , dlsch1_harq status %d\n", dlsch0_harq->status, dlsch1_harq->status);
//#endif #endif
#ifdef DEBUG_HARQ #ifdef DEBUG_HARQ
if (dlsch0 != NULL && dlsch1 != NULL) if (dlsch0 != NULL && dlsch1 != NULL)
...@@ -5909,6 +6010,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -5909,6 +6010,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
void *dci_pdu, void *dci_pdu,
uint16_t rnti, uint16_t rnti,
DCI_format_t dci_format, DCI_format_t dci_format,
LTE_UE_PDCCH *pdcch_vars,
LTE_UE_PDSCH *pdsch_vars,
LTE_UE_DLSCH_t **dlsch, LTE_UE_DLSCH_t **dlsch,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated, PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
...@@ -5998,6 +6101,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -5998,6 +6101,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
frame_parms->N_RB_DL, frame_parms->N_RB_DL,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
pdcch_vars,
pdsch_vars,
subframe, subframe,
rnti, rnti,
tc_rnti, tc_rnti,
...@@ -6048,6 +6153,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6048,6 +6153,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
prepare_dl_decoding_format1C(frame_parms->N_RB_DL, prepare_dl_decoding_format1C(frame_parms->N_RB_DL,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
pdcch_vars,
pdsch_vars,
rnti, rnti,
si_rnti, si_rnti,
ra_rnti, ra_rnti,
...@@ -6099,6 +6206,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6099,6 +6206,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
frame_parms->N_RB_DL, frame_parms->N_RB_DL,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
pdcch_vars,
pdsch_vars,
subframe, subframe,
rnti, rnti,
tc_rnti, tc_rnti,
...@@ -6153,6 +6262,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6153,6 +6262,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
prepare_dl_decoding_format2_2A(format2, prepare_dl_decoding_format2_2A(format2,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
pdcch_vars,
pdsch_vars,
rnti, rnti,
subframe, subframe,
dlsch0_harq, dlsch0_harq,
...@@ -6207,6 +6318,8 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -6207,6 +6318,8 @@ int generate_ue_dlsch_params_from_dci(int frame,
prepare_dl_decoding_format2_2A(format2A, prepare_dl_decoding_format2_2A(format2A,
&dci_info_extarcted, &dci_info_extarcted,
frame_parms, frame_parms,
pdcch_vars,
pdsch_vars,
rnti, rnti,
subframe, subframe,
dlsch0_harq, dlsch0_harq,
......
...@@ -91,6 +91,7 @@ extern void print_shorts(char *s,int16_t *x); ...@@ -91,6 +91,7 @@ extern void print_shorts(char *s,int16_t *x);
int rx_pdsch(PHY_VARS_UE *ue, int rx_pdsch(PHY_VARS_UE *ue,
UE_rxtx_proc_t *proc,
PDSCH_t type, PDSCH_t type,
unsigned char eNB_id, unsigned char eNB_id,
unsigned char eNB_id_i, //if this == ue->n_connected_eNB, we assume MU interference unsigned char eNB_id_i, //if this == ue->n_connected_eNB, we assume MU interference
...@@ -747,18 +748,35 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -747,18 +748,35 @@ int rx_pdsch(PHY_VARS_UE *ue,
} }
//printf("LLR dlsch0_harq->Qm %d rx_type %d cw0 %d cw1 %d symbol %d \n",dlsch0_harq->Qm,rx_type,codeword_TB0,codeword_TB1,symbol); //printf("LLR dlsch0_harq->Qm %d rx_type %d cw0 %d cw1 %d symbol %d \n",dlsch0_harq->Qm,rx_type,codeword_TB0,codeword_TB1,symbol);
// compute LLRs
// -> // compute @pointer where llrs should filled for this ofdm-symbol
int8_t *pllr_symbol_cw0;
int8_t *pllr_symbol_cw1;
uint32_t llr_offset_symbol;
llr_offset_symbol = pdsch_vars[eNB_id]->llr_offset[symbol];
pllr_symbol_cw0 = (int8_t*)pdsch_vars[eNB_id]->llr[0];
pllr_symbol_cw1 = (int8_t*)pdsch_vars[eNB_id]->llr[1];
pllr_symbol_cw0 += llr_offset_symbol;
pllr_symbol_cw1 += llr_offset_symbol;
/*LOG_I(PHY,"compute LLRs [AbsSubframe %d.%d-%d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
proc->frame_rx, proc->subframe_rx,symbol,
nb_rb,dlsch0_harq->Qm,
pdsch_vars[eNB_id]->llr_length[symbol],
pdsch_vars[eNB_id]->llr_offset[symbol],
(int16_t*)pdsch_vars[eNB_id]->llr[0],
pllr_symbol);*/
switch (dlsch0_harq->Qm) { switch (dlsch0_harq->Qm) {
case 2 : case 2 :
if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) {
dlsch_qpsk_llr(frame_parms, dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], (int16_t*)pllr_symbol_cw0,
symbol, symbol,
first_symbol_flag, first_symbol_flag,
nb_rb, nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
pdsch_vars[eNB_id]->llr128,
beamforming_mode); beamforming_mode);
} }
else if (rx_type >= rx_IC_single_stream) { else if (rx_type >= rx_IC_single_stream) {
...@@ -918,12 +936,12 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -918,12 +936,12 @@ int rx_pdsch(PHY_VARS_UE *ue,
if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB0 == -1) || (codeword_TB1 == -1)) {
dlsch_64qam_llr(frame_parms, dlsch_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], (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,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
pdsch_vars[eNB_id]->llr128, pdsch_vars[eNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
else if (rx_type >= rx_IC_single_stream) { else if (rx_type >= rx_IC_single_stream) {
...@@ -980,10 +998,10 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -980,10 +998,10 @@ int rx_pdsch(PHY_VARS_UE *ue,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[eNB_id]->dl_ch_mag0,
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]->llr[0], (int16_t*)pllr_symbol_cw0,
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[eNB_id]->llr_offset[symbol]);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
dlsch_64qam_64qam_llr(frame_parms, dlsch_64qam_64qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
...@@ -991,10 +1009,10 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -991,10 +1009,10 @@ int rx_pdsch(PHY_VARS_UE *ue,
dl_ch_mag_ptr, dl_ch_mag_ptr,
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]->llr[1], (int16_t*)pllr_symbol_cw1,
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,subframe,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[eNB_id]->llr_offset[symbol]);
} }
} }
} }
...@@ -1010,10 +1028,9 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -1010,10 +1028,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
dlsch_qpsk_llr(frame_parms, dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], (int16_t*)pllr_symbol_cw0,
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,subframe,symbol),
pdsch_vars[eNB_id]->llr128,
beamforming_mode); beamforming_mode);
} }
break; break;
...@@ -1033,12 +1050,12 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -1033,12 +1050,12 @@ int rx_pdsch(PHY_VARS_UE *ue,
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
dlsch_64qam_llr(frame_parms, dlsch_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[eNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], (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,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
pdsch_vars[eNB_id]->llr128, pdsch_vars[eNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
break; break;
...@@ -1096,6 +1113,9 @@ int rx_pdsch(PHY_VARS_UE *ue, ...@@ -1096,6 +1113,9 @@ int rx_pdsch(PHY_VARS_UE *ue,
2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2)); 2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_tti*2));
#endif #endif
if(symbol == (ue->frame_parms.symbols_per_tti>>1)) //(first_symbol_flag)
proc->first_symbol_available = 1;
return(0); return(0);
} }
...@@ -4604,7 +4624,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF, ...@@ -4604,7 +4624,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
unsigned char subframe, unsigned char subframe,
uint32_t high_speed_flag, uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
MIMO_mode_t mimo_mode) { MIMO_mode_t mimo_mode) {
int prb,nb_rb=0; int prb,nb_rb=0;
int prb_off,prb_off2; int prb_off,prb_off2;
......
...@@ -636,7 +636,6 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -636,7 +636,6 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
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,
int16_t **llr32p,
uint8_t beamforming_mode) uint8_t beamforming_mode)
{ {
...@@ -645,12 +644,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -645,12 +644,14 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
int i,len; int i,len;
uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol; 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) {
llr32 = (uint32_t*)dlsch_llr; llr32 = (uint32_t*)dlsch_llr;
} else { } else {
llr32 = (uint32_t*)(*llr32p); llr32 = (uint32_t*)(*llr32p);
} }*/
llr32 = (uint32_t*)dlsch_llr;
if (!llr32) { if (!llr32) {
msg("dlsch_qpsk_llr: llr is null, symbol %d, llr32=%p\n",symbol, llr32); msg("dlsch_qpsk_llr: llr is null, symbol %d, llr32=%p\n",symbol, llr32);
return(-1); return(-1);
...@@ -672,6 +673,13 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -672,6 +673,13 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
//printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust); //printf("dlsch_qpsk_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,"dlsch_qpsk_llr: [symb %d / FirstSym %d / Length %d]: @LLR Buff %x, @LLR Buff(symb) %x \n",
symbol,
first_symbol_flag,
len,
dlsch_llr,
llr32);*/
//printf("ll32p=%p , dlsch_llr=%p, symbol=%d, flag=%d \n", llr32, dlsch_llr, symbol, first_symbol_flag); //printf("ll32p=%p , dlsch_llr=%p, symbol=%d, flag=%d \n", llr32, dlsch_llr, symbol, first_symbol_flag);
for (i=0; i<len; i++) { for (i=0; i<len; i++) {
*llr32 = *rxF; *llr32 = *rxF;
...@@ -680,7 +688,7 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -680,7 +688,7 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
llr32++; llr32++;
} }
*llr32p = (int16_t *)llr32; //*llr32p = (int16_t *)llr32;
return(0); return(0);
} }
...@@ -1043,7 +1051,8 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1043,7 +1051,8 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
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,
int16_t **llr_save, //int16_t **llr_save,
uint32_t llr_offset,
uint8_t beamforming_mode) uint8_t beamforming_mode)
{ {
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
...@@ -1057,11 +1066,18 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1057,11 +1066,18 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
unsigned char symbol_mod,len_mod4; unsigned char symbol_mod,len_mod4;
short *llr; short *llr;
int16_t *llr2; int16_t *llr2;
int8_t *pllr_symbol;
/*
if (first_symbol_flag==1) if (first_symbol_flag==1)
llr = dlsch_llr; llr = dlsch_llr;
else else
llr = *llr_save; llr = *llr_save;
*/
llr = dlsch_llr;
pllr_symbol = (int8_t*)dlsch_llr;
pllr_symbol += llr_offset;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
...@@ -1085,6 +1101,15 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1085,6 +1101,15 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
len = (nb_rb*12) - pbch_pss_sss_adjust; len = (nb_rb*12) - pbch_pss_sss_adjust;
} }
// printf("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,"dlsch_64qam_llr [symb %d / FirstSym %d / Length %d]: @LLR Buff %x \n",
symbol,
first_symbol_flag,
len,
dlsch_llr,
pllr_symbol);*/
llr2 = llr; llr2 = llr;
llr += (len*6); llr += (len*6);
...@@ -1179,7 +1204,6 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1179,7 +1204,6 @@ void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
} }
*llr_save = llr;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
_mm_empty(); _mm_empty();
_m_empty(); _m_empty();
...@@ -8794,7 +8818,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -8794,7 +8818,8 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
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,
int16_t **llr16p) //int16_t **llr16p,
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*frame_parms->N_RB_DL*12)];
...@@ -8803,16 +8828,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -8803,16 +8828,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
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*frame_parms->N_RB_DL*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*frame_parms->N_RB_DL*12)];
int16_t *llr16; int16_t *llr16;
int8_t *pllr_symbol; // pointer where llrs should filled for this ofdm symbol
int len; int len;
uint8_t symbol_mod = (symbol >= (7-frame_parms->Ncp))? (symbol-(7-frame_parms->Ncp)) : symbol; 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) {
llr16 = (int16_t*)dlsch_llr; llr16 = (int16_t*)dlsch_llr;
} else { } else {
llr16 = (int16_t*)(*llr16p); llr16 = (int16_t*)(*llr16p);
} }*/
llr16 = (int16_t*)dlsch_llr;
if (!llr16) { if (!llr16) {
msg("dlsch_64qam_64qam_llr: llr is null, symbol %d\n",symbol); msg("dlsch_64qam_64qam_llr: llr is null, symbol %d\n",symbol);
return(-1); return(-1);
...@@ -8831,6 +8858,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -8831,6 +8858,18 @@ int dlsch_64qam_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
len = (nb_rb*12) - pbch_pss_sss_adjust; len = (nb_rb*12) - pbch_pss_sss_adjust;
} }
pllr_symbol = (int8_t*)dlsch_llr;
pllr_symbol += llr_offset;
//printf("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);
/*LOG_I(PHY,"dlsch_64qam_64qam_llr [symb %d / FirstSym %d / Length %d / LLR Offset %d]: @LLR Buff %x, @LLR Buff(symb) %x, , @Compute LLR Buff(symb) %x \n",
symbol,