Commit 17029141 authored by Elena Lukashova's avatar Elena Lukashova
Browse files

Going back to fixed shift in log2_approx for TM4. Playing with computing the...

Going back to fixed shift in log2_approx for TM4. Playing with computing the channel average in order to find optimal shift.
parent 9c41f88a
......@@ -420,11 +420,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
// scaling interfering channel (following for TM56)
dlsch_scale_channel(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
/*dlsch_scale_channel(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
dlsch_ue,
symbol,
nb_rb);
nb_rb);*/
if (first_symbol_flag==1) {
......@@ -440,6 +440,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
if (rx_type>rx_standard) {
// interf_unaw_shift_tm4_mcs is to avoid tails in SNR/BLER curves
avg[0] = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(dlsch1_harq->Qm>>1)-1];
lte_ue_pdsch_vars[eNB_id]->log2_maxh0 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch0_harq->mcs];//+offset_mumimo_llr_drange[dlsch0_harq->mcs][(get_Qm(dlsch1_harq->mcs)>>1)-1];
lte_ue_pdsch_vars[eNB_id]->log2_maxh1 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch1_harq->mcs];//+offset_mumimo_llr_drange[dlsch1_harq->mcs][(get_Qm(dlsch0_harq->mcs)>>1)-1];
//printf("TM4 I-A shift layer1 = %d\n",interf_unaw_shift_tm4_mcs[dlsch0_harq->mcs]);
......@@ -450,8 +451,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
}
else
// to avoid tails in SNR/BLER curves
lte_ue_pdsch_vars[eNB_id]->log2_maxh0 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch0_harq->mcs];
lte_ue_pdsch_vars[eNB_id]->log2_maxh1 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch1_harq->mcs];
avg[0] = log2_approx(avg[0]) - 13 + interf_unaw_shift;
lte_ue_pdsch_vars[eNB_id]->log2_maxh = cmax(avg[0],0);
printf("TM4 I-UA shift = %d\n",interf_unaw_shift);
//lte_ue_pdsch_vars[eNB_id]->log2_maxh0 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch0_harq->mcs];
//lte_ue_pdsch_vars[eNB_id]->log2_maxh1 = (log2_approx(avg[0])/2) +interf_unaw_shift_tm4_mcs[dlsch1_harq->mcs];
//printf("TM4 I-UA shift layer1 = %d\n",interf_unaw_shift_tm4_mcs[dlsch0_harq->mcs]);
//printf("TM4 I-UA shift layer2 = %d\n",interf_unaw_shift_tm4_mcs[dlsch1_harq->mcs]);
}
......@@ -3073,7 +3077,8 @@ void dlsch_channel_level_TM34(int **dl_ch_estimates_ext,
dl_ch1_128 = (__m128i *)&dl_ch_estimates_ext[2+aarx][symbol*frame_parms->N_RB_DL*12];
for (rb=0; rb<nb_rb; rb++) {
avg128D = _mm_setzero_si128();
dl_ch0_128_tmp = _mm_load_si128(&dl_ch0_128[0]);
dl_ch1_128_tmp = _mm_load_si128(&dl_ch1_128[0]);
......
......@@ -790,14 +790,14 @@ int main(int argc, char **argv)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_u%d_imod%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1,mcs_i,rx_type,i_mod);
else if (abstx == 1)
if (perfect_ce==1)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_ab_perf_ce_lut.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_%d_nrx%d_mcs%d_mcsi%d_ab_perf_ce_sh%d_3mod.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx,mcs1, mcs2,interf_unaw_shift );
else
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_ab_lut.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_%d_nrx%d_mcs%d_mcsi%d_ab_sh%d_3mod.csv",transmission_mode,rx_type,channel_model, n_frames, n_rx,mcs1, mcs2,interf_unaw_shift );
else //abstx=0
if (perfect_ce==1)
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi%d_perf_ce_lut.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_%d_nrx%d_mcs%d_mcsi%d_perf_ce_sh%d_3mod.csv",transmission_mode,rx_type,channel_model,n_frames, n_rx,mcs1, mcs2, interf_unaw_shift);
else
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_nrx%d_mcs%d_mcsi_lut%d.csv",transmission_mode,rx_type,channel_model,n_rx,mcs1, mcs2);
sprintf(bler_fname,"bler_tx%d_rec%d_chan%d_%d_nrx%d_mcs%d_mcsi%d_sh%d_3mod.csv",transmission_mode,rx_type,channel_model,n_frames,n_rx,mcs1, mcs2, interf_unaw_shift);
bler_fd = fopen(bler_fname,"w");
if (bler_fd==NULL) {
......@@ -833,9 +833,9 @@ int main(int argc, char **argv)
else
if (perfect_ce==1)
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab_perf_ce.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds);
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab_perf_ce_sh%d_3mod.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, interf_unaw_shift);
else
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds);
sprintf(csv_fname,"dataout_tx%d_rec%d_mcs%d_mcsi%d_chan%d_ns%d_R%d_ab_sh%d_3mod.m",transmission_mode,rx_type,mcs1,mcs2,channel_model,n_frames,num_rounds, interf_unaw_shift);
// sprintf(csv_fname,"dataout_tx%d_mcs%d_mcs_interf%d_chan%d_nsimus%d_R%d_abstr_old.m",transmission_mode,mcs1,mcs2,channel_model,n_frames,num_rounds);
csv_fd = fopen(csv_fname,"w");
......
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