Commit 51e8e0ad authored by lukashov's avatar lukashov

Fixing SIC receiver for all the combinations.

Introduced >>1 shift in SIC modulation for 64QAM to avoid overflow.
Shift is then compensated in llr computation.
parent c63abc08
...@@ -829,7 +829,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -829,7 +829,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
lte_ue_pdsch_vars[eNB_id]->llr128); lte_ue_pdsch_vars[eNB_id]->llr128);
} }
else if ((rx_type==rx_IC_single_stream) || (rx_type==rx_IC_dual_stream)) { else if (rx_type >= rx_IC_single_stream) {
if (dlsch1_harq->Qm == 2) { if (dlsch1_harq->Qm == 2) {
dlsch_16qam_qpsk_llr(frame_parms, dlsch_16qam_qpsk_llr(frame_parms,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
...@@ -913,7 +913,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -913,7 +913,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,subframe,symbol),
lte_ue_pdsch_vars[eNB_id]->llr128); lte_ue_pdsch_vars[eNB_id]->llr128);
} }
else if ((rx_type==rx_IC_single_stream) || (rx_type==rx_IC_dual_stream)) { else if (rx_type >= rx_IC_single_stream) {
if (dlsch1_harq->Qm == 2) { if (dlsch1_harq->Qm == 2) {
dlsch_64qam_qpsk_llr(frame_parms, dlsch_64qam_qpsk_llr(frame_parms,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
......
...@@ -694,6 +694,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -694,6 +694,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0) LTE_UE_DLSCH_t *dlsch0)
{ {
...@@ -718,12 +719,19 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -718,12 +719,19 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
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;
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) //pilots=1
amp_tmp=dlsch0->sqrt_rho_b;
else //pilots=0
amp_tmp=dlsch0->sqrt_rho_a; if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) //pilots=1
amp_tmp=dlsch0->sqrt_rho_b;
else //pilots=0
amp_tmp=dlsch0->sqrt_rho_a;
if (mod_order_0==6)
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
pbch_pss_sss_adjust=adjust_G2(frame_parms,rb_alloc,2,subframe,symbol); pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,2,subframe,symbol);
// printf("amp_tmp=%d\n", amp_tmp); // printf("amp_tmp=%d\n", amp_tmp);
...@@ -741,10 +749,10 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -741,10 +749,10 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
len_acc+=len; //accumulated length; this is done because in sic_buffer we have only data symbols len_acc+=len; //accumulated length; this is done because in sic_buffer we have only data symbols
multadd_complex_vector_real_scalar((int16_t *)sic_data, multadd_complex_vector_real_scalar((int16_t *)sic_data,
amp_tmp, amp_tmp,
(int16_t *)rho_amp_x0, //this is in Q13 (int16_t *)rho_amp_x0, //this is in Q13
1, 1,
len); len);
// printf ("Got x0*rho_a\n"); // printf ("Got x0*rho_a\n");
...@@ -768,10 +776,10 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -768,10 +776,10 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
sub_cpx_vector16((int16_t *)rxF, sub_cpx_vector16((int16_t *)rxF,
(int16_t *)rho_rho_amp_x0, (int16_t *)rho_rho_amp_x0,
(int16_t *)clean_x1, //(int16_t *)clean_x1,
//(int16_t *)rxF, (int16_t *)rxF,
len*2); len*2);
// write_output("rxFdata_comp1_after.m","rxF_a", rxF,len,1,1); // write_output("rxFdata_comp1_after.m","rxF_a", rxF,len,1,1);
// write_output("clean_x1.m","x1", clean_x1,len,1,1); // write_output("clean_x1.m","x1", clean_x1,len,1,1);
...@@ -789,7 +797,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -789,7 +797,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
//this is for QPSK only!!! //this is for QPSK only!!!
for (i=0; i<len*2; i++) { for (i=0; i<len*2; i++) {
*llr16 =clean_x1[i];//(int16_t *)rxF[i]; //clean_x1[i];//(int16_t *)rxF[i];//clean_x1[i]; //(int16_t *)rxF[i];//; //rxF[i]; *llr16 =rxF[i]; //clean_x1[i];//(int16_t *)rxF[i];//clean_x1[i]; //(int16_t *)rxF[i];//; //rxF[i];
//printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]); //printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
llr16++; llr16++;
} }
...@@ -937,6 +945,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms, ...@@ -937,6 +945,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0 LTE_UE_DLSCH_t *dlsch0
) )
{ {
...@@ -964,26 +973,32 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms, ...@@ -964,26 +973,32 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
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;
pbch_pss_sss_adjust=adjust_G2(frame_parms,rb_alloc,4,subframe,symbol); pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,4,subframe,symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) { if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
amp_tmp=dlsch0->sqrt_rho_b;
if (frame_parms->mode1_flag==0) amp_tmp=dlsch0->sqrt_rho_b;
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3); if (frame_parms->mode1_flag==0)
else len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6); else
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
} else { } else {
amp_tmp=dlsch0->sqrt_rho_a;
len = nb_rb*12 - pbch_pss_sss_adjust; amp_tmp=dlsch0->sqrt_rho_a;
len = nb_rb*12 - pbch_pss_sss_adjust;
} }
if (mod_order_0==6)
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
len_acc+=len; len_acc+=len;
multadd_complex_vector_real_scalar((int16_t *)sic_data, multadd_complex_vector_real_scalar((int16_t *)sic_data,
amp_tmp, amp_tmp,
(int16_t *)rho_amp_x0, //this is in Q13 (int16_t *)rho_amp_x0, //this is in Q13
1, 1,
len); len);
mult_cpx_vector((int16_t *)rho_1, //Q15 mult_cpx_vector((int16_t *)rho_1, //Q15
(int16_t *)rho_amp_x0, //Q13 (int16_t *)rho_amp_x0, //Q13
...@@ -992,15 +1007,16 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms, ...@@ -992,15 +1007,16 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
13); 13);
sub_cpx_vector16((int16_t *)rxF, sub_cpx_vector16((int16_t *)rxF,
(int16_t *)rho_rho_amp_x0, (int16_t *)rho_rho_amp_x0,
// (int16_t *)clean_x1, //(int16_t *)clean_x1,
(int16_t *)rxF, (int16_t *)rxF,
len*2); len*2);
len_mod4 = len&3;
len>>=2; // length in quad words (4 REs)
len+=(len_mod4==0 ? 0 : 1);
for (i=0; i<len; i++) { len_mod4 = len&3;
len>>=2; // length in quad words (4 REs)
len+=(len_mod4==0 ? 0 : 1);
for (i=0; i<len; i++) {
__m128i *x1 = (__m128i*)rxF;//clean_x1; __m128i *x1 = (__m128i*)rxF;//clean_x1;
...@@ -1193,6 +1209,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1193,6 +1209,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0 LTE_UE_DLSCH_t *dlsch0
) )
{ {
...@@ -1207,7 +1224,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1207,7 +1224,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t *sic_data; uint16_t *sic_data;
uint16_t pbch_pss_sss_adjust; uint16_t pbch_pss_sss_adjust;
unsigned char len_mod4=0; unsigned char len_mod4=0;
int16_t *llr2; uint16_t *llr2;
__m128i *ch_mag,*ch_magb; __m128i *ch_mag,*ch_magb;
nsymb = (frame_parms->Ncp==0) ? 14:12; nsymb = (frame_parms->Ncp==0) ? 14:12;
...@@ -1221,26 +1238,31 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1221,26 +1238,31 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
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;
pbch_pss_sss_adjust=adjust_G2(frame_parms,rb_alloc,6,subframe,symbol); pbch_pss_sss_adjust=adjust_G2(frame_parms,&rb_alloc,6,subframe,symbol);
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) { if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
amp_tmp=dlsch0->sqrt_rho_b;
if (frame_parms->mode1_flag==0) amp_tmp = dlsch0->sqrt_rho_b;
len = nb_rb*8 - (2*pbch_pss_sss_adjust/3); if (frame_parms->mode1_flag==0)
else len = nb_rb*8 - (2*pbch_pss_sss_adjust/3);
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6); else
len = nb_rb*10 - (5*pbch_pss_sss_adjust/6);
} else { } else {
amp_tmp=dlsch0->sqrt_rho_a;
len = nb_rb*12 - pbch_pss_sss_adjust; amp_tmp = dlsch0->sqrt_rho_a;
len = nb_rb*12 - pbch_pss_sss_adjust;
} }
if (mod_order_0==6)
amp_tmp=amp_tmp<<1; // to compensate for >> 1 shift in modulation
len_acc+=len; len_acc+=len;
multadd_complex_vector_real_scalar((int16_t *)sic_data, multadd_complex_vector_real_scalar((int16_t *)sic_data,
amp_tmp, amp_tmp,
(int16_t *)rho_amp_x0, //this is in Q13 (int16_t *)rho_amp_x0, //this is in Q13
1, 1,
len); len);
mult_cpx_vector((int16_t *)rho_1, //Q15 mult_cpx_vector((int16_t *)rho_1, //Q15
(int16_t *)rho_amp_x0, //Q13 (int16_t *)rho_amp_x0, //Q13
...@@ -1249,10 +1271,10 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1249,10 +1271,10 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
13); 13);
sub_cpx_vector16((int16_t *)rxF, sub_cpx_vector16((int16_t *)rxF,
(int16_t *)rho_rho_amp_x0, (int16_t *)rho_rho_amp_x0,
// (int16_t *)clean_x1, //(int16_t *)clean_x1,
(int16_t *)rxF, (int16_t *)rxF,
len*2); len*2);
llr2 = llr32; llr2 = llr32;
llr32 += (len*6); llr32 += (len*6);
......
...@@ -1613,7 +1613,6 @@ int dlsch_modulation(int32_t **txdataF, ...@@ -1613,7 +1613,6 @@ int dlsch_modulation(int32_t **txdataF,
int dlsch_modulation_SIC(int32_t **sic_buffer, int dlsch_modulation_SIC(int32_t **sic_buffer,
int16_t amp,
uint32_t subframe_offset, uint32_t subframe_offset,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t num_pdcch_symbols, uint8_t num_pdcch_symbols,
...@@ -1627,7 +1626,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer, ...@@ -1627,7 +1626,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid]; LTE_DL_eNB_HARQ_t *dlsch0_harq = dlsch0->harq_processes[harq_pid];
LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid]; LTE_DL_eNB_HARQ_t *dlsch1_harq; //= dlsch1->harq_processes[harq_pid];
uint32_t i,jj,re_allocated=0; uint32_t i,jj,re_allocated=0;
uint16_t l,rb,re_offset; uint16_t l,rb,re_offset, amp;
uint32_t *rb_alloc = dlsch0_harq->rb_alloc; uint32_t *rb_alloc = dlsch0_harq->rb_alloc;
uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs); uint8_t mod_order0 = get_Qm(dlsch0_harq->mcs);
uint8_t *x0 = dlsch0_harq->e; uint8_t *x0 = dlsch0_harq->e;
...@@ -1662,7 +1661,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer, ...@@ -1662,7 +1661,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
jj = jj + 1; jj = jj + 1;
((int16_t*)&sic_buffer[0][i])[1] += (x0[jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1} ((int16_t*)&sic_buffer[0][i])[1] += (x0[jj]==1) ? (-gain_lin_QPSK) : gain_lin_QPSK; //Q //b_{i+1}
jj = jj + 1; jj = jj + 1;
...@@ -1700,7 +1699,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer, ...@@ -1700,7 +1699,7 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
((int16_t *)&sic_buffer[0][i])[0]+=qam16_table[qam16_table_offset_re]; ((int16_t *)&sic_buffer[0][i])[0]+=qam16_table[qam16_table_offset_re];
((int16_t *)&sic_buffer[0][i])[0]+=qam16_table[qam16_table_offset_im]; ((int16_t *)&sic_buffer[0][i])[1]+=qam16_table[qam16_table_offset_im];
i++; i++;
...@@ -1743,8 +1742,8 @@ int dlsch_modulation_SIC(int32_t **sic_buffer, ...@@ -1743,8 +1742,8 @@ int dlsch_modulation_SIC(int32_t **sic_buffer,
jj=jj+1; jj=jj+1;
((int16_t *)&sic_buffer[0][i])[0]+=qam64_table[qam64_table_offset_re];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15); ((int16_t *)&sic_buffer[0][i])[0]+=(qam64_table[qam64_table_offset_re])>>1;//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_re])>>15);
((int16_t *)&sic_buffer[0][i])[0]+=qam64_table[qam64_table_offset_im];//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15); ((int16_t *)&sic_buffer[0][i])[1]+=(qam64_table[qam64_table_offset_im])>>1;//(int16_t)(((int32_t)amp*qam64_table[qam64_table_offset_im])>>15);
i++; i++;
......
...@@ -212,7 +212,6 @@ int32_t dlsch_modulation(int32_t **txdataF, ...@@ -212,7 +212,6 @@ int32_t dlsch_modulation(int32_t **txdataF,
LTE_eNB_DLSCH_t *dlsch1); LTE_eNB_DLSCH_t *dlsch1);
int32_t dlsch_modulation_SIC(int32_t **sic_buffer, int32_t dlsch_modulation_SIC(int32_t **sic_buffer,
int16_t amp,
uint32_t sub_frame_offset, uint32_t sub_frame_offset,
LTE_DL_FRAME_PARMS *frame_parms, LTE_DL_FRAME_PARMS *frame_parms,
uint8_t num_pdcch_symbols, uint8_t num_pdcch_symbols,
...@@ -728,6 +727,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -728,6 +727,7 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0); LTE_UE_DLSCH_t *dlsch0);
void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
...@@ -761,6 +761,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms, ...@@ -761,6 +761,7 @@ void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0); LTE_UE_DLSCH_t *dlsch0);
void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
...@@ -774,6 +775,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -774,6 +775,7 @@ void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
uint16_t nb_rb, uint16_t nb_rb,
uint8_t subframe, uint8_t subframe,
uint32_t rb_alloc, uint32_t rb_alloc,
uint16_t mod_order_0,
LTE_UE_DLSCH_t *dlsch0); LTE_UE_DLSCH_t *dlsch0);
......
...@@ -3675,85 +3675,92 @@ n(tikz_fname,"w"); ...@@ -3675,85 +3675,92 @@ n(tikz_fname,"w");
PHY_vars_UE->dlsch_eNB[eNB_id]->active = PHY_vars_UE->dlsch_ue[eNB_id][0]->active; PHY_vars_UE->dlsch_eNB[eNB_id]->active = PHY_vars_UE->dlsch_ue[eNB_id][0]->active;
PHY_vars_UE->dlsch_eNB[eNB_id]->rnti = PHY_vars_UE->dlsch_ue[eNB_id][0]->rnti; PHY_vars_UE->dlsch_eNB[eNB_id]->rnti = PHY_vars_UE->dlsch_ue[eNB_id][0]->rnti;
PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid = PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid; PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid = PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid;
dlsch_encoding(input_buffer0[0], //PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->b,
&PHY_vars_UE->lte_frame_parms, dlsch_encoding(input_buffer0[0], //PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->b,
num_pdcch_symbols, &PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->dlsch_eNB[eNB_id], num_pdcch_symbols,
0, PHY_vars_UE->dlsch_eNB[eNB_id],
subframe, 0,
&PHY_vars_UE->dlsch_rate_matching_stats, subframe,
&PHY_vars_UE->dlsch_turbo_encoding_stats, &PHY_vars_UE->dlsch_rate_matching_stats,
&PHY_vars_UE->dlsch_interleaving_stats); &PHY_vars_UE->dlsch_turbo_encoding_stats,
&PHY_vars_UE->dlsch_interleaving_stats);
coded_bits_per_codeword = get_G(&PHY_vars_UE->lte_frame_parms, coded_bits_per_codeword = get_G(&PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->nb_rb, PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->nb_rb,
PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->rb_alloc, PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->rb_alloc,
get_Qm(PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->mcs), get_Qm(PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->mcs),
PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->Nl, PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->Nl,
num_pdcch_symbols, num_pdcch_symbols,
0, 0,
subframe); subframe);
dlsch_scrambling(&PHY_vars_UE->lte_frame_parms, dlsch_scrambling(&PHY_vars_UE->lte_frame_parms,
0, 0,
PHY_vars_UE->dlsch_eNB[eNB_id], PHY_vars_UE->dlsch_eNB[eNB_id],
coded_bits_per_codeword, coded_bits_per_codeword,
0, 0,
subframe<<1); subframe<<1);
re_allocated = dlsch_modulation_SIC(sic_buffer, re_allocated = dlsch_modulation_SIC(sic_buffer,
AMP, subframe,
subframe, &PHY_vars_UE->lte_frame_parms,
&PHY_vars_UE->lte_frame_parms, num_pdcch_symbols,
num_pdcch_symbols, &PHY_vars_UE->dlsch_eNB[0][0],
&PHY_vars_UE->dlsch_eNB[0][0], NULL,
NULL, coded_bits_per_codeword);
coded_bits_per_codeword);
// write_output("sic_buffer.m","sic", *sic_buffer,re_allocated,1,1); // write_output("sic_buffer.m","sic", *sic_buffer,re_allocated,1,1);
// write_output("rxdataF_comp1.m","rxF_comp1", *PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],14*12*25,1,1); // write_output("rxdataF_comp1.m","rxF_comp1", *PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],14*12*25,1,1);
// write_output("rxdataF_rho.m","rho", *PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],14*12*25,1,1); // write_output("rxdataF_rho.m","rho", *PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],14*12*25,1,1);
switch (get_Qm(PHY_vars_eNB->dlsch_eNB[0][1]->harq_processes[0]->mcs)){ switch (get_Qm(PHY_vars_eNB->dlsch_eNB[0][1]->harq_processes[0]->mcs)){
case 2:
dlsch_qpsk_llr_SIC(&PHY_vars_UE->lte_frame_parms, case 2:
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
sic_buffer, dlsch_qpsk_llr_SIC(&PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round], PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1], sic_buffer,
num_pdcch_symbols, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
dlsch0_eNB_harq->nb_rb, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],
subframe, num_pdcch_symbols,
dlsch0_eNB_harq->rb_alloc[0], dlsch0_eNB_harq->nb_rb,
PHY_vars_UE->dlsch_ue[eNB_id][0]); subframe,
dlsch0_eNB_harq->rb_alloc[0],
get_Qm(PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->mcs),
PHY_vars_UE->dlsch_ue[eNB_id][0]);
break; break;
case 4: case 4:
dlsch_16qam_llr_SIC(&PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round], dlsch_16qam_llr_SIC(&PHY_vars_UE->lte_frame_parms,
sic_buffer, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round], sic_buffer,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1], PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
num_pdcch_symbols, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_mag1, num_pdcch_symbols,
dlsch0_eNB_harq->nb_rb, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_mag1,
subframe, dlsch0_eNB_harq->nb_rb,
dlsch0_eNB_harq->rb_alloc[0], subframe,
PHY_vars_UE->dlsch_ue[eNB_id][0]); dlsch0_eNB_harq->rb_alloc[0],
get_Qm(PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->mcs),
PHY_vars_UE->dlsch_ue[eNB_id][0]);
break; break;
case 6: case 6:
dlsch_64qam_llr_SIC(&PHY_vars_UE->lte_frame_parms, dlsch_64qam_llr_SIC(&PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round], PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
sic_buffer, sic_buffer,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round], PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[PHY_vars_UE->dlsch_ue[0][0]->current_harq_pid][round],
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1], PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],
num_pdcch_symbols, num_pdcch_symbols,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_mag1, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_mag1,
PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_magb1, PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->dl_ch_magb1,
dlsch0_eNB_harq->nb_rb, dlsch0_eNB_harq->nb_rb,
subframe, subframe,
dlsch0_eNB_harq->rb_alloc[0], dlsch0_eNB_harq->rb_alloc[0],
PHY_vars_UE->dlsch_ue[eNB_id][0]); get_Qm(PHY_vars_eNB->dlsch_eNB[0][0]->harq_processes[0]->mcs),
PHY_vars_UE->dlsch_ue[eNB_id][0]);
break; break;
}// round }// round
......
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