diff --git a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c index fd0886ff8a92bd96d721feab84dcc8897edd06d5..09210c64f079c292f87fee2d5d140e730b3de59e 100644 --- a/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c +++ b/openair1/PHY/LTE_TRANSPORT/dlsch_demodulation.c @@ -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); if (nb_rb==0) { - //LOG_W(PHY,"dlsch_demodulation.c: nb_rb=0\n"); - return(0); + LOG_D(PHY,"dlsch_demodulation.c: nb_rb=0\n"); + return(-1); } /* diff --git a/openair1/PHY/LTE_TRANSPORT/print_stats.c b/openair1/PHY/LTE_TRANSPORT/print_stats.c index 2eab37beb03f948246cab987036e897f13efeab3..2bc4fca53c13585d0959c5a8eebc37b2a46ecd15 100644 --- a/openair1/PHY/LTE_TRANSPORT/print_stats.c +++ b/openair1/PHY/LTE_TRANSPORT/print_stats.c @@ -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, 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, - 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); for(i=0; i<8; i++) diff --git a/openair1/PHY/LTE_TRANSPORT/pucch.c b/openair1/PHY/LTE_TRANSPORT/pucch.c index e893dd5003cba1c9282cd76b84d9094ded50556e..4a72538dc098a3129c8a190abc0c774cdf26fd7b 100644 --- a/openair1/PHY/LTE_TRANSPORT/pucch.c +++ b/openair1/PHY/LTE_TRANSPORT/pucch.c @@ -488,7 +488,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } first_call=0; } - + /* switch (frame_parms->N_RB_UL) { case 6: @@ -506,7 +506,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, default: sigma2_dB -= 14; } - + */ 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); @@ -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]; 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][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][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<<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) re_offset = 0; #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, - rxptr[re_offset<<2],rxptr[1+(re_offset<<2)], + rxptr[re_offset<<1],rxptr[1+(re_offset<<1)], zptr[j],zptr[1+j], rxcomp[aa][j],rxcomp[aa][1+j]); #endif @@ -760,11 +760,11 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, #endif } - } //re + stat += (stat_re*stat_re) + (stat_im*stat_im); + } //re } // aa - stat = (stat_re*stat_re) + (stat_im*stat_im); - + if (stat>stat_max) { stat_max = stat; phase_max = phase; @@ -772,7 +772,7 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } //phase - stat_max /= nsymb; // normalize to energy per symbol + stat_max /= (nsymb*12); // normalize to energy per symbol and RE #ifdef DEBUG_PUCCH_RX LOG_D(PHY,"[eNB] PUCCH: stat %d, stat_max %d, phase_max %d\n", stat,stat_max,phase_max); #endif @@ -881,12 +881,11 @@ int32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB, } } //phase - stat_max/=nsymb; //normalize to energy per symbol + stat_max/=(nsymb*12); //normalize to energy per symbol and RE #ifdef DEBUG_PUCCH_RX LOG_I(PHY,"[eNB] PUCCH fmt1: stat_max : %d, phase_max : %d\n",stat_max,phase_max); #endif - // Do detection now stat_re=0; stat_im=0; 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, dB_fixed(*Po_PUCCH)); - + // Do detection now if (sigma2_dB<(dB_fixed(stat_max)-pucch1_thres)) {// diff --git a/openair1/PHY/TOOLS/lte_phy_scope.c b/openair1/PHY/TOOLS/lte_phy_scope.c index 6d558d2aee4a2abec3cf0a6ba42fe0062d2f8e08..99035b046fd5f4af8516872302d0ededba1fc0da 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.c +++ b/openair1/PHY/TOOLS/lte_phy_scope.c @@ -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_xgrid( fdui->pusch_llr,FL_GRID_MAJOR); - // I/Q PUCCH comp - fdui->pucch_comp = fl_add_xyplot( FL_POINTS_XYPLOT, 540, 540, 240, 200, "PUCCH I/Q of MF Output" ); + // I/Q PUCCH comp (format 1) + 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_color( fdui->pucch_comp, FL_BLACK, FL_YELLOW ); 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 // 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_button(fdui->button_0,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]); B_pucch[ind] = ind; } - fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,ind,"","",""); - //fl_set_xyplot_data(form->pucch_comp,B_pucch,A_pucch,ind,"","",""); + fl_set_xyplot_data(form->pucch_comp,I_pucch,Q_pucch,10240,"","",""); + fl_set_xyplot_data(form->pucch_comp1,B_pucch,A_pucch,1024,"","",""); 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,0,50); + fl_set_xyplot_ybounds(form->pucch_comp,-100,100); + fl_set_xyplot_ybounds(form->pucch_comp1,10,40); } diff --git a/openair1/PHY/TOOLS/lte_phy_scope.h b/openair1/PHY/TOOLS/lte_phy_scope.h index 8b22fa8312f66e471b84de92d7d6e33d2afd2251..f41f501838d2fd5aeed75bc447cd9eac2fbcbbf5 100644 --- a/openair1/PHY/TOOLS/lte_phy_scope.h +++ b/openair1/PHY/TOOLS/lte_phy_scope.h @@ -47,6 +47,7 @@ typedef struct { FL_OBJECT * chest_t; FL_OBJECT * pusch_comp; FL_OBJECT * pucch_comp; + FL_OBJECT * pucch_comp1; FL_OBJECT * pusch_llr; FL_OBJECT * pusch_tput; FL_OBJECT * button_0;