FreeCalypso > hg > tcs211-l1-reconst
changeset 303:5408ac162f16
l1p_cmpl.c: l1ps_read_nb_dl() reconstructed
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 02 Oct 2017 07:49:35 +0000 |
parents | cffa1b8dbf2c |
children | e3db5c73c86d |
files | chipsetsw/layer1/p_cfile/l1p_cmpl.c |
diffstat | 1 files changed, 26 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/chipsetsw/layer1/p_cfile/l1p_cmpl.c Mon Oct 02 07:08:58 2017 +0000 +++ b/chipsetsw/layer1/p_cfile/l1p_cmpl.c Mon Oct 02 07:49:35 2017 +0000 @@ -2596,24 +2596,23 @@ if (l1a_l1s_com.dsp_scheduler_mode == GSM_SCHEDULER) { 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; } else { toa = l1ps_dsp_com.pdsp_db_r_ptr->a_burst_toa_gprs[0] & 0xffff; - pm = (l1ps_dsp_com.pdsp_db_r_ptr->a_burst_pm_gprs[0] & 0xffff); + pm = (l1ps_dsp_com.pdsp_db_r_ptr->a_burst_pm_gprs[0] & 0xffff)>>5; angle = l1ps_dsp_com.pdsp_db_r_ptr->a_burst_angle_gprs[0] & 0xffff; snr = l1ps_dsp_com.pdsp_db_r_ptr->a_burst_snr_gprs[0] & 0xffff; } #if (TRACE_TYPE!=0) && (TRACE_TYPE!=5) - trace_fct(CST_L1PS_READ_NB_DL, 1); //OMAPS00090550 + trace_fct(CST_L1PS_READ_NB_DL, -1); #endif l1_check_pm_error(pm,task); - pm = pm >> 5; // Update AGC: Call PAGC algorithm l1a_l1s_com.Scell_IL_for_rxlev = l1pctl_pagc_read((UWORD8)pm, l1pa_l1ps_com.p_idle_param.radio_freq_dd); @@ -2656,16 +2655,32 @@ if(l1s.toa_snr_mask == 0) #endif { - UWORD32 snr_temp; - snr_temp = (l1a_l1s_com.Scell_IL_for_rxlev < IL_FOR_RXLEV_SNR) ? snr: 0; #if (TOA_ALGO == 2) + UWORD32 snr_temp; + snr_temp = (l1a_l1s_com.Scell_IL_for_rxlev < IL_FOR_RXLEV_SNR) ? snr: 0; 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 - ); + /* FreeCalypso TCS211 reconstruction */ + if (l1a_l1s_com.Scell_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 + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + } + else + { + l1s.toa_shift = l1ctl_toa(TOA_RUN, l1a_l1s_com.mode, 0, toa, + &l1s.toa_update, + &l1s.toa_period_count + #if (FF_L1_FAST_DECODING == 1) + ,0 + #endif + ); + } #endif } #endif