comparison chipsetsw/layer1/cfile/l1_cmplx.c @ 59:250c8bc322c7

l1_cmplx.c: reconstructed up to beginning of l1s_ctrl_snb_dl()
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 27 Mar 2016 07:30:36 +0000
parents fcdbd97411c4
children 0894f542a30c
comparison
equal deleted inserted replaced
58:fcdbd97411c4 59:250c8bc322c7
1114 1114
1115 // Programs TPU for required task. 1115 // Programs TPU for required task.
1116 // ******************************** 1116 // ********************************
1117 #if (L1_FF_MULTIBAND == 0) 1117 #if (L1_FF_MULTIBAND == 0)
1118 1118
1119 // Get AGC to be applied.
1120 agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
1119 // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo 1121 // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo
1120 lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off; 1122 lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
1121 // Get AGC to be applied.
1122 agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq,l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
1123 1123
1124 #else // L1_FF_MULTIBAND = 1 below 1124 #else // L1_FF_MULTIBAND = 1 below
1125 1125
1126 operative_radio_freq = l1_multiband_radio_freq_convert_into_operative_radio_freq(cell_info_ptr->radio_freq ); 1126 operative_radio_freq = l1_multiband_radio_freq_convert_into_operative_radio_freq(cell_info_ptr->radio_freq );
1127 // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo 1127 // lna_off flag is updated ONLY in case of l1ctl_pgc2 control algo
1524 1524
1525 // Programs TPU for required task. 1525 // Programs TPU for required task.
1526 // ******************************** 1526 // ********************************
1527 #if (L1_FF_MULTIBAND == 0) 1527 #if (L1_FF_MULTIBAND == 0)
1528 1528
1529 // Get AGC to be applied.
1530 agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID);
1529 // lna_off flag is ONLY updated in case of l1ctl_pgc2 control algorithm 1531 // lna_off flag is ONLY updated in case of l1ctl_pgc2 control algorithm
1530 lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off; 1532 lna_off = l1a_l1s_com.last_input_level[cell_info_ptr->radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
1531 // Get AGC to be applied.
1532 agc = Cust_get_agc_from_IL(cell_info_ptr->radio_freq, input_level >> 1, AV_ID);
1533 1533
1534 #else // L1_FF_MULTIBAND = 0 below 1534 #else // L1_FF_MULTIBAND = 0 below
1535 1535
1536 operative_radio_freq = 1536 operative_radio_freq =
1537 l1_multiband_radio_freq_convert_into_operative_radio_freq(cell_info_ptr->radio_freq); 1537 l1_multiband_radio_freq_convert_into_operative_radio_freq(cell_info_ptr->radio_freq);
1699 1699
1700 // Programs TPU for FB26 task. 1700 // Programs TPU for FB26 task.
1701 // **************************** 1701 // ****************************
1702 #if (L1_FF_MULTIBAND == 0) 1702 #if (L1_FF_MULTIBAND == 0)
1703 1703
1704 lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
1705 // agc is just computed from last stored IL 1704 // agc is just computed from last stored IL
1706 agc = Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID); 1705 agc = Cust_get_agc_from_IL(radio_freq, l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, AV_ID);
1706 lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
1707 1707
1708 #else // L1_FF_MULTIBAND = 1 below 1708 #else // L1_FF_MULTIBAND = 1 below
1709 1709
1710 operative_radio_freq = 1710 operative_radio_freq =
1711 l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq); 1711 l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq);
1926 1926
1927 #if (L1_FF_MULTIBAND == 0) 1927 #if (L1_FF_MULTIBAND == 0)
1928 1928
1929 // agc is just computed from last stored IL 1929 // agc is just computed from last stored IL
1930 input_level = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level; 1930 input_level = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].input_level;
1931 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);
1931 lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off; 1932 lna_off = l1a_l1s_com.last_input_level[radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
1932 agc = Cust_get_agc_from_IL(radio_freq, input_level >> 1, AV_ID);
1933 1933
1934 #else // L1_FF_MULTIBAND = 1 below 1934 #else // L1_FF_MULTIBAND = 1 below
1935 1935
1936 operative_radio_freq = 1936 operative_radio_freq =
1937 l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq); 1937 l1_multiband_radio_freq_convert_into_operative_radio_freq(radio_freq);
2065 WORD8 agc; 2065 WORD8 agc;
2066 UWORD8 lna_off; 2066 UWORD8 lna_off;
2067 UWORD32 dsp_task; 2067 UWORD32 dsp_task;
2068 static WORD32 new_tpu_offset; 2068 static WORD32 new_tpu_offset;
2069 static BOOL change_synchro; 2069 static BOOL change_synchro;
2070 #if 0 /* FreeCalypso TCS211 reconstruction */
2070 UWORD8 input_level; 2071 UWORD8 input_level;
2072 #endif
2071 #if (L1_FF_MULTIBAND == 1) 2073 #if (L1_FF_MULTIBAND == 1)
2072 UWORD16 operative_radio_freq; 2074 UWORD16 operative_radio_freq;
2073 #endif 2075 #endif
2074 2076
2075 #if (NEW_SNR_THRESHOLD == 1) 2077 #if (NEW_SNR_THRESHOLD == 1)
2188 2190
2189 offset_smscb = new_tpu_offset + l1a_l1s_com.tn_smscb * TN_WIDTH; 2191 offset_smscb = new_tpu_offset + l1a_l1s_com.tn_smscb * TN_WIDTH;
2190 if (offset_smscb >= TPU_CLOCK_RANGE) 2192 if (offset_smscb >= TPU_CLOCK_RANGE)
2191 offset_smscb -= TPU_CLOCK_RANGE; 2193 offset_smscb -= TPU_CLOCK_RANGE;
2192 2194
2193 #if (L1_FF_MULTIBAND == 0) 2195 #if 1 /* FreeCalypso match TCS211 */
2196
2197 // agc is set with the input_level computed from PAGC algo
2198 agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq, l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level >> 1, MAX_ID);
2199 lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
2200
2201 #elif (L1_FF_MULTIBAND == 0)
2194 2202
2195 // agc is set with the input_level computed from PAGC algo 2203 // agc is set with the input_level computed from PAGC algo
2196 input_level = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level; 2204 input_level = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level;
2205 agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID);
2197 lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off; 2206 lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
2198 agc = Cust_get_agc_from_IL(l1a_l1s_com.Scell_info.radio_freq,input_level >> 1, MAX_ID);
2199 2207
2200 #else // L1_FF_MULTIBAND = 1 below 2208 #else // L1_FF_MULTIBAND = 1 below
2201 2209
2202 operative_radio_freq = 2210 operative_radio_freq =
2203 l1_multiband_radio_freq_convert_into_operative_radio_freq(l1a_l1s_com.Scell_info.radio_freq); 2211 l1_multiband_radio_freq_convert_into_operative_radio_freq(l1a_l1s_com.Scell_info.radio_freq);
2216 l1ddsp_load_dco_ctl_algo_nb(dco_algo_ctl_nb); 2224 l1ddsp_load_dco_ctl_algo_nb(dco_algo_ctl_nb);
2217 #endif 2225 #endif
2218 2226
2219 // Store IL used for current CTRL in order to be able to buil IL from pm 2227 // Store IL used for current CTRL in order to be able to buil IL from pm
2220 // in READ phase. 2228 // in READ phase.
2221 #if (L1_FF_MULTIBAND == 0) 2229 #if 1 /* FreeCalypso match TCS211 */
2230
2231 l1a_l1s_com.Scell_used_IL.input_level = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].input_level;
2232 l1a_l1s_com.Scell_used_IL.lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
2233
2234 #elif (L1_FF_MULTIBAND == 0)
2222 2235
2223 l1a_l1s_com.Scell_used_IL.input_level = input_level; 2236 l1a_l1s_com.Scell_used_IL.input_level = input_level;
2224 l1a_l1s_com.Scell_used_IL.lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off; 2237 l1a_l1s_com.Scell_used_IL.lna_off = l1a_l1s_com.last_input_level[l1a_l1s_com.Scell_info.radio_freq - l1_config.std.radio_freq_index_offset].lna_off;
2225 2238
2226 #else // L1_FF_MULTIBAND = 1 below 2239 #else // L1_FF_MULTIBAND = 1 below