comparison src/cs/layer1/cfile/l1_ctl.c @ 73:af1bacf61dc6

src/cs/layer1/cfile/l1_ctl.c: fix for typo made during reconstruction
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 02 Oct 2016 02:12:00 +0000
parents 50a15a54801e
children
comparison
equal deleted inserted replaced
72:832b4be80ed9 73:af1bacf61dc6
1991 #if (RF_FAM == 61) && (L1_FF_MULTIBAND == 0) 1991 #if (RF_FAM == 61) && (L1_FF_MULTIBAND == 0)
1992 UWORD16 arfcn; 1992 UWORD16 arfcn;
1993 #endif 1993 #endif
1994 UWORD16 dco_algo_ctl_pw_temp = 0; 1994 UWORD16 dco_algo_ctl_pw_temp = 0;
1995 UWORD8 if_ctl = 0; 1995 UWORD8 if_ctl = 0;
1996 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 1996 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
1997 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 1997 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
1998 #endif 1998 #endif
1999 1999
2000 #if (L1_FF_MULTIBAND == 0) 2000 #if (L1_FF_MULTIBAND == 0)
2001 2001
2178 WORD32 last_known_agc; 2178 WORD32 last_known_agc;
2179 WORD32 current_IL, current_calibrated_IL; 2179 WORD32 current_IL, current_calibrated_IL;
2180 WORD8 delta1_freq, delta2_freq; 2180 WORD8 delta1_freq, delta2_freq;
2181 WORD16 delta_drp_gain=0; 2181 WORD16 delta_drp_gain=0;
2182 WORD32 index, lna_value; 2182 WORD32 index, lna_value;
2183 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2183 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2184 UWORD16 arfcn; 2184 UWORD16 arfcn;
2185 #endif 2185 #endif
2186 UWORD16 dco_algo_ctl_pw_temp = 0; 2186 UWORD16 dco_algo_ctl_pw_temp = 0;
2187 UWORD8 if_ctl = 0; 2187 UWORD8 if_ctl = 0;
2188 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2188 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2189 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2189 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2190 #endif 2190 #endif
2191 2191
2192 #if (L1_FF_MULTIBAND == 0) 2192 #if (L1_FF_MULTIBAND == 0)
2193 2193
2210 // pm and IL formats [-20,+140 in F7.1] 2210 // pm and IL formats [-20,+140 in F7.1]
2211 // contain the input_level value we use 2211 // contain the input_level value we use
2212 // in the associated CTL task to build 2212 // in the associated CTL task to build
2213 // the agc used in this CTL. 2213 // the agc used in this CTL.
2214 2214
2215 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2215 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2216 #if (L1_FF_MULTIBAND == 0) 2216 #if (L1_FF_MULTIBAND == 0)
2217 arfcn = Convert_l1_radio_freq(radio_freq); 2217 arfcn = Convert_l1_radio_freq(radio_freq);
2218 #else 2218 #else
2219 arfcn = radio_freq; 2219 arfcn = radio_freq;
2220 #endif 2220 #endif
2286 WORD8 delta1_freq, delta2_freq; 2286 WORD8 delta1_freq, delta2_freq;
2287 WORD16 delta_high_drp_gain=0; 2287 WORD16 delta_high_drp_gain=0;
2288 WORD16 delta_low_drp_gain=0; 2288 WORD16 delta_low_drp_gain=0;
2289 WORD32 index; 2289 WORD32 index;
2290 UWORD16 g_magic; 2290 UWORD16 g_magic;
2291 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2291 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2292 UWORD16 arfcn; 2292 UWORD16 arfcn;
2293 #endif 2293 #endif
2294 UWORD16 dco_algo_ctl_pw_temp = 0; 2294 UWORD16 dco_algo_ctl_pw_temp = 0;
2295 UWORD8 if_ctl = 0; 2295 UWORD8 if_ctl = 0;
2296 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2296 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2297 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2297 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2298 #endif 2298 #endif
2299 2299
2300 #if (L1_FF_MULTIBAND == 0) 2300 #if (L1_FF_MULTIBAND == 0)
2301 2301
2315 g_magic = l1ctl_get_g_magic(radio_freq); 2315 g_magic = l1ctl_get_g_magic(radio_freq);
2316 2316
2317 // lna_off was set to 0 during CTRL, so lna_value = 0 do not appear in the following 2317 // lna_off was set to 0 during CTRL, so lna_value = 0 do not appear in the following
2318 // formula. 2318 // formula.
2319 2319
2320 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2320 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2321 #if (L1_FF_MULTIBAND == 0) 2321 #if (L1_FF_MULTIBAND == 0)
2322 arfcn = Convert_l1_radio_freq(radio_freq); 2322 arfcn = Convert_l1_radio_freq(radio_freq);
2323 #else 2323 #else
2324 arfcn = radio_freq; 2324 arfcn = radio_freq;
2325 #endif 2325 #endif
2470 WORD32 last_known_agc; 2470 WORD32 last_known_agc;
2471 UWORD8 IL_max; 2471 UWORD8 IL_max;
2472 WORD32 current_IL, current_calibrated_IL; 2472 WORD32 current_IL, current_calibrated_IL;
2473 UWORD8 i; 2473 UWORD8 i;
2474 WORD32 lna_value; 2474 WORD32 lna_value;
2475 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2475 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2476 UWORD16 arfcn; 2476 UWORD16 arfcn;
2477 #endif 2477 #endif
2478 UWORD8 lna_off; 2478 UWORD8 lna_off;
2479 UWORD16 dco_algo_ctl_pw_temp = 0; 2479 UWORD16 dco_algo_ctl_pw_temp = 0;
2480 UWORD8 if_ctl = 0; 2480 UWORD8 if_ctl = 0;
2481 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2481 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2482 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2482 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2483 #endif 2483 #endif
2484 2484
2485 delta1_freq = l1ctl_encode_delta1(radio_freq); 2485 delta1_freq = l1ctl_encode_delta1(radio_freq);
2486 delta2_freq = l1ctl_encode_delta2(radio_freq); 2486 delta2_freq = l1ctl_encode_delta2(radio_freq);
2500 // with pm and IL formats 2500 // with pm and IL formats
2501 // contain the input_level value we use 2501 // contain the input_level value we use
2502 // in the associated CTL task to build 2502 // in the associated CTL task to build
2503 // the agc used in this CTL. 2503 // the agc used in this CTL.
2504 2504
2505 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2505 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2506 #if (L1_FF_MULTIBAND == 0) 2506 #if (L1_FF_MULTIBAND == 0)
2507 arfcn = Convert_l1_radio_freq(radio_freq); 2507 arfcn = Convert_l1_radio_freq(radio_freq);
2508 #else 2508 #else
2509 arfcn = radio_freq; 2509 arfcn = radio_freq;
2510 #endif 2510 #endif
2585 WORD16 delta_drp_gain=0; 2585 WORD16 delta_drp_gain=0;
2586 UWORD8 i; 2586 UWORD8 i;
2587 UWORD8 *tab_ptr; 2587 UWORD8 *tab_ptr;
2588 T_DEDIC_SET *aset; 2588 T_DEDIC_SET *aset;
2589 WORD32 lna_value; 2589 WORD32 lna_value;
2590 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2590 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2591 UWORD16 arfcn; 2591 UWORD16 arfcn;
2592 #endif 2592 #endif
2593 UWORD8 lna_off; 2593 UWORD8 lna_off;
2594 UWORD16 dco_algo_ctl_pw_temp = 0; 2594 UWORD16 dco_algo_ctl_pw_temp = 0;
2595 UWORD8 if_ctl = 0; 2595 UWORD8 if_ctl = 0;
2596 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2596 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2597 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2597 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2598 #endif 2598 #endif
2599 2599
2600 delta1_freq = l1ctl_encode_delta1(radio_freq); 2600 delta1_freq = l1ctl_encode_delta1(radio_freq);
2601 delta2_freq = l1ctl_encode_delta2(radio_freq); 2601 delta2_freq = l1ctl_encode_delta2(radio_freq);
2633 // in the associated CTL task to build the agc used in this CTL. 2633 // in the associated CTL task to build the agc used in this CTL.
2634 2634
2635 lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq); 2635 lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq);
2636 } 2636 }
2637 2637
2638 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2638 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2639 #if (L1_FF_MULTIBAND == 0) 2639 #if (L1_FF_MULTIBAND == 0)
2640 arfcn = Convert_l1_radio_freq(radio_freq); 2640 arfcn = Convert_l1_radio_freq(radio_freq);
2641 #else 2641 #else
2642 arfcn = radio_freq; 2642 arfcn = radio_freq;
2643 #endif 2643 #endif
2781 WORD16 delta_drp_gain=0; 2781 WORD16 delta_drp_gain=0;
2782 UWORD8 i; 2782 UWORD8 i;
2783 UWORD8 *tab_ptr, *tab_amr_ptr; 2783 UWORD8 *tab_ptr, *tab_amr_ptr;
2784 T_DEDIC_SET *aset; 2784 T_DEDIC_SET *aset;
2785 WORD32 lna_value; 2785 WORD32 lna_value;
2786 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2786 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2787 UWORD16 arfcn; 2787 UWORD16 arfcn;
2788 #endif 2788 #endif
2789 UWORD8 lna_off; 2789 UWORD8 lna_off;
2790 UWORD16 dco_algo_ctl_pw_temp = 0; 2790 UWORD16 dco_algo_ctl_pw_temp = 0;
2791 UWORD8 if_ctl = 0; 2791 UWORD8 if_ctl = 0;
2792 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2792 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2793 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM; 2793 UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
2794 #endif 2794 #endif
2795 2795
2796 delta1_freq = l1ctl_encode_delta1(radio_freq); 2796 delta1_freq = l1ctl_encode_delta1(radio_freq);
2797 delta2_freq = l1ctl_encode_delta2(radio_freq); 2797 delta2_freq = l1ctl_encode_delta2(radio_freq);
2833 // in the associated CTL task to build the agc used in this CTL. 2833 // in the associated CTL task to build the agc used in this CTL.
2834 2834
2835 lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq); 2835 lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq);
2836 } 2836 }
2837 2837
2838 #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION) 2838 #if (RF_FAM == 61) && (CODE_VERSION != SIMULATION)
2839 #if (L1_FF_MULTIBAND == 0) 2839 #if (L1_FF_MULTIBAND == 0)
2840 arfcn = Convert_l1_radio_freq(radio_freq); 2840 arfcn = Convert_l1_radio_freq(radio_freq);
2841 #else 2841 #else
2842 arfcn = radio_freq; 2842 arfcn = radio_freq;
2843 #endif 2843 #endif