Commit 291a7f17 authored by lukashov's avatar lukashov

1. Changing precoder to minimize interference: testing simple channels.

2. Fixing confusion between dl_ch_rho2_ext and dl_ch_rho_ext[harq_pid][round].
parent 127fa9ae
...@@ -5897,7 +5897,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb) ...@@ -5897,7 +5897,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
pmi_im += meas->subband_pmi_im[eNB_id][i][aarx]; pmi_im += meas->subband_pmi_im[eNB_id][i][aarx];
//printf("meas->subband_pmi_im[eNB_id][i][%d]=%d\n",aarx, meas->subband_pmi_im[eNB_id][i][aarx]); //printf("meas->subband_pmi_im[eNB_id][i][%d]=%d\n",aarx, meas->subband_pmi_im[eNB_id][i][aarx]);
} }
if (((pmi_re >= pmi_im) && (pmi_re >= -pmi_im)) || ((pmi_re >= pmi_im) && (pmi_re <= -pmi_im))) if (((pmi_re >= pmi_im) && (pmi_re >= -pmi_im)) || ((pmi_re <= pmi_im) && (pmi_re <= -pmi_im)))
pmiq = PMI_2A_R1_11; pmiq = PMI_2A_R1_11;
else else
pmiq = PMI_2A_R1_1j; pmiq = PMI_2A_R1_1j;
......
...@@ -453,7 +453,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -453,7 +453,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->log2_maxh0, lte_ue_pdsch_vars[eNB_id]->log2_maxh0,
lte_ue_pdsch_vars[eNB_id]->log2_maxh1); lte_ue_pdsch_vars[eNB_id]->log2_maxh1);
if (symbol == 5) { /* if (symbol == 5) {
write_output("rxF_comp_d00.m","rxF_c_d00",&lte_ue_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",&lte_ue_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_d01.m","rxF_c_d01",&lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rxF_comp_d01.m","rxF_c_d01",&lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
...@@ -461,33 +461,33 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -461,33 +461,33 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
write_output("rxF_comp_d11.m","rxF_c_d11",&lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM write_output("rxF_comp_d11.m","rxF_c_d11",&lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM
} } */
// compute correlation between signal and interference channels (rho12 and rho21) // compute correlation between signal and interference channels (rho12 and rho21)
dlsch_dual_stream_correlation(frame_parms,// this is doing h0'h1, needed for llr[1] dlsch_dual_stream_correlation(frame_parms, // this is doing h11'*h12 and h21'*h22
symbol, symbol,
nb_rb, nb_rb,
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
&(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]), &(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]),
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->log2_maxh0); lte_ue_pdsch_vars[eNB_id]->log2_maxh0);
//printf("rho stream1 =%d\n", &lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] ); //printf("rho stream1 =%d\n", &lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] );
//to be optimized (just take complex conjugate) //to be optimized (just take complex conjugate)
dlsch_dual_stream_correlation(frame_parms, // this is doing h1'h0, needed for llr[0] dlsch_dual_stream_correlation(frame_parms, // this is doing h12'*h11 and h22'*h21
symbol, symbol,
nb_rb, nb_rb,
&(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]), &(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]),
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->log2_maxh1); lte_ue_pdsch_vars[eNB_id]->log2_maxh1);
// printf("rho stream2 =%d\n",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext ); // printf("rho stream2 =%d\n",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext );
//printf("TM3 log2_maxh : %d\n",lte_ue_pdsch_vars[eNB_id]->log2_maxh); //printf("TM3 log2_maxh : %d\n",lte_ue_pdsch_vars[eNB_id]->log2_maxh);
if (symbol == 5) { /* if (symbol == 5) {
write_output("rho0_0.m","rho0_0",&lte_ue_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_0.m","rho0_0",&lte_ue_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("rho2_0.m","rho2_0",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rho2_0.m","rho2_0",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
...@@ -495,7 +495,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -495,7 +495,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
write_output("rho2_1.m","rho2_1",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM write_output("rho2_1.m","rho2_1",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM
} } */
} }
else { else {
...@@ -677,11 +677,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -677,11 +677,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
1); 1);
if (symbol == 5) { /* if (symbol == 5) {
write_output("rho0_mrc.m","rho0_0",&lte_ue_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",&lte_ue_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("rho2_mrc.m","rho2_0",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rho2_mrc.m","rho2_0",&lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
} } */
} }
...@@ -753,7 +753,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -753,7 +753,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
dlsch_qpsk_qpsk_llr(frame_parms, dlsch_qpsk_qpsk_llr(frame_parms,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -762,7 +762,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -762,7 +762,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
dlsch_qpsk_qpsk_llr(frame_parms, dlsch_qpsk_qpsk_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
...@@ -774,7 +774,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -774,7 +774,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -784,7 +784,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -784,7 +784,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
...@@ -796,7 +796,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -796,7 +796,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -806,7 +806,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -806,7 +806,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
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),
...@@ -831,7 +831,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -831,7 +831,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
...@@ -841,7 +841,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -841,7 +841,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
...@@ -854,7 +854,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -854,7 +854,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
...@@ -865,7 +865,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -865,7 +865,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
...@@ -878,7 +878,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -878,7 +878,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,subframe,symbol),
...@@ -889,7 +889,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -889,7 +889,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
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),
...@@ -915,7 +915,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -915,7 +915,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0, lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -925,7 +925,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -925,7 +925,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr, rxdataF_comp_ptr,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,subframe,symbol),
...@@ -938,7 +938,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -938,7 +938,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -949,7 +949,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -949,7 +949,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,subframe,symbol),
...@@ -962,7 +962,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -962,7 +962,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0, lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[0], lte_ue_pdsch_vars[eNB_id]->llr[0],
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),
...@@ -973,7 +973,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -973,7 +973,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i lte_ue_pdsch_vars[eNB_id]->dl_ch_mag0,//i
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round],
lte_ue_pdsch_vars[eNB_id]->llr[1], lte_ue_pdsch_vars[eNB_id]->llr[1],
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),
......
...@@ -740,7 +740,8 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -740,7 +740,8 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
1, 1,
len); len);
printf ("Got x0*rho_a\n");
// printf ("Got x0*rho_a\n");
mult_cpx_vector((int16_t *)rho_amp_x0, mult_cpx_vector((int16_t *)rho_amp_x0,
(int16_t *)rho_1, (int16_t *)rho_1,
...@@ -749,30 +750,32 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -749,30 +750,32 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
13); 13);
write_output("rho_rho.m","rho2", rho_rho_amp_x0,len,1,1); write_output("rho_rho.m","rho2", rho_rho_amp_x0,len,1,1);
printf ("Computed rho*rho_a*x0\n"); // printf ("Computed rho*rho_a*x0\n");
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("clean_x1.m","x1", clean_x1,len,1,1); write_output("clean_x1.m","x1", clean_x1,len,1,1);
printf ("Interference removed \n"); // printf ("Interference removed \n");
printf("dlsch_qpsk_llr_SIC: 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_SIC: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
//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 = rxF[i]; *llr16 =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++;
} }
} }
printf("dlsch_qpsk_llr_SIC: acc_len=%d\n",len_acc); // printf("dlsch_qpsk_llr_SIC: acc_len=%d\n",len_acc);
return(0); return(0);
} }
...@@ -900,7 +903,7 @@ void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -900,7 +903,7 @@ void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
#endif #endif
} }
void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms, void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
int32_t **rxdataF_comp, int32_t **rxdataF_comp,
int16_t *dlsch_llr, int16_t *dlsch_llr,
int32_t **dl_ch_mag, int32_t **dl_ch_mag,
......
...@@ -882,6 +882,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -882,6 +882,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
break; break;
} }
if (dlsch1_harq) {
switch (mod_order1) { switch (mod_order1) {
case 2: //QPSK case 2: //QPSK
...@@ -974,6 +976,7 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -974,6 +976,7 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
} }
} }
}
if (mimo_mode == ALAMOUTI) { if (mimo_mode == ALAMOUTI) {
...@@ -1639,7 +1642,7 @@ int dlsch_modulation_SIC(mod_sym_t **sic_buffer, ...@@ -1639,7 +1642,7 @@ int dlsch_modulation_SIC(mod_sym_t **sic_buffer,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
amp=1; //we do full scale here for SIC amp=1; //we do full scale here for SIC
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15)); gain_lin_QPSK = (int16_t)((ONE_OVER_SQRT2_Q15));
jj = 0; jj = 0;
i = 0; i = 0;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
#define DEBUG_PC 0 //#define DEBUG_PC 0
/* /*
double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0}, double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0},
{ 5.0/4.0,1.0,3.0/4.0,1.0/2.0}}; { 5.0/4.0,1.0,3.0/4.0,1.0/2.0}};
......
...@@ -169,7 +169,7 @@ int mult_cpx_vector(int16_t *x1, ...@@ -169,7 +169,7 @@ int mult_cpx_vector(int16_t *x1,
x2_128 = (simd_q15_t *)&x2[0]; x2_128 = (simd_q15_t *)&x2[0];
y_128 = (simd_q15_t *)&y[0]; y_128 = (simd_q15_t *)&y[0];
//print_shorts("x1_128:",&x1_128[0]); //print_shorts("x1_128:",&x1_128[0]);
//print_shorts("x2_128:",&x2_128[0]); // print_shorts("x2_128:",&x2_128[0]);
//right shift by 13 while p_a * x0 and 15 while //right shift by 13 while p_a * x0 and 15 while
// we compute 4 cpx multiply for each loop // we compute 4 cpx multiply for each loop
......
...@@ -3520,7 +3520,7 @@ n(tikz_fname,"w"); ...@@ -3520,7 +3520,7 @@ n(tikz_fname,"w");
if (ret <= PHY_vars_UE->dlsch_ue[0][cw_non_sic]->max_turbo_iterations ) { if (ret <= PHY_vars_UE->dlsch_ue[0][cw_non_sic]->max_turbo_iterations ) {
printf("ret=%d\n", ret);
if (cw_non_sic==0) { if (cw_non_sic==0) {
avg_iter += ret; avg_iter += ret;
iter_trials++; iter_trials++;
...@@ -3649,7 +3649,7 @@ n(tikz_fname,"w"); ...@@ -3649,7 +3649,7 @@ n(tikz_fname,"w");
(PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) && (PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) &&
rx_type==rx_SIC_dual_stream) { rx_type==rx_SIC_dual_stream) {
for (round = 0 ; round < 1 ; round++) { // for (round = 0 ; round < 1 ; round++) {
dlsch0_ue_harq = PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]; dlsch0_ue_harq = PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid];
dlsch0_eNB_harq = PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]; dlsch0_eNB_harq = PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid];
...@@ -3676,6 +3676,7 @@ n(tikz_fname,"w"); ...@@ -3676,6 +3676,7 @@ n(tikz_fname,"w");
&PHY_vars_UE->dlsch_rate_matching_stats, &PHY_vars_UE->dlsch_rate_matching_stats,
&PHY_vars_UE->dlsch_turbo_encoding_stats, &PHY_vars_UE->dlsch_turbo_encoding_stats,
&PHY_vars_UE->dlsch_interleaving_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,
...@@ -3698,7 +3699,7 @@ n(tikz_fname,"w"); ...@@ -3698,7 +3699,7 @@ n(tikz_fname,"w");
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);
...@@ -3716,7 +3717,7 @@ n(tikz_fname,"w"); ...@@ -3716,7 +3717,7 @@ n(tikz_fname,"w");
dlsch0_eNB_harq->nb_rb, dlsch0_eNB_harq->nb_rb,
adjust_G2(&PHY_vars_UE->lte_frame_parms,&dlsch0_eNB_harq->rb_alloc[0],2,subframe,num_pdcch_symbols), adjust_G2(&PHY_vars_UE->lte_frame_parms,&dlsch0_eNB_harq->rb_alloc[0],2,subframe,num_pdcch_symbols),
PHY_vars_UE->dlsch_ue[eNB_id][0]); PHY_vars_UE->dlsch_ue[eNB_id][0]);
}// round // }// round
write_output("rxdata_llr1.m","llr1", PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],re_allocated*2,1,0); write_output("rxdata_llr1.m","llr1", PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],re_allocated*2,1,0);
......
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