Commit 55c1f581 authored by lukashov's avatar lukashov

Fixing prec2A_TM4_128 in dlsch_demodulation.c

parent d56adbf3
......@@ -203,10 +203,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
frame_parms,
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++)
printf("%d",lte_ue_pdsch_vars[eNB_id]->pmi_ext[rb]);
printf("\n");
printf("dlsch: using pmi %lx, rb_alloc %x, pmi_ext %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),*rballoc,*lte_ue_pdsch_vars[eNB_id]->pmi_ext);
//#endif
if (rx_type==rx_IC_single_stream) {
......@@ -1384,20 +1381,18 @@ void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) {
ch0[0] = _mm_adds_epi16(tmp0,tmp1);
ch1[0] = _mm_subs_epi16(tmp0,tmp1);
}
else { //[1 j; 1 -j]
else {
tmp0 = ch0[0];
tmp1 = ch1[0];
ch0[0] = _mm_adds_epi16(tmp0,tmp1);
ch1[0] = _mm_subs_epi16(tmp0,tmp1);
//print_shorts("prec2A_TM4 ch0 (middle):",ch0);
//print_shorts("prec2A_TM4 ch1 (middle):",ch1);
ch1[0] = _mm_sign_epi16(ch1[0],*(__m128i*)&conjugate2[0]);
ch1[0] = _mm_shufflelo_epi16(ch1[0],_MM_SHUFFLE(2,3,0,1));
ch1[0] = _mm_shufflehi_epi16(ch1[0],_MM_SHUFFLE(2,3,0,1));
tmp1 = _mm_sign_epi16(ch1[0],*(__m128i*)&conjugate[0]);
tmp1 = _mm_shufflelo_epi16(tmp1,_MM_SHUFFLE(2,3,0,1));
tmp1 = _mm_shufflehi_epi16(tmp1,_MM_SHUFFLE(2,3,0,1));
ch0[0] = _mm_subs_epi16(tmp0,tmp1);
ch1[0] = _mm_adds_epi16(tmp0,tmp1);
}
//print_shorts("prec2A_TM4 ch0 (middle):",ch0);
//print_shorts("prec2A_TM4 ch1 (middle):",ch1);
//ch0[0] = _mm_mulhi_epi16(ch0[0],amp);
//ch0[0] = _mm_slli_epi16(ch0[0],1);
//ch1[0] = _mm_mulhi_epi16(ch1[0],amp);
......@@ -1907,7 +1902,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
}
}
else if (mimo_mode==DUALSTREAM_PUSCH_PRECODING) {
else if (mimo_mode==DUALSTREAM_PUSCH_PRECODING) {
prec2A_TM4_128(pmi_ext[rb],&dl_ch0_128[0],&dl_ch1_128[0]);
prec2A_TM4_128(pmi_ext[rb],&dl_ch0_128[1],&dl_ch1_128[1]);
......@@ -4142,16 +4137,14 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
rxF = &rxdataF[aarx][prb_off2+
(symbol*(frame_parms->ofdm_symbol_size))];
}
/*
if (mimo_mode <= PUSCH_PRECODING1)
*pmi_loc = (pmi>>((prb>>2)<<1))&3;
else
*pmi_loc=(pmi>>prb)&1;
*/
*pmi_loc = get_pmi(frame_parms->N_RB_DL,mimo_mode,pmi,prb);
pmi_loc++;
if (pilots == 0) {
......@@ -4286,17 +4279,14 @@ unsigned short dlsch_extract_rbs_dual(int **rxdataF,
#ifdef DEBUG_DLSCH_DEMOD
printf("symbol %d / rb %d: alloc %d skip_half %d (rxF %p, rxF_ext %p) prb_off (%d,%d)\n",symbol,prb,rb_alloc_ind,skip_half,rxF,rxF_ext,prb_off,prb_off2);
#endif
/*
if (mimo_mode <= PUSCH_PRECODING1)
*pmi_loc = (pmi>>((prb>>2)<<1))&3;
else
*pmi_loc=(pmi>>prb)&1;
*/
// printf("symbol_mod %d (pilots %d) rb %d, sb %d, pmi %d (pmi_loc %p,rxF %p, ch00 %p, ch01 %p, rxF_ext %p dl_ch0_ext %p dl_ch1_ext %p)\n",symbol_mod,pilots,prb,prb>>2,*pmi_loc,pmi_loc,rxF,dl_ch0, dl_ch1, rxF_ext,dl_ch0_ext,dl_ch1_ext);
*pmi_loc = get_pmi(frame_parms->N_RB_DL,mimo_mode,pmi,prb);
pmi_loc++;
if (prb != (frame_parms->N_RB_DL>>1)) { // This PRB is not around DC
if (pilots==0) {
if (skip_half==1) {
......@@ -4573,4 +4563,4 @@ void print_ints(char *s,__m128i *x)
tempb[0],tempb[1],tempb[2],tempb[3]);
}*/
#endif
#endif
\ No newline at end of file
......@@ -1234,7 +1234,7 @@ n(tikz_fname,"w");
((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->harq_pid = 0;
((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->mcs = mcs1;
((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->ndi = 0;
((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rv = 1;
((DCI1A_5MHz_TDD_1_6_t *)&DLSCH_alloc_pdu_1[k])->rv = 0;
break;
case 50:
dci_length = sizeof_DCI1A_10MHz_TDD_1_6_t;
......@@ -1662,7 +1662,7 @@ n(tikz_fname,"w");
((DCI2_1_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = 1;
((DCI2_1_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = 0;
((DCI2_1_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tb_swap = 0;
((DCI2_1_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 2;
((DCI2_1_5MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 1;
break;
case 25:
dci_length = sizeof_DCI2_5MHz_2A_TDD_t;
......@@ -1697,7 +1697,7 @@ n(tikz_fname,"w");
((DCI2_10MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = 1;
((DCI2_10MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = 0;
((DCI2_10MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tb_swap = 0;
((DCI2_10MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 2;
((DCI2_10MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 1;
break;
case 100:
......@@ -1713,7 +1713,7 @@ n(tikz_fname,"w");
((DCI2_20MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->ndi2 = 1;
((DCI2_20MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->rv2 = 0;
((DCI2_20MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tb_swap = 0;
((DCI2_20MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 2;
((DCI2_20MHz_2A_TDD_t *)&DLSCH_alloc_pdu_1[k])->tpmi = 1;
dci_length = sizeof_DCI2_20MHz_2A_TDD_t;
dci_length_bytes = sizeof(DCI2_20MHz_2A_TDD_t);
break;
......
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