# HG changeset patch # User Mychaela Falconia # Date 1459134261 0 # Node ID 0633e0378176ee655974c564038a83b006792a54 # Parent 549dc74942a0b2d303168bbcf09d565d2dcf726f l1_cmplx.c: l1s_read_dedic_dl() reconstructed diff -r 549dc74942a0 -r 0633e0378176 chipsetsw/layer1/cfile/l1_cmplx.c --- a/chipsetsw/layer1/cfile/l1_cmplx.c Mon Mar 28 01:51:54 2016 +0000 +++ b/chipsetsw/layer1/cfile/l1_cmplx.c Mon Mar 28 03:04:21 2016 +0000 @@ -8075,7 +8075,7 @@ // Traces and debug. // ****************** #if (TRACE_TYPE!=0) && (TRACE_TYPE !=5) - trace_fct(CST_L1S_READ_DEDIC_DL, 1);//omaps00090550 + trace_fct(CST_L1S_READ_DEDIC_DL, -1); #endif #if (TRACE_TYPE!=0) @@ -8150,12 +8150,11 @@ // Read control information. toa = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_TOA] & 0xffff; - pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff); + pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff) >> 5; angle = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_ANGLE] & 0xffff; snr = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_SNR] & 0xffff; l1_check_pm_error(pm, task); - pm = pm >> 5; // Update AGC: Call DPAGC algorithm IL_for_rxlev = l1ctl_dpagc(0,beacon,(UWORD8)pm,radio_freq,IL_info_ptr); // dtx_on = 0 @@ -8196,18 +8195,24 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING ==1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING ==1) + ,0 + #endif + ); + #endif #endif - } #endif @@ -8296,12 +8301,11 @@ // Read control information. toa = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_TOA] & 0xffff; - pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff); + pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff) >> 5; angle = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_ANGLE] & 0xffff; snr = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_SNR] & 0xffff; l1_check_pm_error(pm, task); - pm = pm >> 5; #if TRACE_TYPE==3 stats_samples_tch(toa,pm,angle,snr); @@ -8446,18 +8450,24 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING == 1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1_mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + #endif #endif - } #endif } // if(((channel_mode == TCH_HS_MODE) && (subchannel == 0) && @@ -8948,16 +8958,23 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING == 1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + #endif #endif } #endif @@ -9055,12 +9072,11 @@ // Read control information. toa = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_TOA] & 0xffff; - pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff); + pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff) >> 5; angle = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_ANGLE] & 0xffff; snr = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_SNR] & 0xffff; l1_check_pm_error(pm, task); - pm = pm >> 5; #if TRACE_TYPE==3 stats_samples_tch(toa,pm,angle,snr); @@ -9183,16 +9199,23 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING == 1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + #endif #endif } #endif @@ -9651,16 +9674,23 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING == 1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + #endif #endif } #endif @@ -9727,7 +9757,7 @@ // Read control information. toa = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_TOA] & 0xffff; - pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff); + pm = (l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_PM] & 0xffff) >> 5; angle = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_ANGLE] & 0xffff; snr = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_SNR] & 0xffff; @@ -9754,7 +9784,6 @@ { l1_check_pm_error(pm, task); } - pm = pm >> 5; #if TRACE_TYPE==3 stats_samples_tch_sacch(toa,pm,angle,snr); @@ -9798,18 +9827,24 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; - #if (TOA_ALGO == 2) - l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #if 1 /* FreeCalypso TCS211 reconstruction */ + if (IL_for_rxlev < IL_FOR_RXLEV_SNR) + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr, toa, &l1s.toa_update, &l1s.toa_period_count); + else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, &l1s.toa_update, &l1s.toa_period_count); #else - l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count -#if (FF_L1_FAST_DECODING == 1) - ,0 -#endif - ); + UWORD32 snr_temp; + snr_temp = (IL_for_rxlev < IL_FOR_RXLEV_SNR)? snr: 0; + #if (TOA_ALGO == 2) + l1s.toa_var.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa); + #else + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, snr_temp, toa, &l1s.toa_update, &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + #endif #endif - } #endif