changeset 72:43a6f6b32440

l1_cmplx.c: l1s_read_mon_result() reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Mon, 28 Mar 2016 05:29:40 +0000
parents f2d3ee22dea7
children 9db082cacbeb
files chipsetsw/layer1/cfile/l1_cmplx.c
diffstat 1 files changed, 15 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_cmplx.c	Mon Mar 28 04:32:25 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_cmplx.c	Mon Mar 28 05:29:40 2016 +0000
@@ -6649,7 +6649,7 @@
     /* Frequency burst detection result...               */
     /*---------------------------------------------------*/
     {
-      if((en_task))
+      if((en_task) && !(task_param))
       // Check the task semaphore and the task enable bit. The reading
       // task body is executed only when the task semaphore is 0 and the
       // task is still enabled.
@@ -6658,7 +6658,7 @@
       {
         flag  = l1s_dsp_com.dsp_ndb_ptr->d_fb_det              & 0xffff; //  1 means FOUND.
         toa   = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_TOA]   & 0xffff; //  Unit is BIT.
-        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff);
+        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff) >> 5;
                                                                          //  WARNING... to be used!!!
         #if TESTMODE
           pm_fullres = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM] & 0xffff;  // F26.6
@@ -6686,7 +6686,6 @@
         }
 
 //       l1_check_pm_error(pm, task);
-         pm  = pm >> 5;
 
         #if TRACE_TYPE==3
           stats_samples_fb(flag,toa,pm,angle,snr);
@@ -6775,9 +6774,11 @@
         l1s_clear_mftab(l1s.mftab.frmlst);
         l1s.frame_count = 0;
 
+#if 0	/* FreeCalypso TCS211 reconstruction */
         // This task is not compatible with Neigh. Measurement.
         // Clear "forbid_meas" to indicate when the task is complete.
         l1s.forbid_meas = 0;
+#endif
       }
     }
     break;
@@ -6792,7 +6793,7 @@
       // read cell identifier.
       neigh_id = l1a_l1s_com.nsync.active_fb_id;
 
-      if((en_task))
+      if((en_task) && !(task_param))
       // Check the task semaphore and the task enable bit. The reading
       // task body is executed only when the task semaphore is 0 and the
       // task is still enabled.
@@ -6801,7 +6802,7 @@
       {
         flag  = l1s_dsp_com.dsp_ndb_ptr->d_fb_det              & 0xffff; //  1 means FOUND.
         toa   = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_TOA]   & 0xffff; //  Unit is BIT.
-        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff);
+        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff) >> 5;
                                                                          //  WARNING... to be used!!!
         #if TESTMODE
           pm_fullres = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM] & 0xffff;  // F10.6
@@ -6809,7 +6810,6 @@
 
         // CQ 19836: do not check PM on FB26
         //l1_check_pm_error(pm, task);
-        pm = pm >> 5;
 
         angle = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_ANGLE] & 0xffff; //  WARNING... to be used!!!
         snr   = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_SNR]   & 0xffff; //  WARNING... to be used!!!
@@ -6857,7 +6857,7 @@
       {
         flag  = !(((l1s_dsp_com.dsp_ndb_ptr->a_sch26[0] & 0xffff) & (1<<B_SCH_CRC)) >> B_SCH_CRC); //  1 means ERROR.
         toa   = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_TOA]   & 0xffff;  //  Unit is BIT.
-        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff);
+        pm    = (l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM]   & 0xffff) >> 5;
                                                                           //  WARNING... to be used!!!
         #if TESTMODE
           pm_fullres = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM] & 0xffff;  // F26.6
@@ -6868,7 +6868,6 @@
         data  = &(l1s_dsp_com.dsp_ndb_ptr->a_sch26[3]);                   // Set data block pointer (skip header).
 
         l1_check_pm_error(pm, task);
-	pm = pm >> 5;
 
         // Call SB report function (send report msg to L1A).
         #if TESTMODE
@@ -6920,7 +6919,7 @@
 
         flag  = !(((l1s_dsp_com.dsp_db_r_ptr->a_sch[0] & 0xffff) & (1<<B_SCH_CRC)) >> B_SCH_CRC); //  1 means ERROR.
         toa   = l1s_dsp_com.dsp_db_r_ptr->a_serv_demod[D_TOA]   & 0xffff;  //  Unit is BIT.
-        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;
                                                                            //  WARNING... to be used!!!
         #if TESTMODE
           pm_fullres = l1s_dsp_com.dsp_ndb_ptr->a_sync_demod[D_PM] & 0xffff;  // F26.6
@@ -6935,14 +6934,20 @@
         #endif
 
         l1_check_pm_error(pm, task);
-	pm = pm >> 5;
 
         // CQ30474. In case SNR is too low, the SB shall be considered as failed.
         // This is valuable for code running on target with DSP 3606.
+
+	/*
+	 * FreeCalypso: despite the above comment,
+	 * this code is NOT present in TCS211.
+	 */
+#if 0
 #if (CODE_VERSION == NOT_SIMULATION)
        if ( snr < MIN_ACCEPTABLE_SNR_FOR_SB )
          flag = FALSE;
 #endif
+#endif
 
         #if L2_L3_SIMUL
           #if (DEBUG_TRACE == BUFFER_TRACE_OFFSET_NEIGH)