Commit 291a7f17 authored by lukashov's avatar lukashov

1. Changing precoder to minimize interference: testing simple channels.

2. Fixing confusion between dl_ch_rho2_ext and dl_ch_rho_ext[harq_pid][round].
parent 127fa9ae
......@@ -5897,7 +5897,7 @@ uint16_t quantize_subband_pmi(PHY_MEASUREMENTS *meas,uint8_t eNB_id,int nb_rb)
pmi_im += meas->subband_pmi_im[eNB_id][i][aarx];
//printf("meas->subband_pmi_im[eNB_id][i][%d]=%d\n",aarx, meas->subband_pmi_im[eNB_id][i][aarx]);
}
if (((pmi_re >= pmi_im) && (pmi_re >= -pmi_im)) || ((pmi_re >= pmi_im) && (pmi_re <= -pmi_im)))
if (((pmi_re >= pmi_im) && (pmi_re >= -pmi_im)) || ((pmi_re <= pmi_im) && (pmi_re <= -pmi_im)))
pmiq = PMI_2A_R1_11;
else
pmiq = PMI_2A_R1_1j;
......
......@@ -740,7 +740,8 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
1,
len);
printf ("Got x0*rho_a\n");
// printf ("Got x0*rho_a\n");
mult_cpx_vector((int16_t *)rho_amp_x0,
(int16_t *)rho_1,
......@@ -749,30 +750,32 @@ int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
13);
write_output("rho_rho.m","rho2", rho_rho_amp_x0,len,1,1);
printf ("Computed rho*rho_a*x0\n");
// printf ("Computed rho*rho_a*x0\n");
sub_cpx_vector16((int16_t *)rxF,
(int16_t *)rho_rho_amp_x0,
//(int16_t *)clean_x1,
// (int16_t *)clean_x1,
(int16_t *)rxF,
len*2);
write_output("clean_x1.m","x1", clean_x1,len,1,1);
printf ("Interference removed \n");
// printf ("Interference removed \n");
printf("dlsch_qpsk_llr_SIC: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
// printf("dlsch_qpsk_llr_SIC: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
//this is for QPSK only!!!
for (i=0; i<len*2; i++) {
*llr16 = rxF[i];
*llr16 =rxF[i];
//printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
llr16++;
}
}
printf("dlsch_qpsk_llr_SIC: acc_len=%d\n",len_acc);
// printf("dlsch_qpsk_llr_SIC: acc_len=%d\n",len_acc);
return(0);
}
......
......@@ -882,6 +882,8 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
break;
}
if (dlsch1_harq) {
switch (mod_order1) {
case 2: //QPSK
......@@ -974,6 +976,7 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
}
}
}
if (mimo_mode == ALAMOUTI) {
......@@ -1639,7 +1642,7 @@ int dlsch_modulation_SIC(mod_sym_t **sic_buffer,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_IN);
amp=1; //we do full scale here for SIC
gain_lin_QPSK = (int16_t)((amp*ONE_OVER_SQRT2_Q15));
gain_lin_QPSK = (int16_t)((ONE_OVER_SQRT2_Q15));
jj = 0;
i = 0;
......
......@@ -29,7 +29,7 @@
#include "PHY/defs.h"
#include "PHY/impl_defs_lte.h"
#define DEBUG_PC 0
//#define DEBUG_PC 0
/*
double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0},
{ 5.0/4.0,1.0,3.0/4.0,1.0/2.0}};
......
......@@ -169,7 +169,7 @@ int mult_cpx_vector(int16_t *x1,
x2_128 = (simd_q15_t *)&x2[0];
y_128 = (simd_q15_t *)&y[0];
//print_shorts("x1_128:",&x1_128[0]);
//print_shorts("x2_128:",&x2_128[0]);
// print_shorts("x2_128:",&x2_128[0]);
//right shift by 13 while p_a * x0 and 15 while
// we compute 4 cpx multiply for each loop
......
......@@ -3520,7 +3520,7 @@ n(tikz_fname,"w");
if (ret <= PHY_vars_UE->dlsch_ue[0][cw_non_sic]->max_turbo_iterations ) {
printf("ret=%d\n", ret);
if (cw_non_sic==0) {
avg_iter += ret;
iter_trials++;
......@@ -3649,7 +3649,7 @@ n(tikz_fname,"w");
(PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid]->mimo_mode <=DUALSTREAM_PUSCH_PRECODING) &&
rx_type==rx_SIC_dual_stream) {
for (round = 0 ; round < 1 ; round++) {
// for (round = 0 ; round < 1 ; round++) {
dlsch0_ue_harq = PHY_vars_UE->dlsch_ue[eNB_id][0]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid];
dlsch0_eNB_harq = PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_ue[eNB_id][0]->current_harq_pid];
......@@ -3677,6 +3677,7 @@ n(tikz_fname,"w");
&PHY_vars_UE->dlsch_turbo_encoding_stats,
&PHY_vars_UE->dlsch_interleaving_stats);
coded_bits_per_codeword = get_G(&PHY_vars_UE->lte_frame_parms,
PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->nb_rb,
PHY_vars_UE->dlsch_eNB[eNB_id]->harq_processes[PHY_vars_UE->dlsch_eNB[eNB_id]->current_harq_pid]->rb_alloc,
......@@ -3716,7 +3717,7 @@ n(tikz_fname,"w");
dlsch0_eNB_harq->nb_rb,
adjust_G2(&PHY_vars_UE->lte_frame_parms,&dlsch0_eNB_harq->rb_alloc[0],2,subframe,num_pdcch_symbols),
PHY_vars_UE->dlsch_ue[eNB_id][0]);
}// round
// }// round
write_output("rxdata_llr1.m","llr1", PHY_vars_UE->lte_ue_pdsch_vars[eNB_id]->llr[1],re_allocated*2,1,0);
......
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