changeset 66:0633e0378176

l1_cmplx.c: l1s_read_dedic_dl() reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 28 Mar 2016 03:04:21 +0000
parents 549dc74942a0
children 0375d76ce7be
files chipsetsw/layer1/cfile/l1_cmplx.c
diffstat 1 files changed, 101 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- 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