changeset 51:33a5b7300113

l1_async.c: l1a_dedicated_process(): dynamic dwnld reconstructed, but other differences remain to be analysed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 24 Mar 2016 04:26:41 +0000
parents 3557ef98f013
children e81637568b09
files chipsetsw/layer1/cfile/l1_async.c
diffstat 1 files changed, 89 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_async.c	Sat Mar 05 00:59:10 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_async.c	Thu Mar 24 04:26:41 2016 +0000
@@ -116,6 +116,7 @@
     #include "l1aac_signa.h"
   #endif
   #if (L1_DYN_DSP_DWNLD == 1)
+    #include <stdio.h>
     #include "l1_dyn_dwl_signa.h"
   #endif
 
@@ -5800,9 +5801,10 @@
 {
   enum states
   {
-    RESET     = 0,
-    WAIT_INIT = 1,
-    WAIT_MSG  = 2
+    RESET          = 0,
+    WAIT_INIT      = 1,
+    WAIT_DYN_DWNLD = 2,
+    WAIT_MSG       = 3
   };
 
           T_DEDIC_SET  *free_set;
@@ -5938,18 +5940,46 @@
             // Set "fset" pointer to the new parameter set.
             l1a_l1s_com.dedic_set.fset = free_set;
 
-            // Give new msg code to L1S.
-            l1a_l1s_com.dedic_set.SignalCode = MPHC_IMMED_ASSIGN_REQ;
-
-            #if (TRACE_TYPE==5) && FLOWCHART
-              trace_flowchart_dedic(l1a_l1s_com.dedic_set.SignalCode);
-            #endif
-
-            // Set confirmation message name.
-            l1a.confirm_SignalCode = MPHC_IMMED_ASSIGN_CON;
-
-            // step in state machine.
-            *state = WAIT_MSG;
+            /*
+             * FreeCalypso: the following logic related to dynamic DSP
+             * patching has been reconstructed from our only available
+             * binary object version.
+             */
+          #if (L1_DYN_DSP_DWNLD == 1)
+            if (l1a.dyn_dwnld.semaphore_vect[DEDI_STATE_MACHINE]==GREEN)
+          #endif
+            {
+              // Give new msg code to L1S.
+              l1a_l1s_com.dedic_set.SignalCode = MPHC_IMMED_ASSIGN_REQ;
+
+              #if (TRACE_TYPE==5) && FLOWCHART
+                trace_flowchart_dedic(l1a_l1s_com.dedic_set.SignalCode);
+              #endif
+
+              // Set confirmation message name.
+              l1a.confirm_SignalCode = MPHC_IMMED_ASSIGN_CON;
+
+              // step in state machine.
+              *state = WAIT_MSG;
+            }
+          #if (L1_DYN_DSP_DWNLD == 1)
+            else
+            {
+              *state = WAIT_DYN_DWNLD;
+              #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 5))
+                if((trace_info.current_config->l1_dyn_trace) & (1<<L1_DYN_TRACE_DYN_DWNLD))
+                {
+                  char str[30];
+                  sprintf(str,"DEDI SM blocked by DYN DWNLD\r\n");
+                  #if(CODE_VERSION == SIMULATION)
+                     trace_fct_simu_dyn_dwnld(str);
+                  #else
+                     rvt_send_trace_cpy((T_RVT_BUFFER)str,trace_info.l1_trace_user_id,strlen(str),RVT_ASCII_FORMAT);
+                  #endif
+                }
+              #endif    // (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
+            }
+          #endif
           }
           break;
 
@@ -6598,6 +6628,50 @@
       }
       break;
 
+      /*
+       * FreeCalypso: the following logic related to dynamic DSP
+       * patching has been reconstructed from our only available
+       * binary object version.
+       */
+    #if (L1_DYN_DSP_DWNLD == 1)
+      case WAIT_DYN_DWNLD:
+      {
+        if((SignalCode==API_L1_DYN_DWNLD_FINISHED) && (l1a.dyn_dwnld.semaphore_vect[DEDI_STATE_MACHINE] == GREEN))
+        {
+          /* replicate the code that would have executed originally */
+
+          // Give new msg code to L1S.
+          l1a_l1s_com.dedic_set.SignalCode = MPHC_IMMED_ASSIGN_REQ;
+
+          #if (TRACE_TYPE==5) && FLOWCHART
+            trace_flowchart_dedic(l1a_l1s_com.dedic_set.SignalCode);
+          #endif
+
+          // Set confirmation message name.
+          l1a.confirm_SignalCode = MPHC_IMMED_ASSIGN_CON;
+
+          #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4) || (TRACE_TYPE == 5))
+            if((trace_info.current_config->l1_dyn_trace) & (1<<L1_DYN_TRACE_DYN_DWNLD))
+            {
+              char str[30];
+              sprintf(str,"DEDI SM un-blocked\r\n");
+              #if(CODE_VERSION == SIMULATION)
+                 trace_fct_simu_dyn_dwnld(str);
+              #else
+                 rvt_send_trace_cpy((T_RVT_BUFFER)str,trace_info.l1_trace_user_id,strlen(str),RVT_ASCII_FORMAT);
+              #endif
+            }
+          #endif    // (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
+
+          // step in state machine.
+          *state = WAIT_MSG;
+        }
+        // End process
+        end_process = 1;
+      }
+      break;
+    #endif
+
       case WAIT_MSG:
       {
         switch(SignalCode)