Commit 25304e46 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 1cc78fd1
......@@ -212,7 +212,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
subframe,
phy_vars_ue->high_speed_flag,
frame_parms,
dlsch0_harq->mimo_mode);
dlsch0_harq->mimo_mode);
//#ifdef DEBUG_DLSCH_MOD
/* printf("dlsch: using pmi %lx, rb_alloc %x, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),*rballoc);
for (rb=0;rb<nb_rb;rb++)
......@@ -307,7 +307,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
if (dlsch0_harq->mimo_mode<LARGE_CDD) {// SISO or ALAMOUTI
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,
......@@ -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);
}
......@@ -625,11 +625,11 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
nb_rb);
if (first_symbol_flag==1) {
dlsch_channel_level(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
avg,
symbol,
nb_rb);
dlsch_channel_level(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
avg,
symbol,
nb_rb);
#ifdef DEBUG_PHY
LOG_D(PHY,"[DLSCH] avg[0] %d\n",avg[0]);
#endif
......@@ -4249,7 +4249,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
unsigned char subframe,
uint32_t high_speed_flag,
LTE_DL_FRAME_PARMS *frame_parms,
MIMO_mode_t mimo_mode) {
MIMO_mode_t mimo_mode) {
int prb,nb_rb=0;
int prb_off,prb_off2;
......@@ -4388,9 +4388,9 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
memcpy(dl_ch0_ext,dl_ch0p,12*sizeof(int));
memcpy(dl_ch1_ext,dl_ch1p,12*sizeof(int));
memcpy(rxF_ext,rxF,12*sizeof(int));
dl_ch0_ext +=12;
dl_ch1_ext +=12;
rxF_ext +=12;
dl_ch0_ext +=12;
dl_ch1_ext +=12;
rxF_ext +=12;
} else { // pilots==1
j=0;
for (i=0; i<12; i++) {
......
......@@ -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