Commit 11dc7d2b authored by Elena Lukashova's avatar Elena Lukashova
Browse files

extension to tmpi 2 for TM4

parent cf2b532a
...@@ -119,6 +119,7 @@ endmacro(add_list_string_option) ...@@ -119,6 +119,7 @@ endmacro(add_list_string_option)
#################################################### ####################################################
# compilation flags # compilation flags
############################################# #############################################
set (CMAKE_BUILD_TYPE "Debug")
if (CMAKE_BUILD_TYPE STREQUAL "") if (CMAKE_BUILD_TYPE STREQUAL "")
set(CMAKE_BUILD_TYPE "RelWithDebInfo") set(CMAKE_BUILD_TYPE "RelWithDebInfo")
endif() endif()
......
...@@ -872,7 +872,8 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -872,7 +872,8 @@ int generate_eNB_dlsch_params_from_dci(int frame,
uint16_t si_rnti, uint16_t si_rnti,
uint16_t ra_rnti, uint16_t ra_rnti,
uint16_t p_rnti, uint16_t p_rnti,
uint16_t DL_pmi_single) uint16_t DL_pmi_single
)
{ {
uint8_t harq_pid = UINT8_MAX; uint8_t harq_pid = UINT8_MAX;
...@@ -1538,14 +1539,14 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -1538,14 +1539,14 @@ int generate_eNB_dlsch_params_from_dci(int frame,
case 0: case 0:
dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0,1);
dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,0,1);
break; break;
case 1: case 1:
dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,1);
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,1);
break; break;
case 2: // PUSCH precoding case 2: // PUSCH precoding
dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
...@@ -1566,19 +1567,19 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -1566,19 +1567,19 @@ int generate_eNB_dlsch_params_from_dci(int frame,
break; break;
case 1: case 1:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 0);
break; break;
case 2: case 2:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0);
break; break;
case 3: case 3:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0);
break; break;
case 4: case 4:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0);
break; break;
case 5: case 5:
dlsch0_harq->mimo_mode = PUSCH_PRECODING0; dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
...@@ -2108,12 +2109,13 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -2108,12 +2109,13 @@ int generate_eNB_dlsch_params_from_dci(int frame,
rballoc, rballoc,
frame_parms->N_RB_DL, frame_parms->N_RB_DL,
dlsch0_harq->rb_alloc); dlsch0_harq->rb_alloc);
dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
dlsch1_harq->rb_alloc[0] = dlsch0_harq->rb_alloc[0];
dlsch0_harq->nb_rb = conv_nprb(rah, dlsch0_harq->nb_rb = conv_nprb(rah,
rballoc, rballoc,
frame_parms->N_RB_DL); frame_parms->N_RB_DL);
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb; dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
dlsch0_harq->mcs = mcs1; dlsch0_harq->mcs = mcs1;
dlsch1_harq->mcs = mcs2; dlsch1_harq->mcs = mcs2;
...@@ -2557,27 +2559,27 @@ int generate_eNB_dlsch_params_from_dci(int frame, ...@@ -2557,27 +2559,27 @@ int generate_eNB_dlsch_params_from_dci(int frame,
case 1: case 1:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 0);
break; break;
case 2: case 2:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0);
break; break;
case 3: case 3:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0);
break; break;
case 4: case 4:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0);
break; break;
case 5: case 5:
dlsch0_harq->mimo_mode = PUSCH_PRECODING0; dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
dlsch0_harq->pmi_alloc = DL_pmi_single; dlsch0_harq->pmi_alloc = DL_pmi_single;
break; break;
case 6: case 6:
...@@ -4795,14 +4797,14 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -4795,14 +4797,14 @@ int generate_ue_dlsch_params_from_dci(int frame,
case 0: case 0:
dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1; dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODING1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 1);
dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,0, 1);
break; break;
case 1: case 1:
dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; dlsch0_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj; dlsch1_harq->mimo_mode = DUALSTREAM_UNIFORM_PRECODINGj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1,1);
dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch1_harq->pmi_alloc = pmi_extend(frame_parms,1, 1);
break; break;
case 2: // PUSCH precoding case 2: // PUSCH precoding
dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING; dlsch0_harq->mimo_mode = DUALSTREAM_PUSCH_PRECODING;
...@@ -4822,19 +4824,19 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -4822,19 +4824,19 @@ int generate_ue_dlsch_params_from_dci(int frame,
break; break;
case 1: case 1:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0, 0);
break; break;
case 2: case 2:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0);
break; break;
case 3: case 3:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0);
break; break;
case 4: case 4:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0);
break; break;
case 5: case 5:
dlsch0_harq->mimo_mode = PUSCH_PRECODING0; dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
...@@ -5523,28 +5525,28 @@ int generate_ue_dlsch_params_from_dci(int frame, ...@@ -5523,28 +5525,28 @@ int generate_ue_dlsch_params_from_dci(int frame,
case 1: case 1:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING11; dlsch0_harq->mimo_mode = UNIFORM_PRECODING11;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,0,0);
break; break;
case 2: case 2:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1m1;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,1, 0);
break; break;
case 3: case 3:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1j;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,2, 0);
break; break;
case 4: case 4:
dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj; dlsch0_harq->mimo_mode = UNIFORM_PRECODING1mj;
dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3); dlsch0_harq->pmi_alloc = pmi_extend(frame_parms,3, 0);
break; break;
case 5: case 5:
dlsch0_harq->mimo_mode = PUSCH_PRECODING0; dlsch0_harq->mimo_mode = PUSCH_PRECODING0;
// pmi stored from ulsch allocation routine // pmi stored from ulsch allocation routine
dlsch0_harq->pmi_alloc = dlsch0->pmi_alloc; dlsch0_harq->pmi_alloc = dlsch0->pmi_alloc;
//LOG_I(PHY,"XXX using PMI %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc)); //LOG_I(PHY,"XXX using PMI %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc));
break; break;
...@@ -5779,7 +5781,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb) ...@@ -5779,7 +5781,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
int i, aarx; int i, aarx;
uint16_t pmiq=0; uint16_t pmiq=0;
uint16_t pmivect = 0; uint32_t pmivect = 0; // work with tyoe
uint8_t rank = meas->rank[eNB_id]; uint8_t rank = meas->rank[eNB_id];
int pmi_re,pmi_im; int pmi_re,pmi_im;
int nb_subbands=0; int nb_subbands=0;
...@@ -5827,18 +5829,20 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb) ...@@ -5827,18 +5829,20 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
// printf("subband %d, pmi%d \n",i,pmiq); // printf("subband %d, pmi%d \n",i,pmiq);
pmivect |= (pmiq<<(2*i)); pmivect |= (pmiq<<(2*i));
} }
else if (rank==1) { else if (rank==1) {
for (aarx=0; aarx<meas->nb_antennas_rx; aarx++) { for (aarx=0; aarx<meas->nb_antennas_rx; aarx++) {
pmi_re += meas->subband_pmi_re[eNB_id][i][aarx]; pmi_re += meas->subband_pmi_re[eNB_id][i][aarx];
pmi_im += meas->subband_pmi_im[eNB_id][i][aarx]; pmi_im += meas->subband_pmi_im[eNB_id][i][aarx];
} }
if (pmi_re > pmi_im) if (pmi_re > pmi_im)
pmiq = PMI_2A_11; pmiq = PMI_2A_R1_11;
else if (pmi_re < pmi_im) else if (pmi_re < pmi_im)
pmiq = PMI_2A_1m1; pmiq = PMI_2A_R1_1j;
printf("subband %d, pmi%d \n",i,pmiq); printf("subband %d, pmi%d \n",i,pmiq);
pmivect |= (pmiq<<(2*i)); //According to Section 7.2.4 of 36.213
pmivect |= ((pmiq-1)<<(i)); //shift 1 since only one bit
printf("subband %d pmivect %d \n",i, pmivect); printf("subband %d pmivect %d \n",i, pmivect);
} }
else { else {
...@@ -6282,14 +6286,31 @@ void reset_cba_uci(void *o) ...@@ -6282,14 +6286,31 @@ void reset_cba_uci(void *o)
((HLC_subband_cqi_mcs_CBA_5MHz *)o)->crnti = 0x0; ((HLC_subband_cqi_mcs_CBA_5MHz *)o)->crnti = 0x0;
} }
uint32_t pmi_extend(LTE_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi) uint32_t pmi_extend(LTE_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi, uint8_t rank)
{ {
uint8_t i,wideband_pmi2=wideband_pmi&3; uint8_t i,wideband_pmi2;
uint32_t pmi_ex = 0; uint32_t pmi_ex = 0;
for (i=0; i<14; i+=2) if (frame_parms->N_RB_DL!=25) {
pmi_ex|=(wideband_pmi2<<i); LOG_E(PHY,"pmi_extend not yet implemented for anything else than 25PRB\n");
return(-1);
}
if (rank==0) {
wideband_pmi2=wideband_pmi&3;
for (i=0; i<14; i+=2)
pmi_ex|=(wideband_pmi2<<i);
}
else if (rank==1) {
wideband_pmi2=wideband_pmi&1;
for (i=0; i<7; i++)
pmi_ex|=(wideband_pmi2<<i);
}
else {
LOG_E(PHY,"unsupported rank\n");
return(-1);
}
return(pmi_ex); return(pmi_ex);
} }
......
...@@ -87,11 +87,17 @@ ...@@ -87,11 +87,17 @@
#if !defined(C_RNTI) #if !defined(C_RNTI)
#define C_RNTI (rnti_t)0x1234 #define C_RNTI (rnti_t)0x1234
#endif #endif
// These are the codebook indexes according to Table 6.3.4.2.3-1 of 36.211
#define PMI_2A_11 0 //1 layer
#define PMI_2A_11 0
#define PMI_2A_1m1 1 #define PMI_2A_1m1 1
#define PMI_2A_1j 2 #define PMI_2A_1j 2
#define PMI_2A_1mj 3 #define PMI_2A_1mj 3
//2 layers
#define PMI_2A_R1_10 0
#define PMI_2A_R1_11 1
#define PMI_2A_R1_1j 2
typedef enum { typedef enum {
SCH_IDLE, SCH_IDLE,
......
...@@ -51,6 +51,9 @@ ...@@ -51,6 +51,9 @@
#define NOCYGWIN_STATIC #define NOCYGWIN_STATIC
#endif #endif
//#undef LOG_D
//#define LOG_D LOG_I
//#define DEBUG_PHY 1 //#define DEBUG_PHY 1
//#define DEBUG_DLSCH_DEMOD 1 //#define DEBUG_DLSCH_DEMOD 1
...@@ -107,6 +110,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -107,6 +110,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
int32_t **rxdataF_comp_ptr; int32_t **rxdataF_comp_ptr;
int32_t **dl_ch_mag_ptr; int32_t **dl_ch_mag_ptr;
switch (type) { switch (type) {
case SI_PDSCH: case SI_PDSCH:
lte_ue_pdsch_vars = &phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id]; lte_ue_pdsch_vars = &phy_vars_ue->lte_ue_pdsch_vars_SI[eNB_id];
...@@ -167,10 +172,13 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -167,10 +172,13 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
else else
rballoc = dlsch0_harq->rb_alloc_even; rballoc = dlsch0_harq->rb_alloc_even;
if (dlsch0_harq->mimo_mode>DUALSTREAM_UNIFORM_PRECODINGj) { if (dlsch0_harq->mimo_mode>DUALSTREAM_PUSCH_PRECODING) {
LOG_E(PHY,"This transmission mode is not yet supported!\n"); LOG_E(PHY,"This transmission mode is not yet supported!\n");
return(-1); return(-1);
} }
if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) { if ((dlsch0_harq->mimo_mode==LARGE_CDD) || ((dlsch0_harq->mimo_mode>=DUALSTREAM_UNIFORM_PRECODING1) && (dlsch0_harq->mimo_mode<=DUALSTREAM_PUSCH_PRECODING))) {
DevAssert(dlsch1_harq); DevAssert(dlsch1_harq);
if (eNB_id!=eNB_id_i) { if (eNB_id!=eNB_id_i) {
...@@ -182,9 +190,9 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -182,9 +190,9 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
//printf("rx_pdsch: harq_pid=%d, round=%d\n",harq_pid,round); //printf("rx_pdsch: harq_pid=%d, round=%d\n",harq_pid,round);
if (frame_parms->nb_antennas_tx_eNB>1) { if (frame_parms->nb_antennas_tx_eNB>1) {
#ifdef DEBUG_DLSCH_MOD //#ifdef DEBUG_DLSCH_MOD
LOG_I(PHY,"dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch_ue[0],dlsch0_harq->rb_alloc_even[0]); //printf("dlsch: using pmi %x (%p), rb_alloc %x\n",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc),dlsch_ue[0],dlsch0_harq->rb_alloc_even[0]);
#endif //#endif
nb_rb = dlsch_extract_rbs_dual(lte_ue_common_vars->rxdataF, nb_rb = dlsch_extract_rbs_dual(lte_ue_common_vars->rxdataF,
lte_ue_common_vars->dl_ch_estimates[eNB_id], lte_ue_common_vars->dl_ch_estimates[eNB_id],
lte_ue_pdsch_vars[eNB_id]->rxdataF_ext, lte_ue_pdsch_vars[eNB_id]->rxdataF_ext,
...@@ -195,7 +203,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -195,7 +203,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
symbol, symbol,
subframe, subframe,
phy_vars_ue->high_speed_flag, phy_vars_ue->high_speed_flag,
frame_parms); frame_parms,
dlsch0_harq->mimo_mode);
if (rx_type==rx_IC_single_stream) { if (rx_type==rx_IC_single_stream) {
if (eNB_id_i<phy_vars_ue->n_connected_eNB) // we are in TM5 if (eNB_id_i<phy_vars_ue->n_connected_eNB) // we are in TM5
...@@ -209,7 +218,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -209,7 +218,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
symbol, symbol,
subframe, subframe,
phy_vars_ue->high_speed_flag, phy_vars_ue->high_speed_flag,
frame_parms); frame_parms,
dlsch0_harq->mimo_mode);
else else
nb_rb = dlsch_extract_rbs_dual(lte_ue_common_vars->rxdataF, nb_rb = dlsch_extract_rbs_dual(lte_ue_common_vars->rxdataF,
lte_ue_common_vars->dl_ch_estimates[eNB_id], lte_ue_common_vars->dl_ch_estimates[eNB_id],
...@@ -221,7 +231,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -221,7 +231,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
symbol, symbol,
subframe, subframe,
phy_vars_ue->high_speed_flag, phy_vars_ue->high_speed_flag,
frame_parms); frame_parms,
dlsch0_harq->mimo_mode);
} }
} // if n_tx>1 } // if n_tx>1
else { else {
...@@ -406,7 +417,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -406,7 +417,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
// effective channel of desired user is always stronger than interfering eff. channel // effective channel of desired user is always stronger than interfering eff. channel
dlsch_channel_level_TM34(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, dlsch_channel_level_TM34(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
lte_ue_pdsch_vars[eNB_id]->pmi_ext,
avg, avg,
symbol, symbol,
nb_rb, nb_rb,
...@@ -418,8 +430,6 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -418,8 +430,6 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(get_Qm(dlsch1_harq->mcs)>>1)-1]; lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(get_Qm(dlsch1_harq->mcs)>>1)-1];
} }
else else
lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0])/2; lte_ue_pdsch_vars[eNB_id]->log2_maxh = log2_approx(avg[0])/2;
} }
...@@ -488,7 +498,12 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -488,7 +498,12 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
// effective channel of desired user is always stronger than interfering eff. channel // effective channel of desired user is always stronger than interfering eff. channel
dlsch_channel_level_TM56(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, frame_parms, lte_ue_pdsch_vars[eNB_id]->pmi_ext, avg, symbol, nb_rb); dlsch_channel_level_TM56(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
frame_parms,
lte_ue_pdsch_vars[eNB_id]->pmi_ext,
avg,
symbol,
nb_rb);
// LOG_D(PHY,"llr_offset = %d\n",offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1]); // LOG_D(PHY,"llr_offset = %d\n",offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1]);
avg[0] = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1]; avg[0] = log2_approx(avg[0]) - 13 + offset_mumimo_llr_drange[dlsch0_harq->mcs][(i_mod>>1)-1];
...@@ -949,7 +964,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue, ...@@ -949,7 +964,7 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
LOG_W(PHY,"rx_dlsch.c : Unknown mod_order!!!!\n"); LOG_W(PHY,"rx_dlsch.c : Unknown mod_order!!!!\n");
return(-1); return(-1);
break; break;
} }
return(0); return(0);
} }
...@@ -1388,7 +1403,8 @@ void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) { ...@@ -1388,7 +1403,8 @@ void prec2A_TM4_128(int pmi,__m128i *ch0,__m128i *ch1) {
ch0[0] = _mm_srai_epi16(ch0[0],1); //divide by 2 ch0[0] = _mm_srai_epi16(ch0[0],1); //divide by 2
ch1[0] = _mm_srai_epi16(ch1[0],1); //divide by 2 ch1[0] = _mm_srai_epi16(ch1[0],1); //divide by 2
_mm_empty();
_m_empty();
// print_shorts("prec2A_TM4 ch0 (end):",ch0); // print_shorts("prec2A_TM4 ch0 (end):",ch0);
//print_shorts("prec2A_TM4 ch1 (end):",ch1); //print_shorts("prec2A_TM4 ch1 (end):",ch1);
} }
...@@ -1814,6 +1830,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1814,6 +1830,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
int **dl_ch_magb1 = lte_ue_pdsch_vars->dl_ch_magb1; int **dl_ch_magb1 = lte_ue_pdsch_vars->dl_ch_magb1;
int **rxdataF_comp0 = lte_ue_pdsch_vars->rxdataF_comp0; int **rxdataF_comp0 = lte_ue_pdsch_vars->rxdataF_comp0;
int **rxdataF_comp1 = lte_ue_pdsch_vars->rxdataF_comp1[harq_pid][round]; int **rxdataF_comp1 = lte_ue_pdsch_vars->rxdataF_comp1[harq_pid][round];
unsigned char **pmi_ext = lte_ue_pdsch_vars->pmi_ext;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp0_128b,QAM_amp1_128,QAM_amp1_128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp0_128b,QAM_amp1_128,QAM_amp1_128b;
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
...@@ -1884,6 +1901,17 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -1884,6 +1901,17 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
prec2A_TM4_128(1,&dl_ch0_128[2],&dl_ch1_128[2]); prec2A_TM4_128(1,&dl_ch0_128[2],&dl_ch1_128[2]);
} }
} }
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]);
if (pilots==0) {
prec2A_TM4_128(pmi_ext[rb],&dl_ch0_128[2],&dl_ch1_128[2]);