Commit 6dd87747 authored by knopp's avatar knopp

Fixes TM2 UE performance. Issues were related to improper RE extraction for 5 MHz channels.

parent 29000fee
......@@ -53,7 +53,7 @@
#endif
//#define DEBUG_PHY 1
//#define DEBUG_DLSCH_DEMOD 1
#define DEBUG_DLSCH_DEMOD 1
int avg[4];
......@@ -3098,12 +3098,14 @@ void dlsch_alamouti(LTE_DL_FRAME_PARMS *frame_parms,
// Alamouti RX combining
// printf("Alamouti: symbol %d, rb %d, re %d: rxF0 (%d,%d,%d,%d), rxF1 (%d,%d,%d,%d)\n",symbol,rb,re,rxF0[0],rxF0[1],rxF0[2],rxF0[3],rxF1[0],rxF1[1],rxF1[2],rxF1[3]);
rxF0[0] = rxF0[0] + rxF1[2];
rxF0[1] = rxF0[1] - rxF1[3];
rxF0[2] = rxF0[2] - rxF1[0];
rxF0[3] = rxF0[3] + rxF1[1];
// printf("Alamouti: rxF0 after (%d,%d,%d,%d)\n",rxF0[0],rxF0[1],rxF0[2],rxF0[3]);
rxF0+=4;
rxF1+=4;
......@@ -3818,6 +3820,9 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
else
rb_alloc_ind = 0;
if (rb_alloc_ind == 1)
nb_rb++;
// PBCH
if ((subframe==0) &&
(prb>((frame_parms->N_RB_DL>>1)-3)) &&
......@@ -3907,7 +3912,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
rxF_ext+=8;
} // pilots==1
nb_rb++;
} else { // Odd number of RBs
......@@ -3997,7 +4001,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
memcpy(dl_ch0_ext,dl_ch0p,12*sizeof(int32_t));
memcpy(dl_ch1_ext,dl_ch1p,12*sizeof(int32_t));
memcpy(rxF_ext,rxF,12*sizeof(int32_t));
for (i=0;i<12;i++)
// for (i=0;i<12;i++)
// printf("extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF_ext[i],*(1+(short*)&rxF_ext[i]));
dl_ch0_ext+=12;
dl_ch1_ext+=12;
......@@ -4050,7 +4054,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
rxF_ext+=8;
} //skip_half==0
} //pilots==1
nb_rb++;
} else { // Do middle RB (around DC)
if (pilots==0) {
......@@ -4067,7 +4070,7 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
dl_ch0p+=6;
dl_ch1p+=6;
rxF = &rxdataF[aarx][((symbol*(frame_parms->ofdm_symbol_size)))];
rxF = &rxdataF[aarx][1+((symbol*(frame_parms->ofdm_symbol_size)))];
memcpy(dl_ch0_ext,dl_ch0p,6*sizeof(int32_t));
memcpy(dl_ch1_ext,dl_ch1p,6*sizeof(int32_t));
......@@ -4090,14 +4093,14 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
//printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF[i],*(1+(short*)&rxF[i]));
}
}
rxF = &rxdataF[aarx][symbol*(frame_parms->ofdm_symbol_size)];
rxF = &rxdataF[aarx][1+symbol*(frame_parms->ofdm_symbol_size)];
for (; i<12; i++) {
if ((i!=((frame_parms->nushift+6)%12)) &&
(i!=((frame_parms->nushift+9)%12))) {
dl_ch0_ext[j]=dl_ch0p[i];
dl_ch1_ext[j]=dl_ch1p[i];
rxF_ext[j++]=rxF[(1+i-6)];
rxF_ext[j++]=rxF[(i-6)];
//printf("(pilots)extract rb %d, re %d => (%d,%d)\n",prb,i,*(short *)&rxF[1+i-6],*(1+(short*)&rxF[1+i-6]));
}
}
......@@ -4106,7 +4109,6 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
dl_ch1_ext+=8;
rxF_ext+=8;
} //pilots==1
nb_rb++;
} // if Middle PRB
} // if odd PRB
} // if rballoc==1
......
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