changeset 39:d63f8505bf0c

l1_cmplx.c compiles in the l1_ext pass, l1_cmplx_intram still fails
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Wed, 28 Oct 2015 05:44:43 +0000
parents 7f5eb5189d52
children d38c6c5bd9da
files chipsetsw/layer1/cfile/l1_cmplx.c chipsetsw/layer1/include/l1_ctl.h chipsetsw/layer1/include/l1_proto.h
diffstat 3 files changed, 51 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_cmplx.c	Wed Oct 28 04:13:05 2015 +0000
+++ b/chipsetsw/layer1/cfile/l1_cmplx.c	Wed Oct 28 05:44:43 2015 +0000
@@ -2074,12 +2074,12 @@
   UWORD8 saic_flag=0;
 #endif /* NEW_SNR_THRESHOLD */
 #if (RF_FAM == 61)
-    UWORD16 dco_algo_ctl_nb = 0;
-    UWORD8 if_ctl = 0;
-	UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
-#endif
+  UWORD16 dco_algo_ctl_nb = 0;
+  UWORD8 if_ctl = 0;
+  UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
   // By default we choose the hardware filter
   UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
+#endif
 
   // Needed for simulated DSP GRPS scheduler
   #if (CODE_VERSION == SIMULATION)
@@ -2433,17 +2433,18 @@
   static  BOOL    BCCHS_in_transfert = FALSE;
   static  BOOL    change_synchro;//OMAPS90550-new
 #endif
-UWORD8 input_level = 0; //omaps00090550
+  UWORD8 input_level = 0; //omaps00090550
 #if (RF_FAM == 61)
-    UWORD16 dco_algo_ctl_nb = 0;
-    UWORD8 if_ctl = 0;
-	UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
+  UWORD16 dco_algo_ctl_nb = 0;
+  UWORD8 if_ctl = 0;
+  UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
+  // By default we choose the hardware filter
+  UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
 #endif
 #if (NEW_SNR_THRESHOLD == 1)
   UWORD8 saic_flag=0;
 #endif /* NEW_SNR_THRESHOLD */
-  // By default we choose the hardware filter
-  UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
+
 #if (FF_L1_FAST_DECODING == 1)
   BOOL fast_decoding_authorized = FALSE;
 
@@ -2730,6 +2731,16 @@
       if (burst_id == BURST_1)
         l1s.forbid_meas = TASK_ROM_MFTAB[task].size;
 
+       /*
+	* FreeCalypso Frankenstein: the following code can't be compiled
+	* using TCS211 L1 data structure definitions, as l1s structure
+	* field algo_change_synchro_active is newly added in the LoCosto
+	* version.  We are adding a preprocessor conditional which we'll
+	* enable when we regain the ability to modify data structure
+	* definitions.
+	*/
+
+    #if HAVE_ALGO_CHG_SYNC_ACT_FIELD
       if (new_offset >= 4)
         l1s.algo_change_synchro_active = TRUE;
 
@@ -2746,6 +2757,7 @@
       }
       //no synchro change required, but new offset is computed
       else
+    #endif
       {
         new_synchro = l1s.tpu_offset;
         new_offset = (new_offset * TN_WIDTH) + new_synchro;
@@ -2892,6 +2904,8 @@
          (l1a_l1s_com.l1s_en_task[PDTCH]  == TASK_ENABLED) ||
          (l1a_l1s_com.l1s_en_task[SINGLE] == TASK_ENABLED)))
     {
+      /* FreeCalypso Frankenstein - see above */
+      #if HAVE_ALGO_CHG_SYNC_ACT_FIELD
         if((burst_id == BURST_4) && l1s.algo_change_synchro_active)
         {
 
@@ -2913,6 +2927,7 @@
               trace_fct(CST_L1S_ADJUST_TIME, (UWORD32)(-1));//OMAPS00090550
             #endif
         }
+      #endif
     }
 
     // in case of EBCCHS and NBCCHS in packet transfer a change synchro is performed
@@ -4143,12 +4158,12 @@
   UWORD32                 fn_mod_52;
   UWORD8 input_level;
 #if (RF_FAM == 61)
-    UWORD16 dco_algo_ctl_nb = 0;
-    UWORD8 if_ctl = 0;
-	UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
-#endif
+  UWORD16 dco_algo_ctl_nb = 0;
+  UWORD8 if_ctl = 0;
+  UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
   // By default we choose the hardware filter
   UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
+#endif
 #if FF_L1_IT_DSP_DTX
   BOOL                    dtx_dsp_interrupt=FALSE; //omaps00090550
 #endif
@@ -4721,12 +4736,12 @@
   UWORD32                 dsp_task;
   UWORD32                 fn_mod_104;
 #if (RF_FAM == 61)
-    UWORD16 dco_algo_ctl_nb;
+  UWORD16 dco_algo_ctl_nb;
   UWORD8 if_ctl =0 ; //omaps00090550
   UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
-#endif
   // By default we choose the hardware filter
   UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
+#endif
 #if FF_L1_IT_DSP_DTX
   BOOL                    dtx_dsp_interrupt = FALSE;
 #endif
@@ -5442,12 +5457,12 @@
   UWORD8                 adc_active_ul = INACTIVE;
   UWORD8                 adc_active_dl = INACTIVE;
 #if (RF_FAM == 61)
-       UWORD16 dco_algo_ctl_nb = 0;
-       UWORD8 if_ctl = 0;
-	   UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
-#endif
+  UWORD16 dco_algo_ctl_nb = 0;
+  UWORD8 if_ctl = 0;
+  UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
   // By default we choose the hardware filter
   UWORD8 csf_filter_choice = L1_SAIC_HARDWARE_FILTER;
+#endif
 #if (NEW_SNR_THRESHOLD == 1)
   UWORD8 saic_flag=0;
 #endif /*NEW_SNR_THRESHOLD */
--- a/chipsetsw/layer1/include/l1_ctl.h	Wed Oct 28 04:13:05 2015 +0000
+++ b/chipsetsw/layer1/include/l1_ctl.h	Wed Oct 28 05:44:43 2015 +0000
@@ -18,6 +18,13 @@
 #define  C_SNR_THR       8192   // 8   F6.10
 #define  TOA_HISTO_LEN   11     // Histogram length          
 
+/*
+ * FreeCalypso Frankenstein: the following definition has been added
+ * from LoCosto version of this file, as it is used by l1_cmplx.c
+ * fairly extensively.
+ */
+#define   IL_FOR_RXLEV_SNR      220 // RX POWER LEVEL  //increased from 210 to 220
+
 /************************************/
 /* Automatic Gain Control (AGC)     */
 /************************************/
--- a/chipsetsw/layer1/include/l1_proto.h	Wed Oct 28 04:13:05 2015 +0000
+++ b/chipsetsw/layer1/include/l1_proto.h	Wed Oct 28 05:44:43 2015 +0000
@@ -513,7 +513,15 @@
 //functions for customization
 void Cust_init_std         (void);
 void Cust_init_params      (void);
-WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id);
+/*
+ * FreeCalypso Frankenstein: TCS211 version of Cust_get_agc_from_IL()
+ * takes 3 arguments, but LoCosto adds a fourth.  The code in l1_cmplx.c
+ * makes 4-argument calls throughout.  We'll add the fourth argument
+ * to the prototype here, even while we are using the original TCS211
+ * l1_cust object where this function is implemented: passing an extra
+ * argument to a function that doesn't expect one is harmless.
+ */
+WORD8 Cust_get_agc_from_IL (UWORD16 radio_freq, UWORD16 agc_index, UWORD8 table_id,UWORD8 lna_off_val);
 WORD8 l1ctl_encode_delta1  (UWORD16 radio_freq);
 WORD8 l1ctl_encode_delta2  (UWORD16 radio_freq);
 void Cust_get_ramp_tab     (API *a_ramp, UWORD8 txpwr_ramp_up, UWORD8 txpwr_ramp_down, UWORD16 radio_freq);