Cleaned up system stream.
authorFrank Livingston <frank-livingston@ti.com>
Sat, 29 Apr 2017 21:15:48 +0000 (16:15 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Sat, 29 Apr 2017 21:15:48 +0000 (16:15 -0500)
1) gSysInit renamed to gSysStreamInit.
2) gSysStreamInit declaration moved to systemStream.c, extern'd in systemStream.h.
3) Moved system stream task code from system.c to systemStream.c (system.c is SS configuration only).
4) sysInit Task uses gSysStreamInit exported from systemStream.c.
5) Added header files for itopo/identify.h and itopo/system.c. Replaced externs in various .c files for externs defined in .c files corresponding to these header files.

Fixed PFP for autoprocessing to call pfpEnd() and thus not be "inside" autoprocessing PFP when auto processing completes.
Fixed PFP for decode processing to call pfpEnd() and thus not be "inside" decode processing PFP when decode processing completes.

Added partial alpha interface for PFPs:
1) enable/disable PFPs over alpha commands
2) reset PFPs over alpha commands

pasdk/test_dsp/.cproject
pasdk/test_dsp/application/main.c
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/audioStreamOutProc.c
pasdk/test_dsp/framework/itopo/identify.h [new file with mode: 0644]
pasdk/test_dsp/framework/itopo/system.c
pasdk/test_dsp/framework/itopo/system.h [new file with mode: 0644]
pasdk/test_dsp/framework/systemInit.c
pasdk/test_dsp/framework/systemStream.c
pasdk/test_dsp/framework/systemStream.h

index e32714429d3a927af9ab2db9f0fabcc167e59fe5..c2f63ab12f64575dc4944e58088a24ad7419fb4f 100644 (file)
@@ -11,8 +11,8 @@
                                        <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CPPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                </macros>
                                <externalSettings/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/paf/pa/util/statusop_common&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/sio&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework&quot;"/>
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/framework/itopo&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/test_dsp/application/itopo/evmk2g/alpha&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/common&quot;"/>
                                                                        <listOptionValue builtIn="false" value="&quot;${PROC_AUDIO_SDK_ROOT}/pasdk/shared&quot;"/>
                                        <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CPPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                </macros>
                                <externalSettings/>
                                        <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
+                                       <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                </macros>
                                <externalSettings/>
                                        <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
                                        <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CPPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                </macros>
                                <externalSettings/>
                                        <stringMacro name="AIF2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="CSL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="MMCSD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PDK_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti/processor_audio_sdk_1_00_00_02/psdk_cust/pdk_k2g_1_0_1_1_eng/packages"/>
+                                       <stringMacro name="ICSS_EMAC_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="USB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="I2C_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN2_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="IQN_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PKTLIB_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SRIO_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="DFE_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="UART_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="NWAL_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SPI_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                </macros>
                                <externalSettings/>
index 613d657a31e3418961b4d6802864de3df2c2b1e3..3e7c6200cd05ece726501eb056728cfe0e28adfb 100644 (file)
@@ -73,21 +73,23 @@ Int main()
     pfpCreate();
     pfpCalibrate(1000);
     pfpResetStats(0); // FL: this is currently required to reset stats for PFP #0 after calibration.
-    for (k = 0; k <= PFP_ID_LAST; k++) 
-    {
-        pfpEnable(k);   /* Enable profile point #k */
-    }
+    //for (k = 0; k <= PFP_ID_LAST; k++) 
+    //{
+    //    pfpEnable(k);   /* Enable profile point #k */
+    //}
     for (k = 1; k <= PFP_ID_LAST; k++)
     {
         pfpSetAlpha(k, PFP_DEF_ALPHA);  /* Set default exp. avg. time const. */
     }    
     // debug: dummy load
+    pfpEnable(0);   /* Enable profile point #0 */
     for (k = 0; k < 1000; k++) 
     {
         pfpBegin(PFP_ID_MAIN,0);
         clkWorkDelay(CLK_WORKCNT_PER_MS);     /* This should take about 750,000 cycles to execute, or 750e3/600e6=1.25 msec. */
         pfpEnd(PFP_ID_MAIN,0);
     }    
+    pfpDisable(0);   /* Disable profile point #0 */
     
     //Platform setup!!!
     /*
index 142e7eca885f137e22696b556961ea72e2fb7454..f822db70d255d4f010d6d73ce9be6bfef0693e4a 100644 (file)
@@ -760,6 +760,11 @@ Void taskAsipFxn(
         }
 
 #ifdef NON_CACHE_STATUS
+        // Measure cycles in autodet processing loop.
+        // Only measures cycles spent in loop.
+        pfpEnd(PFP_ID_ASIT_0, PFP_FINISH_MEAS);      // PFP end
+        pfpBegin(PFP_ID_ASIT_0, pC->taskHandle);     // PFP begin
+
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
                       sizeof(tempVar8),
@@ -787,6 +792,8 @@ Void taskAsipFxn(
         }
 #endif
         
+        pfpEnd(PFP_ID_ASIT_0, PFP_FINISH_MEAS);      // PFP end -- outside of PFP for autodetection complete
+        
         // query for input type
         if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM, (Arg )&sourceProgram))
         {
@@ -1950,10 +1957,7 @@ PAF_ASIT_autoProcessing(
                 GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_99);
             toggleState = ~(toggleState);
         }
-#endif        
-        pfpEnd(PFP_ID_ASIT_0, PFP_FINISH_MEAS);
-        pfpBegin(PFP_ID_ASIT_0, pC->taskHandle);
-        
+#endif                
         TRACE_TERSE2("PAF_ASIT_autoProcessing: AS%d: SIO_reclaim returned 0x%x, ignoring", as+zMS, nbytes);
         return nbytes;
     }
@@ -2248,11 +2252,11 @@ PAF_ASIT_decodeProcessing(
                     gAsipInfo2_PrimaryErrCnt++;
                     break;
                 }
-                
+                                
                 // Measure cycles in decode processing loop.
                 // Only measures cycles spent in loop.
-                pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);
-                pfpBegin(PFP_ID_ASIT_1, pC->taskHandle);
+                pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);     // PFP end
+                pfpBegin(PFP_ID_ASIT_1, pC->taskHandle);    // PFP begin
 
                 if (errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block))
                 {
@@ -2319,6 +2323,8 @@ PAF_ASIT_decodeProcessing(
 
         }  // End of switch (state).
 
+        pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Input SIO change
+        
         TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: Calling decode complete");
         if (pP->fxns->decodeComplete(pP, pQ, pC, alg, frame, block))
         {
index 351314d099078aedd4af2d7770cbecfd20cd6033..c63e826d115cda05ccdc3c83a01242ad7b152695 100644 (file)
@@ -1544,6 +1544,8 @@ PAF_ASOT_decodeProcessing(
 
         }  // End of switch (state).
         
+        pfpEnd(PFP_ID_ASOT_0, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Output SIO change
+
         TRACE_VERBOSE0("PAF_ASOT_decodeProcessing: Calling decode complete");
         if (pP->fxns->decodeComplete(pP, pQ, pC, NULL, frame, block))
         {
diff --git a/pasdk/test_dsp/framework/itopo/identify.h b/pasdk/test_dsp/framework/itopo/identify.h
new file mode 100644 (file)
index 0000000..802ab13
--- /dev/null
@@ -0,0 +1,43 @@
+
+/*
+Copyright (c) 2016, Texas Instruments Incorporated - http://www.ti.com/
+All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without 
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of Texas Instruments Incorporated nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+#ifndef _IDENTIFY_H_
+#define _IDENTIFY_H_
+
+#include <ti/xdais/ialg.h>
+
+extern IALG_Status pafIdentification;
+
+#endif // _IDENTIFY_H_
index 65caeb8faeb5ea3363852b639b4d699974cf596b..748b3e2e0b2c1b1e88f34dd859bb0ebe5521457c 100644 (file)
@@ -33,21 +33,29 @@ All rights reserved.
 *
 */
 
+//
+// Contains definitions for System Stream parameters, status, and configuration.
+//
+
 #include <xdc/std.h>
-#include <xdc/cfg/global.h>
-#include <xdc/runtime/Log.h>
-#include <xdc/runtime/System.h>
-#include <ti/sysbios/knl/Task.h>
-#include <ti/sysbios/knl/Clock.h>
 
 #include <paftyp.h>
 #include <pafsys_a.h> 
 #include "noasp.h"
 #include "systemStream.h"
 
-// Minimum time between invocation of system stream processing
-#define SYSTEM_STREAM_PROC_INTERVAL ( 1000 )    // in msec.
-
+#include "pfp/pfp.h"
+#include "pfp_app.h"        /* contains all PFP ID's */
+
+#define PFP_ENABLE_MASK ( (1<<PFP_ID_ASIT_0) | \
+                          (1<<PFP_ID_ASIT_1) | \
+                          (1<<PFP_ID_ASOT_0) | \
+                          (1<<PFP_ID_ASOT_ASP_0) | \
+                          (1<<PFP_ID_ASOT_ASP_1) | \
+                          (1<<PFP_ID_ASOT_ASP_2) | \
+                          (1<<PFP_ID_ASOT_ASP_3) )
+                          
+// System Stream parameters, primary functions
 const struct {
     PAF_SST_FxnsMain *main;
     Int count;
@@ -80,6 +88,7 @@ const struct {
     },
 };
 
+// System Stream paramters
 const PAF_SST_Params systemStreamParams_PA[1] =
 {
     {
@@ -88,9 +97,7 @@ const PAF_SST_Params systemStreamParams_PA[1] =
     },
 };
 
-#define systemStreamParams systemStreamParams_PA
-
-// Default system status
+// System Stream (SYS) status
 PAF_SystemStatus systemStreamStatus[1] = {
     {
         sizeof (PAF_SystemStatus),
@@ -124,89 +131,28 @@ PAF_SystemStatus systemStreamStatus[1] = {
         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerCntrSurr
         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerLRCntr
         0 + PAF_SYS_SPEAKERSIZE_NONE,   // speakerLRCntrSurr
+#else
+        0, 0, 0, 0, 0, 0, 0, 0          // unused3
 #endif
         0, 0,                           // asitLoad, peakAsitLoad
         0, 0,                           // asotLoad, peakAsotLoad
         0, 0,                           // aipLoad,  peakAipLoad
         0, 0,                           // afpLoad,  peakAfpLoad
-        0, 0                            // ssLoad,   peakSsLoad        
+        0, 0,                           // ssLoad,   peakSsLoad   
+        0, 0,                           // unused4
+        0,                              // pfpDisableMask
+        0,                              // pfpEnableMask
+        PFP_ENABLE_MASK,                // pfpEnabledBf
+        0                               // pfpResetStatsMask
     },
 };
 
+// System Stream configuration
 PAF_SST_Config systemStreamConfig[1] =
 {
     {
+        0,                              // firstTimeInit
         NULL,                           // acp
         &systemStreamStatus[0],         // pStatus
     },
 };
-
-
-extern Int gSysInit;
-
-// FL: debug
-//#define MAX_CAP_CUR_TIME ( 100 )
-//UInt32 gCurTime[MAX_CAP_CUR_TIME];
-//Uint32 gCurTimeIdx=0;
-
-/*
- *  ======== taskSystemStreamFxn ========
- *  IDLE function for audio stream
- */
-Void taskSystemStreamFxn()
-{
-    Int32 i;
-    UInt32 elapsed, now, then=0;
-    UInt32 time, interval;
-
-    //System_printf("Enter idleAudioStream()\n");    
-    //Log_info0("Enter idleAudioStream()");
-
-    time = SYSTEM_STREAM_PROC_INTERVAL; // in msec.
-
-    while (1)
-    {
-        // Compute interval in system clock ticks, interval time expressed in msec.
-        // Performing calculation inside while loop allows changes in system clock tick period.
-        interval = time * USEC_PER_MSEC / Clock_tickPeriod;
-
-        // Compute elapsed time
-        // Note in case of wrap of 32-bit return value for now,
-        // (now-then) calculation is correct despite (now<then)
-        // due to 2s complement arithmetic.
-        now = Clock_getTicks();
-        elapsed = now - then;
-        then = now; // latch "now" as "then" for next iteration
-
-        // If elapsed time since last iteration is less than desired System Stream period,
-        // then sleep until interval has passed.
-        // Otherwise execute functions in System Stream.
-        if (interval > elapsed)
-        {
-            Task_sleep(interval - elapsed);
-        }
-
-        //if (gSysInit == 0)
-        //  return;
-    
-        // FL: debug
-        //gCurTime[gCurTimeIdx] = Clock_getTicks();
-        //gCurTimeIdx++;
-        //if (gCurTimeIdx >= MAX_CAP_CUR_TIME)
-        //{
-        //    gCurTimeIdx = 0;
-        //}
-
-        for (i=0; i < lengthof(systemStreamConfig); i++)
-        {
-            systemStreamParams[i].fxns->main
-                (&systemStreamParams[i], &systemStreamConfig[i]);            
-        }
-
-        if (gSysInit == 0)
-        {
-            gSysInit = 1;  // Indicate system Init to resume
-        }
-    }
-}
-
diff --git a/pasdk/test_dsp/framework/itopo/system.h b/pasdk/test_dsp/framework/itopo/system.h
new file mode 100644 (file)
index 0000000..25585a7
--- /dev/null
@@ -0,0 +1,66 @@
+
+/*
+Copyright (c) 2017, Texas Instruments Incorporated - http://www.ti.com/
+All rights reserved.
+
+* Redistribution and use in source and binary forms, with or without 
+* modification, are permitted provided that the following conditions
+* are met:
+*
+* Redistributions of source code must retain the above copyright
+* notice, this list of conditions and the following disclaimer.
+*
+* Redistributions in binary form must reproduce the above copyright
+* notice, this list of conditions and the following disclaimer in the
+* documentation and/or other materials provided with the
+* distribution.
+*
+* Neither the name of Texas Instruments Incorporated nor the names of
+* its contributors may be used to endorse or promote products derived
+* from this software without specific prior written permission.
+*
+* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*
+*/
+
+#ifndef _SYSTEM_H_
+#define _SYSTEM_H_
+
+#include <xdc/std.h>
+
+#include <paftyp.h>
+#include <pafsys_a.h> 
+#include "systemStream.h"
+
+#define systemStreamParams systemStreamParams_PA
+
+// System Stream parameters, primary functions                          
+extern const struct {
+    PAF_SST_FxnsMain *main;
+    Int count;
+    struct {
+        PAF_SST_FxnsCompute  *compute;
+        PAF_SST_FxnsTransmit *transmit;
+    } sub[5];
+} systemStreamPrimaryFxns;
+
+// System Stream paramters
+extern const PAF_SST_Params systemStreamParams_PA[1];
+
+// System Stream (SYS) status
+extern PAF_SystemStatus systemStreamStatus[1];
+
+// System Stream configuration
+extern PAF_SST_Config systemStreamConfig[1];
+
+#endif // _SYSTEM_H_
index b9a9512be66c7fed8b908187fb0fd2b3d904f288..a9206aec80dab3a593ce9c590874d4f440663f21 100644 (file)
@@ -55,6 +55,7 @@ All rights reserved.
 #include "audioStreamProc_common.h" // ASIT/ASOT/ASDT config
 #include "audioStreamInpProc.h"
 #include "audioStreamOutProc.h"
+#include "systemStream.h"
 
 extern Void ACP_main_cus(Void);     // (*** ?) FL: revisit -- check method of patching alpha codes
 extern Void taskSystemStreamFxn(Void);  // (*** ?) FL: revisit -- shouldn't need to call this from system init
@@ -69,8 +70,6 @@ extern PAF_ASIT_Fxns PAF_ASIT_params_fxns;
 extern PAF_ASOT_Fxns PAF_ASOT_params_fxns;
 #endif
 
-Int gSysInit=0;
-
 #define TASK_AFP_PRI        ( 2 )
 #define TASK_AIP_PRI        ( 3 )
 #define TASK_SSP_PRI        ( 1 )
@@ -200,11 +199,10 @@ Void taskSysInitFxn(Void)
     
     /* This is required to use SYS alpha codes in atboot? */
     Log_info0("taskSysInitFxn:TaskSystemStream resume");
-    gSysInit = 0;
     Task_setPri(TaskSystemStream, TASK_SSP_PRI);
     // Wait until Execution of TaskSystemStream is complete
     // once.
-    while (gSysInit == 0)  // gSysInit is set to 1 in TaskSystemStream
+    while (gSysStreamInit == 0)  // gSysStreamInit is set to 1 in TaskSystemStream
     {
        Task_sleep(SYS_INIT_SLEEP);
     }
index 6b71de640d1e75aada2ea8dcba21311a2118410d..835aa6b5aceaec2682f8d565bab63ec824c00753 100644 (file)
@@ -52,6 +52,7 @@ All rights reserved.
 #include <xdc/std.h>
 #include <xdc/cfg/global.h>
 #include <xdc/runtime/Log.h>
+#include <ti/sysbios/knl/Clock.h>
 #include <ti/sysbios/knl/Task.h>
 #include <ti/sysbios/utils/Load.h>
 
@@ -60,6 +61,9 @@ All rights reserved.
 #include <pafcc.h>
 //#include "alg.h"
 #include "logp.h"
+
+#include "identify.h"
+#include "system.h"
 #include "systemStream.h"
 
 #include <acp.h>
@@ -81,7 +85,16 @@ All rights reserved.
 #define FULL_SPEAKER
 #endif
 
-extern IALG_Status pafIdentification;
+#include "pfp/pfp.h"
+#include "pfp_app.h"        /* contains all PFP ID's */
+
+// Minimum time between invocation of system stream processing
+#define SYSTEM_STREAM_PROC_INTERVAL ( 1000 )    // in msec.
+
+// Indicates whether system stream initialized.
+// 0: uninitialized
+// 1: initialized
+Int gSysStreamInit=0;
 
 //
 // systemStream : audio stream control function (main)
@@ -102,51 +115,75 @@ systemStreamMain(
 
     LINNO_RPRT (systemStreamMain, -1);
 
-    // Initialize on first invocation:
-    if (!pC->acp) 
+    // Initialize on first invocation
+    if (pC->firstTimeInit == 0)
     {
-        ALG_Handle acpAlg;
-        ACP_Handle acp;
-        Int32 betaPrimeValue = ss - 1;
-        Int32 betaPrimeOffset;
-        Int32 betaPrime;
-
-        // Initialize algorithms
+        UInt32 pfpEnabledBf;
+        UInt8 i;
 
-        // Create an ACP algorithm instance with trace enabled
-        ACP_MDS_init();
-
-        // Create ACP instance for System Stream
-        if ( !(acpAlg = (ALG_Handle )ACP_MDS_create (NULL)) )
+        // Apply PFP enable bitfield
+        if (pStatus->pfpEnabledBf != 0)
         {
-            //LOG_printf(&trace, "SS%d: ACP algorithm instance creation failed",
-            //    ss);
-            Log_error1("SS%d: ACP algorithm instance creation failed", (IArg)ss);
-            LINNO_RPRT (systemStreamMain, __LINE__);
-            return;
+            pfpEnabledBf = pStatus->pfpEnabledBf;
+            i = 0;
+            while ((pfpEnabledBf != 0) && (i < PFP_PPCNT_MAX))
+            {
+                if (pfpEnabledBf & 1)
+                {
+                    pfpEnable(i);
+                }
+                pfpEnabledBf >>= 1;
+                i++;
+            }
         }
+        
+        if (pC->acp == NULL) 
+        {
+            ALG_Handle acpAlg;
+            ACP_Handle acp;
+            Int32 betaPrimeValue = ss - 1;
+            Int32 betaPrimeOffset;
+            Int32 betaPrime;
 
-        acpAlg->fxns->algControl(acpAlg, ACP_GETBETAPRIMEOFFSET,
-            (IALG_Status *) &betaPrimeOffset);
-        betaPrime = betaPrimeOffset * betaPrimeValue;
+            // Initialize algorithms
 
-        // Attach System Stream status (update Beta Table entry)
-        acp = (ACP_Handle )acpAlg;
-        acp->fxns->attach(acp, ACP_SERIES_STD, STD_BETA_SYSIDL+betaPrime, (IALG_Status *)pStatus);
+            // Create an ACP algorithm instance with trace enabled
+            ACP_MDS_init();
 
-        acpAlg->fxns->algControl(acpAlg, ACP_SETBETAPRIMEVALUE,
-            (IALG_Status *) &betaPrimeValue);
+            // Create ACP instance for System Stream
+            if ( !(acpAlg = (ALG_Handle )ACP_MDS_create (NULL)) )
+            {
+                //LOG_printf(&trace, "SS%d: ACP algorithm instance creation failed",
+                //    ss);
+                Log_error1("SS%d: ACP algorithm instance creation failed", (IArg)ss);
+                LINNO_RPRT (systemStreamMain, __LINE__);
+                return;
+            }
 
-        // Update System Stream configuration ACP handle
-        pC->acp = acp;
+            acpAlg->fxns->algControl(acpAlg, ACP_GETBETAPRIMEOFFSET,
+                (IALG_Status *) &betaPrimeOffset);
+            betaPrime = betaPrimeOffset * betaPrimeValue;
 
-        //LOG_printf(&trace, "SS%d: ACP processing initialized", ss);
-        Log_info1("SS%d: ACP processing initialized", (IArg)ss);
-        LINNO_RPRT(systemStreamMain, -2);
+            // Attach System Stream status (update Beta Table entry)
+            acp = (ACP_Handle )acpAlg;
+            acp->fxns->attach(acp, ACP_SERIES_STD, STD_BETA_SYSIDL+betaPrime, (IALG_Status *)pStatus);
 
-        // Attach PAF IDENTITY
-        acp->fxns->attach(acp, ACP_SERIES_STD, STD_BETA_IDENTITY, (IALG_Status *) &pafIdentification);
-    }
+            acpAlg->fxns->algControl(acpAlg, ACP_SETBETAPRIMEVALUE,
+                (IALG_Status *) &betaPrimeValue);
+
+            // Update System Stream configuration ACP handle
+            pC->acp = acp;
+
+            //LOG_printf(&trace, "SS%d: ACP processing initialized", ss);
+            Log_info1("SS%d: ACP processing initialized", (IArg)ss);
+            LINNO_RPRT(systemStreamMain, -2);
+
+            // Attach PAF IDENTITY
+            acp->fxns->attach(acp, ACP_SERIES_STD, STD_BETA_IDENTITY, (IALG_Status *) &pafIdentification);
+        }
+        
+        pC->firstTimeInit = 1;
+    }       
 
 #ifdef RAM_REPORT
     {
@@ -162,8 +199,9 @@ systemStreamMain(
         }
     }
 #endif /* RAM_REPORT */
-    // Invoke sub-functions as per mode:
-    if (fxns) 
+
+    // Invoke sub-functions as per mode
+    if (fxns != NULL) 
     {
         Int32 i;
         Int64 x[PAF_SYSTEMSTREAMFXNS_XN];
@@ -665,6 +703,9 @@ systemStream5Compute(
 {
     PAF_SystemStatus *pStatus = pC->pStatus;
     Load_Stat stat;
+    UInt32 pfpDisableMask, pfpEnableMask;
+    UInt32 pfpResetStatsMask;
+    UInt8 i;
 
     Load_getTaskLoad(Task_getIdleTask(), &stat);
     pStatus->cpuLoad = (100 - Load_calculateLoad(&stat)) * 256;
@@ -713,6 +754,59 @@ systemStream5Compute(
         pStatus->peakSsLoad = Load_calculateLoad(&stat);        
     }
 
+    // Apply PFP disable mask
+    if (pStatus->pfpDisableMask != 0)
+    {
+        pfpDisableMask = pStatus->pfpDisableMask;
+        i = 0;
+        while ((pfpDisableMask != 0) && (i < PFP_PPCNT_MAX))
+        {
+            if (pfpDisableMask & 1)
+            {
+                pfpDisable(i);
+            }
+            pfpDisableMask >>= 1;
+            i++;
+        }
+        pStatus->pfpEnabledBf &= ~pStatus->pfpDisableMask;
+        pStatus->pfpDisableMask = 0;
+    }
+    
+    // Apply PFP enable mask
+    if (pStatus->pfpEnableMask != 0)
+    {
+        pfpEnableMask = pStatus->pfpEnableMask;
+        i = 0;
+        while ((pfpEnableMask != 0) && (i < PFP_PPCNT_MAX))
+        {
+            if (pfpEnableMask & 1)
+            {
+                pfpEnable(i);
+            }
+            pfpEnableMask >>= 1;
+            i++;
+        }
+        pStatus->pfpEnabledBf |= pStatus->pfpEnableMask;
+        pStatus->pfpEnableMask = 0;
+    }
+
+    // Apply PFP reset mask
+    if (pStatus->pfpResetStatsMask != 0)
+    {
+        pfpResetStatsMask = pStatus->pfpResetStatsMask;
+        i = 0;
+        while ((pfpResetStatsMask != 0) && (i < PFP_PPCNT_MAX))
+        {
+            if (pfpResetStatsMask & 1)
+            {
+                pfpResetStats(i);
+            }
+            pfpResetStatsMask >>= 1;
+            i++;
+        }
+        pStatus->pfpResetStatsMask = 0;
+    }    
+    
     // FL: debug
     gCpuLoad = pStatus->cpuLoad>>8;
     gAsipLoad = pStatus->asitLoad;
@@ -739,3 +833,66 @@ systemStream5Transmit(
 {
     return 0;
 }
+
+// FL: debug
+//#define MAX_CAP_CUR_TIME ( 100 )
+//UInt32 gCurTime[MAX_CAP_CUR_TIME];
+//Uint32 gCurTimeIdx=0;
+
+/*
+ *  ======== taskSystemStreamFxn ========
+ *  IDLE function for audio stream
+ */
+Void taskSystemStreamFxn()
+{
+    Int32 i;
+    UInt32 elapsed, now, then=0;
+    UInt32 time, interval;
+
+    //System_printf("Enter idleAudioStream()\n");    
+    //Log_info0("Enter idleAudioStream()");
+
+    time = SYSTEM_STREAM_PROC_INTERVAL; // in msec.
+
+    while (1)
+    {
+        // Compute interval in system clock ticks, interval time expressed in msec.
+        // Performing calculation inside while loop allows changes in system clock tick period.
+        interval = time * USEC_PER_MSEC / Clock_tickPeriod;
+
+        // Compute elapsed time
+        // Note in case of wrap of 32-bit return value for now,
+        // (now-then) calculation is correct despite (now<then)
+        // due to 2s complement arithmetic.
+        now = Clock_getTicks();
+        elapsed = now - then;
+        then = now; // latch "now" as "then" for next iteration
+
+        // If elapsed time since last iteration is less than desired System Stream period,
+        // then sleep until interval has passed.
+        // Otherwise execute functions in System Stream.
+        if (interval > elapsed)
+        {
+            Task_sleep(interval - elapsed);
+        }
+
+        // FL: debug
+        //gCurTime[gCurTimeIdx] = Clock_getTicks();
+        //gCurTimeIdx++;
+        //if (gCurTimeIdx >= MAX_CAP_CUR_TIME)
+        //{
+        //    gCurTimeIdx = 0;
+        //}
+
+        for (i=0; i < lengthof(systemStreamConfig); i++)
+        {
+            systemStreamParams[i].fxns->main
+                (&systemStreamParams[i], &systemStreamConfig[i]);            
+        }
+
+        if (gSysStreamInit == 0)
+        {
+            gSysStreamInit = 1;  // Indicate system stream initialized
+        }
+    }
+}
index 7db03c61fa076afe94bd5417324eb78f27ac2e01..6df16fa39f0fd00508af75b56722e1db6cbb79b7 100644 (file)
@@ -56,6 +56,7 @@ typedef Int PAF_SST_FxnsCompute
 typedef Int PAF_SST_FxnsTransmit 
     (const struct PAF_SST_Params *, struct PAF_SST_Config *, Int64 *);
 
+// System Stream parameters, functions
 typedef struct PAF_SST_Fxns {
     PAF_SST_FxnsMain *main;
     Int32 count;
@@ -65,6 +66,7 @@ typedef struct PAF_SST_Fxns {
     } sub[1];
 } PAF_SST_Fxns;
 
+// System Stream parameters
 typedef struct PAF_SST_Params {
     Int8 streams;
     Int8 stream1; /* unused */
@@ -73,7 +75,9 @@ typedef struct PAF_SST_Params {
     const PAF_SST_Fxns *fxns;
 } PAF_SST_Params;
 
+// System Stream configuration
 typedef struct PAF_SST_Config {
+    UInt8 firstTimeInit;
     ACP_Handle acp;
     PAF_SystemStatus *pStatus;
 } PAF_SST_Config;
@@ -98,4 +102,6 @@ extern PAF_SST_FxnsTransmit systemStream4Transmit;
 extern PAF_SST_FxnsCompute  systemStream5Compute;
 extern PAF_SST_FxnsTransmit systemStream5Transmit;
 
+extern Int gSysStreamInit;
+
 #endif /* _SYSTEM_STREAM_H_ */