Commit e202953c authored by lukashov's avatar lukashov

1.Fixing llr scaling for TM1 and TM2 in dlsch_demodulation.c

2.Fixing modulation for TM2 in dlsch_modulation.c
The branch now passes dlsim tests.
parent 54bce415
......@@ -330,7 +330,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
// avgs = cmax(avgs,avg[(aarx<<1)+aatx]);
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2); //+ interf_unaw_shift_tm1_mcs[dlsch0_harq->mcs];
lte_ue_pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+1; //+ interf_unaw_shift_tm1_mcs[dlsch0_harq->mcs];
// printf("TM4 I-A log2_maxh0 = %d\n", lte_ue_pdsch_vars[eNB_id]->log2_maxh);
}
......
......@@ -410,10 +410,11 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
qam16_table_offset_im+=1;
*jj=*jj+1;
//((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
//((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
((int16_t *)&txdataF[0][tti_offset])[0]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[0][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
//((int16_t *)&txdataF[0][tti_offset])[0]+=(qam_table_s0[qam16_table_offset_re]*ONE_OVER_SQRT2_Q15)>>15;
//((int16_t *)&txdataF[0][tti_offset])[1]+=(qam_table_s0[qam16_table_offset_im]*ONE_OVER_SQRT2_Q15)>>15;
// Antenna 1 position n Real part -> -x1*
......@@ -435,11 +436,11 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
qam16_table_offset_im+=1;
*jj=*jj+1;
//((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
//((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[1][tti_offset])[0]+=-(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_re])>>15);
((int16_t *)&txdataF[1][tti_offset])[1]+=(int16_t)(((int32_t)amp*qam16_table[qam16_table_offset_im])>>15);
((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam16_table_offset_re];
((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
//((int16_t *)&txdataF[1][tti_offset])[0]+=-qam_table_s0[qam16_table_offset_re];
//((int16_t *)&txdataF[1][tti_offset])[1]+=qam_table_s0[qam16_table_offset_im];
break;
......@@ -1248,7 +1249,7 @@ int allocate_REs_in_RB_MCH(int32_t **txdataF,
return(0);
}
uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb)
uint8_t get_pmi(uint8_t N_RB_DL, MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb)
{
/*
MIMO_mode_t mode = dlsch_harq->mimo_mode;
......
......@@ -4025,8 +4025,10 @@ n(tikz_fname,"w");
round++;
} //round
//if ((errs[0][0]>=n_frames/10) && (trials>(n_frames/2)) )
// break;
if(transmission_mode != 3 && transmission_mode !=4 ){
if ((errs[0][0]>=n_frames/10) && (trials>(n_frames/2)) )
break;
}
//len = chbch_stats_read(stats_buffer,NULL,0,4096);
//printf("%s\n\n",stats_buffer);
......@@ -4183,21 +4185,21 @@ n(tikz_fname,"w");
round_trials[0],
errs[0][1],
errs[1][1],
round_trials[1],
round_trials[0],
errs[0][2],
errs[1][2],
round_trials[2],
round_trials[0],
errs[0][3],
errs[1][3],
round_trials[3],
round_trials[0],
(double)errs[0][0]/(round_trials[0]),
(double)errs[1][0]/(round_trials[0]),
(double)errs[0][1]/(round_trials[1]),
(double)errs[1][1]/(round_trials[1]),
(double)errs[0][2]/(round_trials[2]),
(double)errs[1][2]/(round_trials[2]),
(double)errs[0][3]/(round_trials[3]),
(double)errs[1][3]/(round_trials[3]),
(double)errs[0][1]/(round_trials[0]),
(double)errs[1][1]/(round_trials[0]),
(double)errs[0][2]/(round_trials[0]),
(double)errs[1][2]/(round_trials[0]),
(double)errs[0][3]/(round_trials[0]),
(double)errs[1][3]/(round_trials[0]),
dci_errors,
round_trials[0],
(double)dci_errors/(round_trials[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