PASDK-71:Add SS status for ASIT/ASOT/AIP/AFP/SS load
authorFrank Livingston <frank-livingston@ti.com>
Thu, 27 Apr 2017 19:39:51 +0000 (14:39 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 27 Apr 2017 19:42:37 +0000 (14:42 -0500)
pasdk/test_dsp/framework/systemStream.c

index 29b02e3349b170d8dbd27fd62a9351a46c6431a3..19b6656dc2f214a54efec46cf80e728f6a9552b6 100644 (file)
@@ -638,6 +638,18 @@ asm("_systemStream3Transmit .set 0");
 //#include <ti/bios/include/log.h>
 //#include <ti/sysbios/knl/Task.h>
 
+#if 0 // FL: debug
+UInt8 gCpuLoad;
+UInt8 gAsipLoad;
+UInt8 gAsopLoad;
+UInt8 gAipLoad;
+UInt8 gAfpLoad;
+UInt8 gSsLoad;
+//UInt32 gHwiLoad;
+//UInt32 gSwiLoad;
+#endif
+
+
 Int32
 systemStream5Compute(
     const PAF_SST_Params *pP, 
@@ -652,7 +664,34 @@ systemStream5Compute(
     pStatus->cpuLoad = (100 - Load_calculateLoad(&stat)) * 256;
     if (pStatus->peakCpuLoad < pStatus->cpuLoad)
         pStatus->peakCpuLoad = pStatus->cpuLoad;
+  
+    //gCpuLoad = (100 - Load_calculateLoad(&stat)
 
+    // Compute ASIT load
+    Load_getTaskLoad(TaskAsip, &stat);
+    //gAsipLoad = Load_calculateLoad(&stat);
+    pStatus->asitLoad = Load_calculateLoad(&stat);
+    
+    // Compute ASOT load
+    Load_getTaskLoad(TaskAsop, &stat);
+    //gAsopLoad = Load_calculateLoad(&stat);
+    pStatus->asotLoad = Load_calculateLoad(&stat);
+
+    // Compute AIP Task load
+    Load_getTaskLoad(TaskAip, &stat);
+    //gAipLoad = Load_calculateLoad(&stat);
+    pStatus->aipLoad = Load_calculateLoad(&stat);
+
+    // Compute AFP Task load
+    Load_getTaskLoad(TaskAfp, &stat);
+    //gAfpLoad = Load_calculateLoad(&stat);
+    pStatus->afpLoad = Load_calculateLoad(&stat);
+    
+    // Compute System Stream Task load
+    Load_getTaskLoad(TaskSystemStream, &stat);
+    //gSsLoad = Load_calculateLoad(&stat);
+    pStatus->ssLoad = Load_calculateLoad(&stat);
+    
     return 0;
 }