extrac_cqi translates pmi_dual into pmi_single

This commit is contained in:
Florian Kaltenberger
2015-11-30 16:58:08 +01:00
parent 13752a6768
commit 000e60c193
2 changed files with 6 additions and 2 deletions
@@ -1257,9 +1257,9 @@ uint8_t get_pmi(uint8_t N_RB_DL,LTE_DL_eNB_HARQ_t *dlsch_harq,uint16_t rb)
// printf("Getting pmi for RB %d => %d\n",rb,(pmi_alloc>>((rb>>2)<<1))&3);
switch (N_RB_DL) {
case 6: // 1 PRB per subband
if (mode <= PUSCH_PRECODING1)
if (mode <= PUSCH_PRECODING1) //single layer
return((pmi_alloc>>(rb<<1))&3);
else
else //two layer
return((pmi_alloc>>rb)&1);
break;
+4
View File
@@ -285,6 +285,10 @@ void extract_CQI(void *o,UCI_format_t uci_format,LTE_eNB_UE_stats *stats, uint8_
stats->DL_cqi[1] = 24;
stats->DL_pmi_dual = ((wideband_cqi_rank2_2A_5MHz *)o)->pmi;
//this translates the 2-layer PMI into a single layer PMI for the first codeword
//the PMI for the second codeword will be stats->DL_pmi_single^0x1555
for (i=0;i<7;i++)
stats->DL_pmi_single&(1<<(2*i)) = (stats->DL_pmi_dual&(1<i))*2;
break;
case HLC_subband_cqi_nopmi: