fixing bugs in PUCCH RX + new scope for PUCCH format 1
git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7809 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -248,8 +248,8 @@ int rx_pdsch(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
// printf("nb_rb = %d, eNB_id %d\n",nb_rb,eNB_id);
|
// printf("nb_rb = %d, eNB_id %d\n",nb_rb,eNB_id);
|
||||||
if (nb_rb==0) {
|
if (nb_rb==0) {
|
||||||
//LOG_W(PHY,"dlsch_demodulation.c: nb_rb=0\n");
|
LOG_D(PHY,"dlsch_demodulation.c: nb_rb=0\n");
|
||||||
return(0);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -638,7 +638,7 @@ int dump_eNB_stats(PHY_VARS_eNB *phy_vars_eNB, char* buffer, int length)
|
|||||||
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
phy_vars_eNB->lte_frame_parms.ul_power_control_config_common.p0_NominalPUCCH,
|
||||||
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below)-phy_vars_eNB->rx_total_gain_eNB_dB,
|
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_below)-phy_vars_eNB->rx_total_gain_eNB_dB,
|
||||||
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above)-phy_vars_eNB->rx_total_gain_eNB_dB,
|
dB_fixed(phy_vars_eNB->eNB_UE_stats[UE_id].Po_PUCCH1_above)-phy_vars_eNB->rx_total_gain_eNB_dB,
|
||||||
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
|
PUCCH1_THRES+phy_vars_eNB->PHY_measurements_eNB[0].n0_power_tot_dBm, //-dB_fixed(phy_vars_eNB->lte_frame_parms.N_RB_UL),
|
||||||
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
|
phy_vars_eNB->eNB_UE_stats[UE_id].sector);
|
||||||
|
|
||||||
for(i=0; i<8; i++)
|
for(i=0; i<8; i++)
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
}
|
}
|
||||||
first_call=0;
|
first_call=0;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
switch (frame_parms->N_RB_UL) {
|
switch (frame_parms->N_RB_UL) {
|
||||||
|
|
||||||
case 6:
|
case 6:
|
||||||
@@ -506,7 +506,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
default:
|
default:
|
||||||
sigma2_dB -= 14;
|
sigma2_dB -= 14;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if ((deltaPUCCH_Shift==0) || (deltaPUCCH_Shift>3)) {
|
if ((deltaPUCCH_Shift==0) || (deltaPUCCH_Shift>3)) {
|
||||||
LOG_E(PHY,"[eNB] rx_pucch: Illegal deltaPUCCH_shift %d (should be 1,2,3)\n",deltaPUCCH_Shift);
|
LOG_E(PHY,"[eNB] rx_pucch: Illegal deltaPUCCH_shift %d (should be 1,2,3)\n",deltaPUCCH_Shift);
|
||||||
@@ -698,15 +698,15 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
rxptr = (int16_t *)&eNB_common_vars->rxdataF[0][aa][symbol_offset];
|
rxptr = (int16_t *)&eNB_common_vars->rxdataF[0][aa][symbol_offset];
|
||||||
|
|
||||||
for (i=0; i<12; i++,j+=2,re_offset++) {
|
for (i=0; i<12; i++,j+=2,re_offset++) {
|
||||||
rxcomp[aa][j] = (int16_t)((rxptr[re_offset<<2]*(int32_t)zptr[j])>>15) - ((rxptr[1+(re_offset<<2)]*(int32_t)zptr[1+j])>>15);
|
rxcomp[aa][j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[j])>>15) - ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[1+j])>>15);
|
||||||
rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<2]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<2)]*(int32_t)zptr[j])>>15);
|
rxcomp[aa][1+j] = (int16_t)((rxptr[re_offset<<1]*(int32_t)zptr[1+j])>>15) + ((rxptr[1+(re_offset<<1)]*(int32_t)zptr[j])>>15);
|
||||||
|
|
||||||
if (re_offset==frame_parms->ofdm_symbol_size)
|
if (re_offset==frame_parms->ofdm_symbol_size)
|
||||||
re_offset = 0;
|
re_offset = 0;
|
||||||
|
|
||||||
#ifdef DEBUG_PUCCH_RX
|
#ifdef DEBUG_PUCCH_RX
|
||||||
LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,i,re_offset,m,j,
|
LOG_D(PHY,"[eNB] PUCCH subframe %d (%d,%d,%d,%d,%d) => (%d,%d) x (%d,%d) : (%d,%d)\n",subframe,l,i,re_offset,m,j,
|
||||||
rxptr[re_offset<<2],rxptr[1+(re_offset<<2)],
|
rxptr[re_offset<<1],rxptr[1+(re_offset<<1)],
|
||||||
zptr[j],zptr[1+j],
|
zptr[j],zptr[1+j],
|
||||||
rxcomp[aa][j],rxcomp[aa][1+j]);
|
rxcomp[aa][j],rxcomp[aa][1+j]);
|
||||||
#endif
|
#endif
|
||||||
@@ -760,11 +760,11 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
} //re
|
stat += (stat_re*stat_re) + (stat_im*stat_im);
|
||||||
|
} //re
|
||||||
} // aa
|
} // aa
|
||||||
|
|
||||||
stat = (stat_re*stat_re) + (stat_im*stat_im);
|
|
||||||
|
|
||||||
if (stat>stat_max) {
|
if (stat>stat_max) {
|
||||||
stat_max = stat;
|
stat_max = stat;
|
||||||
phase_max = phase;
|
phase_max = phase;
|
||||||
@@ -772,7 +772,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
|
|
||||||
} //phase
|
} //phase
|
||||||
|
|
||||||
stat_max /= nsymb; // normalize to energy per symbol
|
stat_max /= (nsymb*12); // normalize to energy per symbol and RE
|
||||||
#ifdef DEBUG_PUCCH_RX
|
#ifdef DEBUG_PUCCH_RX
|
||||||
LOG_D(PHY,"[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
|
LOG_D(PHY,"[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max);
|
||||||
#endif
|
#endif
|
||||||
@@ -881,12 +881,11 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
}
|
}
|
||||||
} //phase
|
} //phase
|
||||||
|
|
||||||
stat_max/=nsymb; //normalize to energy per symbol
|
stat_max/=(nsymb*12); //normalize to energy per symbol and RE
|
||||||
#ifdef DEBUG_PUCCH_RX
|
#ifdef DEBUG_PUCCH_RX
|
||||||
LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, phase_max : %d\n",stat_max,phase_max);
|
LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, phase_max : %d\n",stat_max,phase_max);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Do detection now
|
|
||||||
stat_re=0;
|
stat_re=0;
|
||||||
stat_im=0;
|
stat_im=0;
|
||||||
LOG_D(PHY,"PUCCH1A : Po_PUCCH before %d dB (%d)\n",dB_fixed(*Po_PUCCH),*Po_PUCCH);
|
LOG_D(PHY,"PUCCH1A : Po_PUCCH before %d dB (%d)\n",dB_fixed(*Po_PUCCH),*Po_PUCCH);
|
||||||
@@ -901,7 +900,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
|||||||
sigma2_dB,
|
sigma2_dB,
|
||||||
dB_fixed(*Po_PUCCH));
|
dB_fixed(*Po_PUCCH));
|
||||||
|
|
||||||
|
// Do detection now
|
||||||
if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) {//
|
if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) {//
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -118,8 +118,16 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
|||||||
fl_set_xyplot_symbolsize( fdui->pusch_comp,2);
|
fl_set_xyplot_symbolsize( fdui->pusch_comp,2);
|
||||||
fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
||||||
|
|
||||||
// I/Q PUCCH comp
|
// I/Q PUCCH comp (format 1)
|
||||||
fdui->pucch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 540, 240, 200, "PUCCH I/Q of MF Output" );
|
fdui->pucch_comp1 = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 480, 240, 100, "PUCCH I/Q of MF Output" );
|
||||||
|
fl_set_object_boxtype( fdui->pucch_comp1, FL_EMBOSSED_BOX );
|
||||||
|
fl_set_object_color( fdui->pucch_comp1, FL_BLACK, FL_YELLOW );
|
||||||
|
fl_set_object_lcolor( fdui->pucch_comp1, FL_WHITE ); // Label color
|
||||||
|
fl_set_xyplot_symbolsize( fdui->pucch_comp1,2);
|
||||||
|
// fl_set_xyplot_xgrid( fdui->pusch_llr,FL_GRID_MAJOR);
|
||||||
|
|
||||||
|
// I/Q PUCCH comp (fromat 1a/b)
|
||||||
|
fdui->pucch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 600, 240, 100, "PUCCH I/Q of MF Output" );
|
||||||
fl_set_object_boxtype( fdui->pucch_comp, FL_EMBOSSED_BOX );
|
fl_set_object_boxtype( fdui->pucch_comp, FL_EMBOSSED_BOX );
|
||||||
fl_set_object_color( fdui->pucch_comp, FL_BLACK, FL_YELLOW );
|
fl_set_object_color( fdui->pucch_comp, FL_BLACK, FL_YELLOW );
|
||||||
fl_set_object_lcolor( fdui->pucch_comp, FL_WHITE ); // Label color
|
fl_set_object_lcolor( fdui->pucch_comp, FL_WHITE ); // Label color
|
||||||
@@ -133,7 +141,7 @@ FD_lte_phy_scope_enb *create_lte_phy_scope_enb( void )
|
|||||||
fl_set_object_lcolor( fdui->pusch_tput, FL_WHITE ); // Label color
|
fl_set_object_lcolor( fdui->pusch_tput, FL_WHITE ); // Label color
|
||||||
|
|
||||||
// Generic eNB Button
|
// Generic eNB Button
|
||||||
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 540, 480, 240, 40, "" );
|
fdui->button_0 = fl_add_button( FL_PUSH_BUTTON, 20, 600, 240, 40, "" );
|
||||||
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
fl_set_object_lalign(fdui->button_0, FL_ALIGN_CENTER );
|
||||||
fl_set_button(fdui->button_0,0);
|
fl_set_button(fdui->button_0,0);
|
||||||
otg_enabled = 0;
|
otg_enabled = 0;
|
||||||
@@ -334,11 +342,11 @@ void phy_scope_eNB(FD_lte_phy_scope_enb *form,
|
|||||||
A_pucch[ind] = 10*log10(pucch1_comp[ind]);
|
A_pucch[ind] = 10*log10(pucch1_comp[ind]);
|
||||||
B_pucch[ind] = ind;
|
B_pucch[ind] = ind;
|
||||||
}
|
}
|
||||||
fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,ind,"","","");
|
fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","","");
|
||||||
//fl_set_xyplot_data(form->pucch_comp,B_pucch,A_pucch,ind,"","","");
|
fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","","");
|
||||||
fl_set_xyplot_xbounds(form->pucch_comp,-200,200);
|
fl_set_xyplot_xbounds(form->pucch_comp,-200,200);
|
||||||
fl_set_xyplot_ybounds(form->pucch_comp,-200,200);
|
fl_set_xyplot_ybounds(form->pucch_comp,-100,100);
|
||||||
//fl_set_xyplot_ybounds(form->pucch_comp,0,50);
|
fl_set_xyplot_ybounds(form->pucch_comp1,10,40);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ typedef struct {
|
|||||||
FL_OBJECT * chest_t;
|
FL_OBJECT * chest_t;
|
||||||
FL_OBJECT * pusch_comp;
|
FL_OBJECT * pusch_comp;
|
||||||
FL_OBJECT * pucch_comp;
|
FL_OBJECT * pucch_comp;
|
||||||
|
FL_OBJECT * pucch_comp1;
|
||||||
FL_OBJECT * pusch_llr;
|
FL_OBJECT * pusch_llr;
|
||||||
FL_OBJECT * pusch_tput;
|
FL_OBJECT * pusch_tput;
|
||||||
FL_OBJECT * button_0;
|
FL_OBJECT * button_0;
|
||||||
|
|||||||
Reference in New Issue
Block a user