Commit 139fc05f authored by Florian Kaltenberger's avatar Florian Kaltenberger

included receiver for 2nd stream for TM3 (not yet SIC!)

fixed some bugs in dlsim


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@6667 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 09999b3e
......@@ -882,6 +882,7 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
pdsch->pmi_ext = (uint8_t*)malloc16_clear( frame_parms->N_RB_DL );
pdsch->llr[0] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
pdsch->llr128 = (int16_t**)malloc16_clear( sizeof(int16_t*) );
pdsch->llr128_2ndstream = (int16_t**)malloc16_clear( sizeof(int16_t*) );
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
pdsch->rxdataF_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
......@@ -889,6 +890,7 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
pdsch->rho = (int32_t**)malloc16_clear( frame_parms->nb_antennas_rx*sizeof(int32_t*) );
pdsch->dl_ch_estimates_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_rho_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_rho2_ext = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_mag0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
pdsch->dl_ch_magb0 = (int32_t**)malloc16_clear( 8*sizeof(int32_t*) );
......@@ -904,6 +906,7 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
pdsch->rxdataF_comp0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_estimates_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_rho_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_rho2_ext[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_mag0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
pdsch->dl_ch_magb0[idx] = (int32_t*)malloc16_clear( sizeof(int32_t) * num );
}
......
......@@ -384,22 +384,29 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
dlsch0_harq->round,
nb_rb,
lte_ue_pdsch_vars[eNB_id]->log2_maxh);
// compute correlation between signal and interference channels
// compute correlation between signal and interference channels (rho12 and rho21)
dlsch_dual_stream_correlation(frame_parms,
symbol,
nb_rb,
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
NULL,
&(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]),
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext,
lte_ue_pdsch_vars[eNB_id]->log2_maxh);
dlsch_dual_stream_correlation(frame_parms,
symbol,
nb_rb,
&(lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]),
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->log2_maxh);
//printf("TM3 log2_maxh : %d\n",lte_ue_pdsch_vars[eNB_id]->log2_maxh);
}
else {
LOG_E(PHY, "only 2 tx antennas supported for TM3\n");
}
}
else if (dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) {// single-layer precoding, TM4 (Single-codeword)/5 (single or 2 user)/6
else if (dlsch0_harq->mimo_mode<DUALSTREAM_UNIFORM_PRECODING1) {// single-layer precoding (TM5, TM6), potentially TM4 (Single-codeword)
// printf("Channel compensation for precoding\n");
// if ((dual_stream_flag==1) && (eNB_id_i==NUMBER_OF_CONNECTED_eNB_MAX)) {
if ((dual_stream_flag==1) && (eNB_id_i==phy_vars_ue->n_connected_eNB)) { // TM5 two-user
......@@ -484,7 +491,13 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
}
#endif
dlsch_dual_stream_correlation(frame_parms, symbol, nb_rb, lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext, lte_ue_pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext, lte_ue_pdsch_vars[eNB_id]->log2_maxh);
dlsch_dual_stream_correlation(frame_parms,
symbol,
nb_rb,
lte_ue_pdsch_vars[eNB_id]->dl_ch_estimates_ext,
lte_ue_pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho_ext,
lte_ue_pdsch_vars[eNB_id]->log2_maxh);
}
else {
......@@ -634,6 +647,14 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc,2,subframe,symbol),
lte_ue_pdsch_vars[eNB_id]->llr128);
dlsch_qpsk_qpsk_llr(frame_parms,
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp1[dlsch0_harq->round],
lte_ue_pdsch_vars[eNB_id]->rxdataF_comp0,
lte_ue_pdsch_vars[eNB_id]->dl_ch_rho2_ext,
lte_ue_pdsch_vars[eNB_id]->llr[1],
symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc,2,subframe,symbol),
lte_ue_pdsch_vars[eNB_id]->llr128_2ndstream);
}
else if (get_Qm(dlsch1_harq->mcs) == 4) {
dlsch_qpsk_16qam_llr(frame_parms,
......@@ -1364,7 +1385,7 @@ void dlsch_channel_compensation_TM3(LTE_DL_FRAME_PARMS *frame_parms,
int **dl_ch_magb0 = lte_ue_pdsch_vars->dl_ch_magb0;
int **dl_ch_magb1 = lte_ue_pdsch_vars->dl_ch_magb1;
int **rxdataF_comp0 = lte_ue_pdsch_vars->rxdataF_comp0;
int **rxdataF_comp1 = lte_ue_pdsch_vars->rxdataF_comp1[0];
int **rxdataF_comp1 = lte_ue_pdsch_vars->rxdataF_comp1[round]; //?
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp0_128b,QAM_amp1_128,QAM_amp1_128b;
......
......@@ -577,15 +577,20 @@ typedef struct {
} LTE_DL_FRAME_PARMS;
typedef enum {
/// TM1
SISO=0,
/// TM2
ALAMOUTI=1,
/// TM3
LARGE_CDD=2,
/// the next 6 entries are for TM5
UNIFORM_PRECODING11=3,
UNIFORM_PRECODING1m1=4,
UNIFORM_PRECODING1j=5,
UNIFORM_PRECODING1mj=6,
PUSCH_PRECODING0=7,
PUSCH_PRECODING1=8,
/// the next 3 entries are for TM4
DUALSTREAM_UNIFORM_PRECODING1=9,
DUALSTREAM_UNIFORM_PRECODINGj=10,
DUALSTREAM_PUSCH_PRECODING=11,
......@@ -791,8 +796,8 @@ typedef struct {
/// - second index: ? [0..168*N_RB_DL[
int32_t **rxdataF_comp0;
/// \brief Received frequency-domain signal after extraction and channel compensation.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..7] (hard coded)
/// - first index: ? [0..7] (hard coded) accessed via \c round
/// - second index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - third index: ? [0..168*N_RB_DL[
int32_t **rxdataF_comp1[8];
/// \brief Downlink channel estimates extracted in PRBS.
......@@ -803,6 +808,10 @@ typedef struct {
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
int32_t **dl_ch_rho_ext;
/// \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS.
/// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx
/// - second index: ? [0..168*N_RB_DL[
int32_t **dl_ch_rho2_ext;
/// \brief Downlink PMIs extracted in PRBS and grouped in subbands.
/// - first index: ressource block [0..N_RB_DL[
uint8_t *pmi_ext;
......@@ -844,6 +853,10 @@ typedef struct {
/// - first index: ? [0..0] (hard coded)
/// - second index: ? [0..]
int16_t **llr128;
/// \brief Pointers to llr vectors (128-bit alignment).
/// - first index: ? [0..0] (hard coded)
/// - second index: ? [0..]
int16_t **llr128_2ndstream;
//uint32_t *rb_alloc;
//uint8_t Qm[2];
//MIMO_mode_t mimo_mode;
......
This diff is collapsed.
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