PASDK-71:Update to PFP #7.
authorFrank Livingston <frank-livingston@ti.com>
Thu, 4 May 2017 02:02:25 +0000 (21:02 -0500)
committerFrank Livingston <frank-livingston@ti.com>
Thu, 4 May 2017 02:02:25 +0000 (21:02 -0500)
Change PFP usage for autodet cycle collection.
Change PFP IDs.

pasdk/common/pfp/pfp.c
pasdk/common/pfp/pfp.h
pasdk/common/pfp_app.h
pasdk/test_arm/.cproject
pasdk/test_arm/application/main.c
pasdk/test_arm/framework/audioStreamDecodeProc.c
pasdk/test_dsp/.cproject
pasdk/test_dsp/application/main.c
pasdk/test_dsp/framework/audioStreamInpProc.c
pasdk/test_dsp/framework/audioStreamOutProc.c

index acab8067e51a56a9243d7918320159c382b44223..1ada1354e96d3241d0e3cb9ffe40c954bfcc0beb 100644 (file)
@@ -34,7 +34,6 @@
 
 /* Global Variables */
 pfpInst_t       pfpInst;          /* Define pfpInst globally. Only one can exist. */
-GateAll_Params  pfpGateParams;    /* Gate Parameters for PFP */
 
 /* Critical Section macros */
 #define PFP_GATE_ENTER()      GateAll_enter(pfpInst.ghandle);
@@ -56,10 +55,10 @@ void pfpCreate (void)
 {
   int k;
   pfpDescriptor_t *pfp;
-  GateAll_Params  *params = &pfpGateParams;
+  GateAll_Params  params;
 
-  GateAll_Params_init(params);
-  pfpInst.ghandle = GateAll_create(params,NULL);
+  GateAll_Params_init(&params);
+  pfpInst.ghandle = GateAll_create(&params,NULL);
   if (pfpInst.ghandle == NULL) {
     BIOS_exit(1);
   }
@@ -217,7 +216,11 @@ void pfpEnable (int id)
 } /* pfpEnable */
 
 /*============================================================================*/
-/* pfpDisable: Disable one profile point                                      */
+/* pfpDisable: Disable one profile point
+   This function should be called from the lowest priority making sure that
+   the PP ID to be disabled is not currently being measured!
+*/
 /*============================================================================*/
 
 void pfpDisable (int id)
@@ -233,6 +236,9 @@ void pfpDisable (int id)
 
   pfp->enable = 0;          /* Disable this profile point */
 
+  /* WARNING: Should we check here to remove this PP from the active list in case we are disabling it? */
+  /* pfpEnd is not going to remove it if it was disabled!!! */
+
   if (scope != BIOS_ThreadType_Main) {
     PFP_GATE_LEAVE(key);
   }
@@ -266,10 +272,28 @@ void pfpBegin (int id, void *exhandle)
   /* First check to see if the current tail element is nesting this one */
   if (pfpInst.tail != NULL) {
     if (pfpInst.tail->exhandle == exhandle) { /* are we nested? */
-       pfpInst.tail->active     = 0;            /* mark as not-active */
-       dt                       = t1 - pfpInst.tail->c_0;
-       pfpInst.tail->c_partial += dt;
-       /* c_0 will have to be initialized before coming back! (see pfpEnd()) */
+      /* We could check here to see if we have Begin followed by Begin for the same PP ID ! */
+      if (pfpInst.tail == pfp) {
+        /* INVALID USAGE OF THE API!!!!! */
+        /* Remove this from the list and DISABLE this ID */
+        pfpInst.depth--;                /* reduce the depth! */
+        pfpInst.tail = pfp->prev;
+        if (pfpInst.tail != NULL) {
+          pfpInst.tail->next = NULL;
+        }
+        pfp->enable = 0;                /* DISABLE it so it would not create these problems again! */
+        pfp->inside = 0;
+        pfp->active = 0;
+        pfp->latch = 0;
+        if (scope != BIOS_ThreadType_Main) {
+          PFP_GATE_LEAVE(key);
+        }
+        return;
+      }
+      pfpInst.tail->active     = 0;            /* mark as not-active */
+      dt                       = t1 - pfpInst.tail->c_0;
+      pfpInst.tail->c_partial += dt;
+      /* c_0 will have to be initialized before coming back! (see pfpEnd()) */
     }
   }
 
@@ -293,7 +317,8 @@ void pfpBegin (int id, void *exhandle)
   pfp->prev = pfpInst.tail;   /* Previous is the current last element */
   pfp->next = NULL;           /* nobody after this one */
   if (pfpInst.head == NULL) {
-    pfpInst.head = pfpInst.tail = pfp;    /* now we are not empty */
+    pfpInst.head = pfp;       /* now we are not empty */
+    pfpInst.tail = pfp;
   }
   else {
     pfpInst.tail->next = pfp;     /* current last now has a next one */
@@ -305,7 +330,7 @@ void pfpBegin (int id, void *exhandle)
   pfp->active = 1;        /* and we are about to start running through it */
   pfpInst.active_id = id; /* record the currently active id */
 
-  /* Recrod time as late as possible to reduce overhead during measurement */
+  /* Record time as late as possible to reduce overhead during measurement */
   pfp->c_0 = Timestamp_get();   /* fetch the current time stamp */
 
   if (scope != BIOS_ThreadType_Main) {
@@ -367,14 +392,20 @@ void pfpEnd (int id, int latch)
   pfp->latch = latch;           /* record the latch flag */
 
   /* Remove this PP from the active list */
-  if (pfpInst.head == pfp) {
+  if (pfpInst.head == pfp) {      /* Was I at the head of the list? */
     pfpInst.head = pfp->next;
+    if (pfp->next != NULL) {
+      pfp->next->prev = NULL;     /* Next one (if any) is now at the head of the list! */
+    }
   }
   else {
     pfp->prev->next = pfp->next;      /* previous element should point forward to my next */
   }
-  if (pfpInst.tail == pfp) {
+  if (pfpInst.tail == pfp) {      /* Was I at the tail of the list? */
     pfpInst.tail = pfp->prev;
+    if (pfp->prev != NULL) {
+      pfp->prev->next = NULL;       /* Previous one (if any) is now at the tail of the list! */
+    }
   }
   else {
     pfp->next->prev = pfp->prev;      /* next element should point back to my previous */
@@ -398,8 +429,13 @@ void pfpEnd (int id, int latch)
        /* Take the new one we found and move it to the tail if it was not there */
        /* Order is A -> PFP -> B */
        if (pfpInst.tail != pfp) {
-         pfp->prev->next = pfp->next;   /* A->next = B */
-         pfp->next->prev = pfp->prev;   /* B->prev = A */
+         if (pfpInst.head != pfp) {
+           pfp->prev->next = pfp->next;   /* A->next = B */
+         }
+         else {
+           pfpInst.head = pfp->next;    /* New head since pfp is going to the tail */
+         }
+         pfp->next->prev = pfp->prev;   /* B->prev = A (this is safe since PFP is not at the tail!) */
          pfp->prev = pfpInst.tail;      /* pfp->prev = TAIL */
          pfp->next = NULL;              /* pfp is now going to be at the tail! */
          pfpInst.tail->next = pfp;      /* TAIL->next = pfp (old tail points to pfp now) */
@@ -426,10 +462,12 @@ void pfpEnd (int id, int latch)
    could be obtained if the GATE execution would be included.
    Currently, that is not supported. This must be called after pfpCreate.
    If the loopcnt is less than 16 calibration will not be done.
+   If reset is used, ID #0 will be reset once the overhead has been stored.
 */
 /*============================================================================*/
 
-void pfpCalibrate(int loopcnt)
+void pfpCalibrate(int loopcnt, int reset)
 {
   int k, enable;
   float alpha;
@@ -443,6 +481,8 @@ void pfpCalibrate(int loopcnt)
   /* Use PP #0 for this purpose */
   enable  = pfpInst.pfpVector[0].enable;
   alpha   = pfpInst.pfpVector[0].alpha;
+
+  pfpResetStats(0);
   pfpInst.pfpVector[0].enable = 1;
   pfpInst.pfpVector[0].alpha  = 0.25;
   for (k = 0; k < loopcnt; k++) {
@@ -454,6 +494,10 @@ void pfpCalibrate(int loopcnt)
 
   /* Take the minimum and call it overhead */
   pfpInst.overhead = pfpInst.pfpVector[0].c_min;
+
+  if (reset) {
+    pfpResetStats(0);
+  }
 } /* pfpCalibrate */
 
 /*==================================================================================*/
@@ -724,13 +768,19 @@ void pfpTaskSwitch(Task_Handle prev, Task_Handle next)
     pfpInst.active_id = next_id;
 
     /* Take the new one and move it to the tail if it was not there */
-    if (pfpInst.tail->id != next_id) {
-      pfp->prev->next = pfp->next;
-      pfp->next->prev = pfp->prev;
-      pfp->prev = pfpInst.tail;
-      pfp->next = NULL;
-      pfpInst.tail->next = pfp;
-      pfpInst.tail = pfp;
+    /* Order is A -> PFP -> B where A could be Head and B could be NULL */
+    if (pfpInst.tail != pfp) {
+      if (pfpInst.head != pfp) {
+        pfp->prev->next = pfp->next;   /* A->next = B */
+      }
+      else {
+        pfpInst.head = pfp->next;    /* New head since pfp is going to the tail */
+      }
+      pfp->next->prev = pfp->prev;   /* B->prev = A (this could be NULL if pfp was on the Head) */
+      pfp->prev = pfpInst.tail;      /* pfp->prev = TAIL */
+      pfp->next = NULL;              /* pfp is now going to be at the tail! */
+      pfpInst.tail->next = pfp;      /* TAIL->next = pfp (old tail points to pfp now) */
+      pfpInst.tail = pfp;            /* new tail is pfp finally */
     }
     pfp->c_0          = Timestamp_get(); /* Record time */
   }
index 4e391d75765355411cfc1a181745e243a997fe9a..3f9df7439dfc514e40063c2c68f96534e91a8fc7 100644 (file)
 #include <ti/sysbios/hal/Hwi.h>
 #include <ti/sysbios/gates/GateAll.h>
 
-/* PFP latch macros */ // FL: added these
-#define PFP_FINISH_MEAS     ( 0 )
-#define PFP_LATCH_MEAS      ( 1 )
-
 /* Chaging this definition would change how many profile points can be used */
 #define PFP_PPCNT_MAX   32      /* this is the maximum number of profile points */
 
@@ -69,14 +65,13 @@ typedef struct pfpStats_stc pfpStats_t;
 
 /* Global variables */
 extern pfpInst_t      pfpInst;
-extern GateAll_Params pfpGateParams;    /* This may not be necessary */
 
 extern int pfpTaskHookSetId;            /* Used for Task hook functions */
 extern int pfpSwiHookSetId;             /* Used for Swi hook functions */
 extern int pfpHwiHookSetId;             /* Used for Hwi hook functions */
 
 /* PFP Functions */
-extern void pfpCalibrate(int loopcnt);
+extern void pfpCalibrate(int loopcnt, int reset);
 extern void pfpCreate(void);
 extern void pfpBegin(int id, void *exhandle);
 extern void pfpDisable(int id);
index b79a3460fd777607fde5e8b0561e290e25d8751e..8f1271783c727bbf533fee4d6a24eb69618f6e27 100644 (file)
 
 #include "pfp/pfp.h"
 
+/* PFP latch macros */
+#define PFP_FINISH_MEAS     ( 0 )
+#define PFP_LATCH_MEAS      ( 1 )
+
 #ifdef _TMS320C6X
 #define PFP_MAX_ASP     ( 4 )
 
 /* Define all PFP ID's */
 #define PFP_ID_MAIN         0
-#define PFP_ID_ASIT_0       1   /* ASIT, auto processing */
-#define PFP_ID_ASIT_1       2   /* ASIT, decode processing */
-#define PFP_ID_ASIT_2       3
-#define PFP_ID_ASOT_0       4   /* ASOT, output processing */
-#define PFP_ID_ASOT_1       5
-#define PFP_ID_ASOT_ASP_0     /* ASP 0 */
-#define PFP_ID_ASOT_ASP_1     /* ASP 1 */
-#define PFP_ID_ASOT_ASP_2     /* ASP 2 */
-#define PFP_ID_ASOT_ASP_3     /* ASP 3 */
+#define PFP_ID_ASIT_0       1
+#define PFP_ID_ASIT_1       2   /* ASIT, auto processing */
+#define PFP_ID_ASIT_2       3   /* ASIT, decode processing */
+#define PFP_ID_ASOT_0       8   
+#define PFP_ID_ASOT_1       9   /* ASOT, output processing */
+#define PFP_ID_ASOT_ASP_0   16  /* ASP 0 */
+#define PFP_ID_ASOT_ASP_1   17  /* ASP 1 */
+#define PFP_ID_ASOT_ASP_2   18  /* ASP 2 */
+#define PFP_ID_ASOT_ASP_3   19  /* ASP 3 */
 #define PFP_ID_LAST PFP_ID_ASOT_ASP_3
 
 #if PFP_ID_LAST >= PFP_PPCNT_MAX
@@ -42,7 +46,9 @@
 // enable all PFP's
 #define PFP_ENABLE_MASK ( (1<<PFP_ID_ASIT_0) | \
                           (1<<PFP_ID_ASIT_1) | \
+                          (1<<PFP_ID_ASIT_2) | \
                           (1<<PFP_ID_ASOT_0) | \
+                          (1<<PFP_ID_ASOT_1) | \
                           (1<<PFP_ID_ASOT_ASP_0) | \
                           (1<<PFP_ID_ASOT_ASP_1) | \
                           (1<<PFP_ID_ASOT_ASP_2) | \
@@ -52,9 +58,9 @@
 
 /* Define all PFP ID's */
 #define PFP_ID_MAIN         0
-#define PFP_ID_ASDT_0       1   /* INFO */
-#define PFP_ID_ASDT_1       2   /* DECODE */
-#define PFP_ID_ASDT_2       3
+#define PFP_ID_ASDT_0       1
+#define PFP_ID_ASDT_1       2   /* INFO */
+#define PFP_ID_ASDT_2       3   /* DECODE */
 #define PFP_ID_LAST PFP_ID_ASDT_2
 
 #if PFP_ID_LAST >= PFP_PPCNT_MAX
@@ -76,7 +82,8 @@
 
 // enable INFO and DECODE PFP's
 #define PFP_ENABLE_MASK ( (1<<PFP_ID_ASDT_0) | \
-                          (1<<PFP_ID_ASDT_1) )
+                          (1<<PFP_ID_ASDT_1) | \
+                          (1<<PFP_ID_ASDT_2) )
 
 
 #endif /* _TMS320C6X */
index 7962f36d60d8c291facd98d3bd98ebe629204dc2..99f3527250591ec58919fc687ba902fb1b64724a 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="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="FATFS_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/>
                                                </tool>
                                        </fileInfo>
                                        <sourceEntries>
-                                               <entry excluding="application/app_pkgs.cmd|application/src|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+                                               <entry excluding="common/components/clk.c|application/app_pkgs.cmd|application/src|src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
                                        <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="FATFS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="PRUSS_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
                                        <stringMacro name="SBL_BOOT_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
-                                       <stringMacro name="BOARD_INSTALL_PATH" type="VALUE_PATH_DIR" value="C:/ti"/>
+                                       <stringMacro name="FATFS_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="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="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="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="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 065147c298d9f1ac8941f008d49d267b196b0d78..588cfe64e288a4aa61b0b32ccdf9a37acb685fb3 100644 (file)
@@ -62,13 +62,14 @@ Int main()
     
     Log_info0("Enter main()");
 
+#if 0 // debug: check ARM SYS/BIOS timestamp provider
     BOARD_initPerfCounters();
+#endif
     
     /* Setup Profile Points (PFP) */
     Log_info0("enter PFP Setup");
     pfpCreate();
-    pfpCalibrate(1000);
-    pfpResetStats(0); // FL: this is currently required to reset stats for PFP #0 after calibration.
+    pfpCalibrate(1000, 1);
     for (k = 0; k <= PFP_ID_LAST; k++) 
     {
         pfpEnable(k);   /* Enable profile point #k */
@@ -77,7 +78,7 @@ Int main()
     {
         pfpSetAlpha(k, PFP_DEF_ALPHA);  /* Set default exp. avg. time const. */
     }
-    // debug: dummy load
+#if 0 // debug: dummy load
     for (k = 0; k < 1000; k++) 
     {
         tsStart=readTime32();
@@ -87,6 +88,7 @@ Int main()
         tsEnd=readTime32();
     }
     delta = tsEnd-tsStart;
+#endif
 
     // Initialize IPC
     status = Ipc_start();
index 8e04bfa199de3a17478968b0d760cb314f5b61cd..6ff0ea9412ea4e7a1324d1f487f4381c2200ec2a 100644 (file)
@@ -620,9 +620,9 @@ Void taskAsdpFxn(
                     errno = 0;
                     if (dec->fxns->info)
                     {
-                        pfpBegin(PFP_ID_ASDT_0, pC->taskHandle);
+                        pfpBegin(PFP_ID_ASDT_1, pC->taskHandle);
                         errno = dec->fxns->info(dec, NULL, &pAstCfg->xDec[z].decodeControl, &pAstCfg->xDec[z].decodeStatus);
-                        pfpEnd(PFP_ID_ASDT_0, PFP_FINISH_MEAS);
+                        pfpEnd(PFP_ID_ASDT_1, PFP_FINISH_MEAS);
                     }
                     
                     // write back Dec configuration
@@ -694,9 +694,9 @@ Void taskAsdpFxn(
                         // FL: debug, capture input buffer
                         //capIb(pAstCfg->xInp[z].pInpBuf);
                     
-                        pfpBegin(PFP_ID_ASDT_1, pC->taskHandle);
+                        pfpBegin(PFP_ID_ASDT_2, pC->taskHandle);
                         errno = dec->fxns->decode(dec, NULL, &pAstCfg->xDec[z].decodeInStruct, &pAstCfg->xDec[z].decodeOutStruct);
-                        pfpEnd(PFP_ID_ASDT_1, PFP_FINISH_MEAS);
+                        pfpEnd(PFP_ID_ASDT_2, PFP_FINISH_MEAS);
                         if (errno < 0)
                         {
                             //SW_BREAKPOINT;
index f4619ea898cac2cf6f12771ed715b7600a752659..7c3f9dfb3b5e0b4cbf4af46a5b10ff7f34d7f049 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="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="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="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/>
                                                </tool>
                                        </fileInfo>
                                        <sourceEntries>
-                                               <entry excluding="sio/dap|sio/dbgDob.c|framework/fwkSim.c|application/app_pkgs.cmd|boards|src|application/src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
+                                               <entry excluding="common/components/clk.c|sio/dap|sio/dbgDob.c|framework/fwkSim.c|application/app_pkgs.cmd|boards|src|application/src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
                                        </sourceEntries>
                                </configuration>
                        </storageModule>
                                        <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="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="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="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="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="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="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="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="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="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/>
                                                        <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1237856306" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
                                                </tool>
                                        </fileInfo>
-                                       <fileInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.543350190" name="mib.c" rcbsApplicability="disable" resourcePath="mib/mib.c" toolsToInvoke="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002">
-                                               <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691">
-                                                       <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.53836185" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
-                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.622075618" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>
-                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.1922876896" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>
-                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.376443321" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>
-                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1607701921" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
-                                               </tool>
-                                       </fileInfo>
                                        <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.common" name="/" resourcePath="common">
                                                <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain.2093052442" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.DebugToolchain" unusedChildren="">
                                                        <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1997130179.38556327.52846953" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.1997130179"/>
                                                        <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1467997897" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
                                                </tool>
                                        </fileInfo>
+                                       <fileInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.2083839127.249844620.543350190" name="mib.c" rcbsApplicability="disable" resourcePath="mib/mib.c" toolsToInvoke="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002">
+                                               <tool id="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691.984972002" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.exe.compilerDebug.106674691">
+                                                       <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.53836185" name="Optimization level (--opt_level, -O)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.OPT_LEVEL.3" valueType="enumerated"/>
+                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS.622075618" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__C_SRCS"/>
+                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS.1922876896" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__CPP_SRCS"/>
+                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS.376443321" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM_SRCS"/>
+                                                       <inputType id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS.1607701921" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compiler.inputType__ASM2_SRCS"/>
+                                               </tool>
+                                       </fileInfo>
                                        <sourceEntries>
                                                <entry excluding="sio/dap|sio/dbgDob.c|framework/fwkSim.c|application/app_pkgs.cmd|boards|src|application/src" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>
                                        </sourceEntries>
index 3e7c6200cd05ece726501eb056728cfe0e28adfb..ccf98aae2dbdd08d3b45709d846f6f02aea888ae 100644 (file)
@@ -71,17 +71,18 @@ Int main()
     /* Setup Profile Points (PFP) */
     Log_info0("enter PFP Setup");
     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 */
-    //}
+    pfpCalibrate(1000, 1);
+#if 0 // enabled in System Stream
+    for (k = 0; k <= PFP_ID_LAST; k++) 
+    {
+        pfpEnable(k);   /* Enable profile point #k */
+    }
+#endif
     for (k = 1; k <= PFP_ID_LAST; k++)
     {
         pfpSetAlpha(k, PFP_DEF_ALPHA);  /* Set default exp. avg. time const. */
-    }    
-    // debug: dummy load
+    }
+#if 0 // debug: dummy load
     pfpEnable(0);   /* Enable profile point #0 */
     for (k = 0; k < 1000; k++) 
     {
@@ -90,7 +91,8 @@ Int main()
         pfpEnd(PFP_ID_MAIN,0);
     }    
     pfpDisable(0);   /* Disable profile point #0 */
-    
+#endif    
+
     //Platform setup!!!
     /*
      * use ROV->SysMin to view the characters in the circular buffer
index f6b0f37d7d83788078cf92108931b1cb8b5eb96d..2117c9a1a60c26a6a9df91fc2b707a158892f18e 100644 (file)
@@ -68,8 +68,8 @@ All rights reserved.
 
 #include "pfp/pfp.h"
 #include "pfp_app.h"        /* contains all PFP ID's */
-Int32 gNumPfpAsit0=0; // debug
-Int32 gNumPfpAsit1=0;
+Int32 gNumPfpAsit1=0; // debug
+Int32 gNumPfpAsit2=0;
 
 
 
@@ -449,7 +449,8 @@ Void taskAsipFxn(
         Int linno;
         if (pP->fxns->initPhase[i])
         {
-            if (linno = pP->fxns->initPhase[i](pP, pQ, pC)) 
+            linno = pP->fxns->initPhase[i](pP, pQ, pC);
+            if (linno) 
             {
                 LINNO_RPRT(TaskAsip, linno);
                 return;
@@ -651,7 +652,8 @@ Void taskAsipFxn(
         Task_sleep(1);
 
         TRACE_GEN1("TaskAsip: AS%d: Input device selection ...", as+zMS);
-        if (errno = pP->fxns->selectDevices(pP, pQ, pC))
+        errno = pP->fxns->selectDevices(pP, pQ, pC);
+        if (errno)
         {
             TRACE_TERSE2("TaskAsip: selectDevices returned errno = 0x%04x at line %d. AS%d", errno, as+zMS);
             continue;
@@ -675,7 +677,8 @@ Void taskAsipFxn(
         }
         
         // if here then we have a valid input so query its status
-        if (errno = pP->fxns->updateInputStatus(pAstCfg->xInp[zMI].hRxSio, &pAstCfg->xInp[zMI].inpBufStatus, &pAstCfg->xInp[zMI].inpBufConfig))
+        errno = pP->fxns->updateInputStatus(pAstCfg->xInp[zMI].hRxSio, &pAstCfg->xInp[zMI].inpBufStatus, &pAstCfg->xInp[zMI].inpBufConfig);
+        if (errno)
         {
             TRACE_VERBOSE1("TaskAsip: continue as updateInputStatus returns 0x%x", errno);
             continue;
@@ -764,13 +767,6 @@ 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
-        gNumPfpAsit0--;
-        pfpBegin(PFP_ID_ASIT_0, pC->taskHandle);     // PFP begin
-        gNumPfpAsit0++;
-
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
                       sizeof(tempVar8),
@@ -780,7 +776,14 @@ Void taskAsipFxn(
         // If no decoder selected then do nothing. Need to reset the sourceProgram, since
         // when no decoder is selected there are no calls to IB
         //if (errno = pP->fxns->autoProcessing(pP, pQ, pC, pC->xDec[zMD].decodeStatus.sourceSelect, pC->xDec[zMD].decAlg[PAF_SOURCE_PCM]))
-        if (errno = pP->fxns->autoProcessing(pP, pQ, pC, tempVar8, NULL)) // (***) FL: re-visit this, hard-coded to use PCM framelength inside function
+        
+        pfpBegin(PFP_ID_ASIT_1, pC->taskHandle);     // PFP begin
+        gNumPfpAsit1++;
+        errno = pP->fxns->autoProcessing(pP, pQ, pC, tempVar8, NULL);
+        pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);      // PFP end
+        gNumPfpAsit1--;
+
+        if (errno) // (***) FL: re-visit this, hard-coded to use PCM framelength inside function
         {
             TRACE_VERBOSE1("TaskAsip: autoProcessing returns 0x%x, continue", errno);
             continue;
@@ -798,12 +801,9 @@ Void taskAsipFxn(
         }
 #endif
         
-        // PFP end -- outside of PFP for autodetection complete
-        pfpEnd(PFP_ID_ASIT_0, PFP_FINISH_MEAS);
-        gNumPfpAsit0--;
-        
         // query for input type
-        if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM, (Arg )&sourceProgram))
+        errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM, (Arg )&sourceProgram);
+        if (errno)
         {
             TRACE_TERSE2("TaskAsip: SIO_ctrl returns 0x%x, then 0x%x, continue", errno, ASPERR_AUTO_PROGRAM);
             errno = ASPERR_AUTO_PROGRAM;
@@ -2125,7 +2125,8 @@ PAF_ASIT_decodeProcessing(
         }
 
         // Process commands (decode)
-        if (getVal = pP->fxns->decodeCommand(pP, pQ, pC)) 
+        getVal = pP->fxns->decodeCommand(pP, pQ, pC);
+        if (getVal) 
         {
             if (state != INIT)   // no need to restart/abort if not yet started
             {
@@ -2139,8 +2140,8 @@ PAF_ASIT_decodeProcessing(
                     TRACE_VERBOSE0("PAF_ASIT_decodeProcessing. %d: return getVal");
                     
                     // PFP end -- outside of PFP for errors, EOS, or Input SIO change
-                    pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);
-                    gNumPfpAsit1--;
+                    pfpEnd(PFP_ID_ASIT_2, PFP_FINISH_MEAS);
+                    gNumPfpAsit2--;
                     
                     return getVal;
                 }
@@ -2162,7 +2163,8 @@ PAF_ASIT_decodeProcessing(
                 gAsipInitCnt++;
                 Log_info0("TaskAsip: state=INIT");               
 
-                if (errno = pP->fxns->decodeInit(pP, pQ, pC, sourceSelect))
+                errno = pP->fxns->decodeInit(pP, pQ, pC, sourceSelect);
+                if (errno)
                 {
                     TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INIT, errno 0x%x.  break after decodeInit", errno);
                     break;
@@ -2180,7 +2182,8 @@ PAF_ASIT_decodeProcessing(
                 Log_info0("TaskAsip: state=INFO1");
                 
                 // Establish primary timing
-                if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     gAsipInfo1_PrimaryErrCnt++;
                     TRACE_TERSE1("INFO1: errno 0x%x after decodeInfo, primary timing", errno);
@@ -2232,8 +2235,8 @@ PAF_ASIT_decodeProcessing(
                                 TRACE_TERSE0("PAF_ASIT_decodeProcessing. %d: INFO1, return (ASPERR_ISSUE)");
                                 
                                 // PFP end -- outside of PFP for errors, EOS, or Input SIO change
-                                pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);
-                                gNumPfpAsit1--;
+                                pfpEnd(PFP_ID_ASIT_2, PFP_FINISH_MEAS);
+                                gNumPfpAsit2--;
                                 
                                 return (ASPERR_ISSUE);
                             }
@@ -2248,7 +2251,8 @@ PAF_ASIT_decodeProcessing(
                 TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INFO1: frame %d, major access unit found", frame);
 
                 // Establish secondary timing
-                if (errno = pP->fxns->decodeInfo1(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo1(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INFO1, errno 0x%x.  break after decodeInfo1", errno);
                     gAsipInfo1_ErrCnt++;
@@ -2264,7 +2268,8 @@ PAF_ASIT_decodeProcessing(
                 Log_info0("TaskAsip: state=INFO2");
 
                 // Establish primary timing
-                if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_TERSE1("PAF_ASIT_decodeProcessing: INFO2 break on decodeInfo. errno 0x%x", errno);
                     gAsipInfo2_PrimaryErrCnt++;
@@ -2273,12 +2278,13 @@ PAF_ASIT_decodeProcessing(
                                 
                 // Measure cycles in decode processing loop.
                 // Only measures cycles spent in loop.
-                pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);     // PFP end
-                gNumPfpAsit1--;
-                pfpBegin(PFP_ID_ASIT_1, pC->taskHandle);    // PFP begin
-                gNumPfpAsit1++;
+                pfpEnd(PFP_ID_ASIT_2, PFP_FINISH_MEAS);     // PFP end
+                gNumPfpAsit2--;
+                pfpBegin(PFP_ID_ASIT_2, pC->taskHandle);    // PFP begin
+                gNumPfpAsit2++;
 
-                if (errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_TERSE1("PAF_ASIT_decodeProcessing. %d: INFO2 break on decodeInfo2. errno 0x%x", errno);
                     gAsipInfo2_ErrCnt++;
@@ -2293,7 +2299,8 @@ PAF_ASIT_decodeProcessing(
                 gAsipDecodeCnt++;
                 Log_info0("TaskAsip: state=DECODE");
 
-                if (errno = pP->fxns->decodeDecode(pP, pQ, pC, sourceSelect, frame, block))
+                errno = pP->fxns->decodeDecode(pP, pQ, pC, sourceSelect, frame, block);
+                if (errno)
                 {
                        gAsipDecodeErrCnt++;
                        TRACE_TERSE1("PAF_ASIT_decodeProcessing: state: DECODE.  decodeDecode err 0x%04x", errno);
@@ -2352,16 +2359,16 @@ PAF_ASIT_decodeProcessing(
         TRACE_TIME((&TIME_MOD, "as1-f2: ... + %d = ?? (final? %d)", dtime(), state == FINAL));
 
         // PFP end -- outside of PFP for errors, EOS, or Input SIO change
-        //pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);
-        //gNumPfpAsit1--;
+        //pfpEnd(PFP_ID_ASIT_2, PFP_FINISH_MEAS);
+        //gNumPfpAsit2--;
         
         //return errno;
         break;
     }  // End of for (;;) to Receive, process, and transmit the data.
     
     // PFP end -- outside of PFP for errors, EOS, or Input SIO change
-    pfpEnd(PFP_ID_ASIT_1, PFP_FINISH_MEAS);
-    gNumPfpAsit1--;
+    pfpEnd(PFP_ID_ASIT_2, PFP_FINISH_MEAS);
+    gNumPfpAsit2--;
     
     return errno;
 } //PAF_ASIT_decodeProcessing
index a8fb3cfe0d6b1167a378b6d548fbc5c5e2fc7259..a0bb48355f2f90c5447a204c53152c9b097d59c0 100644 (file)
@@ -62,7 +62,7 @@ All rights reserved.
 
 #include "pfp/pfp.h"
 #include "pfp_app.h"        /* contains all PFP ID's */
-Int32 gNumPfpAsot0=0; // debug
+Int32 gNumPfpAsot1=0; // debug
 
 // FL: debug
 #include "evmc66x_gpio_dbg.h"
@@ -224,7 +224,8 @@ Void taskAsopFxn(
         Int linno;
         if (pP->fxns->initPhase[i])
         {
-            if (linno = pP->fxns->initPhase[i](pP, pQ, pC)) 
+            linno = pP->fxns->initPhase[i](pP, pQ, pC);
+            if (linno) 
             {
                 LINNO_RPRT(TaskAsop, linno);
                 return;
@@ -281,14 +282,16 @@ Void taskAsopFxn(
         Task_sleep(1);
 
         TRACE_GEN1("TaskAsop: AS%d: Output device selection ...", as+zMS);
-        if (errno = pP->fxns->selectDevices(pP, pQ, pC))
+        errno = pP->fxns->selectDevices(pP, pQ, pC);
+        if (errno)
         {
             TRACE_TERSE2("TaskAsop: AS%d: selectDevices returned errno = 0x%04x", as+zMS, errno);
             continue;
         }
 
         // if no output selected skip any remaining processing
-        if (errno = checkOutSel(pP, pC, &outSel))
+        errno = checkOutSel(pP, pC, &outSel);
+        if (errno)
         {
             TRACE_TERSE2("TaskAsop: AS%d: checkOutSel returned errno = 0x%04x", as+zMS, errno);
             continue;
@@ -1352,7 +1355,8 @@ PAF_ASOT_decodeProcessing(
     {
         // FL: Check if any change in output SIO, e.g. from Output shortcut.
         // Changes will break FSM and allow Output reconfiguration.
-        if (errno = checkOutSio(pP, pC, &outSioUpdate))
+        errno = checkOutSio(pP, pC, &outSioUpdate);
+        if (errno)
         {
             TRACE_TERSE1("PAF_ASOT_decodeProcessing: checkOutSio returned errno = 0x%04x", errno);
             break;
@@ -1364,7 +1368,8 @@ PAF_ASOT_decodeProcessing(
         }
         
         // Process commands (encode)
-        if (getVal = pP->fxns->encodeCommand(pP, pQ, pC)) 
+        getVal = pP->fxns->encodeCommand(pP, pQ, pC);
+        if (getVal) 
         {
             /* ignore */;
         }
@@ -1410,7 +1415,8 @@ PAF_ASOT_decodeProcessing(
                     }
                 }
                 
-                if (errno = pP->fxns->decodeInit(pP, pQ, pC, sourceSelect))
+                errno = pP->fxns->decodeInit(pP, pQ, pC, sourceSelect);
+                if (errno)
                 {
                     TRACE_VERBOSE1("PAF_ASOT_decodeProcessing: INIT, errno 0x%x.  break after decodeInit", errno);
                     break;
@@ -1419,7 +1425,8 @@ PAF_ASOT_decodeProcessing(
                 // (***) FL: setup output (ASP chain reset, ENC reset, setCheckRateX, start output)
                 //           Contained in INFO1 in combined FSM.
                 // Establish secondary timing
-                if (errno = pP->fxns->decodeInfo1(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo1(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_VERBOSE1("PAF_ASOT_decodeProcessing: INIT, errno 0x%x.  break after decodeInfo1", errno);
                     break;
@@ -1436,7 +1443,8 @@ PAF_ASOT_decodeProcessing(
                 gAsopStreamCnt++;
                 Log_info0("TaskAsop: state=STREAM");
 
-                if (errno = pP->fxns->decodeStream(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeStream(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_TERSE1("PAF_ASOT_decodeProcessing: state: STREAM.  decodeStream err 0x%x", errno);
                     break;
@@ -1450,7 +1458,8 @@ PAF_ASOT_decodeProcessing(
                 gAsopEncodeCnt++;
                 Log_info0("TaskAsop: state=ENCODE");
 
-                if (errno = pP->fxns->decodeEncode(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeEncode(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_TERSE1("PAF_ASOT_decodeProcessing: state: ENCODE.  decodeEncode err 0x%x", errno);
                     break;
@@ -1458,10 +1467,10 @@ PAF_ASOT_decodeProcessing(
                 
                 // Measure cycles in output processing loop.
                 // Only measures cycles spent in loop.
-                pfpEnd(PFP_ID_ASOT_0, PFP_FINISH_MEAS);
-                gNumPfpAsot0--;
-                pfpBegin(PFP_ID_ASOT_0, pC->taskHandle);
-                gNumPfpAsot0++;
+                pfpEnd(PFP_ID_ASOT_1, PFP_FINISH_MEAS);
+                gNumPfpAsot1--;
+                pfpBegin(PFP_ID_ASOT_1, pC->taskHandle);
+                gNumPfpAsot1++;
                 
                 // (***) FL: do we need this? 
                 //       AF pointers come from CB read, any resets occur in Decoder AF.
@@ -1483,7 +1492,8 @@ PAF_ASOT_decodeProcessing(
                 //
                 // (***) FL: update output (setCheckRateX)
                 //           Contained in INFO2 in combined FSM.
-                if (errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block))
+                errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block);
+                if (errno)
                 {
                     TRACE_TERSE1("PAF_ASOT_decodeProcessing: ENCODE break on decodeInfo2. errno 0x%x", errno);
                     break;
@@ -1553,15 +1563,15 @@ PAF_ASOT_decodeProcessing(
             /* ignored? */;
         }
         
-        //pfpEnd(PFP_ID_ASOT_0, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Output SIO change
-        //gNumPfpAsot0--;
+        //pfpEnd(PFP_ID_ASOT_1, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Output SIO change
+        //gNumPfpAsot1--;
         
         //return errno;
         break;        
     } // End of for (;;)
         
-    pfpEnd(PFP_ID_ASOT_0, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Output SIO change
-    gNumPfpAsot0--;
+    pfpEnd(PFP_ID_ASOT_1, PFP_FINISH_MEAS); // PFP end -- outside of PFP for errors, EOS, or Output SIO change
+    gNumPfpAsot1--;
         
     return errno;
 }