PASDK69: added support for NON_CACHE_STATUS.
authorChitresh Gupta <chitresh.g@pathpartnertech.com>
Thu, 8 Dec 2016 09:27:16 +0000 (14:57 +0530)
committerChitresh Gupta <chitresh.g@pathpartnertech.com>
Thu, 8 Dec 2016 09:27:16 +0000 (14:57 +0530)
pasdk/test_arm/.cproject
pasdk/test_arm/framework/audioStreamDecodeProc.c
pasdk/test_dsp/.cproject
pasdk/test_dsp/application/app.cfg
pasdk/test_dsp/application/main.c
pasdk/test_dsp/framework/audioStreamInpProc.c

index abae3ef3b86d0008777b6ecbd5b6fe74dd3a0623..2bf4348d38875c417c91ced5176763c65ef0204e 100644 (file)
@@ -74,6 +74,7 @@
                                                                        <listOptionValue builtIn="false" value="ARMCOMPILE"/>
                                                                        <listOptionValue builtIn="false" value="PAF_DEVICE=0xDA000000"/>
                                                                        <listOptionValue builtIn="false" value="far="/>
+                                                                       <listOptionValue builtIn="false" value="NON_CACHE_STATUS"/>
                                                                </option>
                                                                <option id="com.ti.ccstudio.buildDefinitions.TMS470_GNU_4.0.compilerID.MCPU.1180163032" name="Target CPU (-mcpu)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_GNU_4.0.compilerID.MCPU" value="cortex-a15" valueType="string"/>
                                                                <option id="com.ti.ccstudio.buildDefinitions.TMS470_GNU_4.0.compilerID.MTUNE.1670792469" name="Tune code for the given processor (-mtune)" superClass="com.ti.ccstudio.buildDefinitions.TMS470_GNU_4.0.compilerID.MTUNE" value="cortex-a15" valueType="string"/>
index b5cf0c8ecc73bc90365ff1684e8a3cc909f2c173..d945fd21e674fefde62b062eaaf2e9584a4e5008 100644 (file)
@@ -63,7 +63,7 @@ All rights reserved.
 
 #include "statusOp_common.h"
 
-#define CACHE_COHERENCE
+
 // FL: debug
 //#include "fwkSim.h"
 #include "dbgCapAf.h"
@@ -275,6 +275,28 @@ Void taskAsdpFxn(
         pP->fxns->memStatusPrint(HEAP_INTERNAL, HEAP_INTERNAL1, HEAP_EXTERNAL, HEAP_INTERNAL1_SHM);
     }
     
+#ifdef NON_CACHE_STATUS
+    //
+    // init Status structure Gate
+    //
+    if (statusOp_Init(GATEMP_INDEX_DEC) == STATUSOP_INIT_FAIL)
+    {
+        TRACE_TERSE1("TaskAsdp: Gate Index %d:initialization status GateMP Fail.", GATEMP_INDEX_DEC);
+    }
+    if (statusOp_Init(GATEMP_INDEX_DDP) == STATUSOP_INIT_FAIL)
+    {
+        TRACE_TERSE1("TaskAsdp: Gate Index %d:initialization status GateMP Fail.", GATEMP_INDEX_DDP);
+    }
+    if (statusOp_Init(GATEMP_INDEX_PCM) == STATUSOP_INIT_FAIL)
+    {
+        TRACE_TERSE1("TaskAsdp: Gate Index %d:initialization status GateMP Fail.", GATEMP_INDEX_PCM);
+    }
+    if (statusOp_Init(GATEMP_INDEX_THD) == STATUSOP_INIT_FAIL)
+    {
+        TRACE_TERSE1("TaskAsdp: Gate Index %d:initialization status GateMP Fail.", GATEMP_INDEX_THD);
+    }
+#endif
+
     // (***) FL: revisit
     // write back Status structure addresses for Beta Units initialized on Slave
     Cache_wb((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
@@ -286,7 +308,7 @@ Void taskAsdpFxn(
     
     // (***) FL: revisit
     // write back Status structures for Beta Units initialized on Slave
-    size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
+   /* size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
     Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
     size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]->size;
     Cache_wbInv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
@@ -301,7 +323,7 @@ Void taskAsdpFxn(
     // (***) FL: revisit
     // write back Dec configuration
     Cache_wbInv(&pAstCfg->xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
-    Cache_wait();
+    Cache_wait();*/
     
     // Send initialization complete message to master
     queId = MessageQ_getReplyQueue(pAspMsg);
@@ -599,8 +621,11 @@ Void taskAsdpFxn(
                     Cache_wbInv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
                     Cache_wait();            
                     
-#ifdef CACHE_COHERENCE
-                    statusOp_read(&(temp8), &(pAstCfg->xDec[z].decodeStatus.mode), sizeof(Int8));
+#ifdef NON_CACHE_STATUS
+                    statusOp_read(&(temp8),
+                                  &(pAstCfg->xDec[z].decodeStatus.mode),
+                                  sizeof(Int8),
+                                  GATEMP_INDEX_DEC);
                     // Re-initialize audio frame if decoder is disabled or
                     // doesn't have a valid input
                     if (!temp8 || !pAstCfg->xInp[zI].hRxSio)
@@ -713,8 +738,11 @@ Void taskAsdpFxn(
                     Cache_wbInv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
                     Cache_wait();
                     
-#ifdef CACHE_COHERENCE
-                    statusOp_read(&(temp8), &(pAstCfg->xDec[z].decodeStatus.mode), sizeof(Int8));
+#ifdef NON_CACHE_STATUS
+                    statusOp_read(&(temp8),
+                                  &(pAstCfg->xDec[z].decodeStatus.mode),
+                                  sizeof(Int8),
+                                  GATEMP_INDEX_DEC);
                     // Re-initialize audio frame if decoder is disabled or 
                     // doesn't have a valid input 
                     if (!temp8 || !pAstCfg->xInp[zI].hRxSio)
index e1dc75911372f0c56e13f900c13500cfdef5a3fd..28d59af2d250e3cc4d371af8b1b9d01a264ba9d9 100644 (file)
@@ -78,6 +78,7 @@
                                                                        <listOptionValue builtIn="false" value="DCS7_UART_EDMA_ENABLE"/>
                                                                        <listOptionValue builtIn="false" value="UARTCALLBACK"/>
                                                                        <listOptionValue builtIn="false" value="EVM_K2G"/>
+                                                                       <listOptionValue builtIn="false" value="NON_CACHE_STATUS"/>
                                                                </option>
                                                                <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION.1342965662" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.SILICON_VERSION" value="6600" valueType="string"/>
                                                                <option id="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.204446227" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_8.1.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>
index 8a21a9ed944988e3e7d50929112c1fd1ab8fd019..ecf5a2f569be1d3439ea483b43dfe762b3977b33 100644 (file)
@@ -82,6 +82,7 @@ xdc.useModule('ti.sdo.utils.MultiProc');
 xdc.global.SR0_cacheEnable = true;
 xdc.global.SrMsmcMem_cacheEnable = true;
 xdc.global.SrDDr3Mem_cacheEnable = true;
+xdc.global.SrDDr3_2Mem_cacheEnable = false;
 xdc.global.procName = "CORE0";
 var ipc_cfg = xdc.loadCapsule("C:/ti/processor_audio_sdk_1_00_00_00/pasdk/shared/ipc.cfg.xs");
 
index 539176f5395d42d445af59ba908e9a3f46220e7e..54704b9d02cd73e1842e3ee1daee0d459dedee40 100644 (file)
@@ -44,7 +44,6 @@ All rights reserved.
 #include <ti/sysbios/BIOS.h>
 #include <ti/ipc/Ipc.h>
 #include <ti/sysbios/hal/Cache.h>
-#include <ti/sysbios/family/c66/Cache.h>
 
 #include "fwkSim.h"
 
@@ -64,7 +63,7 @@ extern Void initDev2(Void);
  *  ======== main ========
  */
 Int main()
-{ 
+{
     Int status;
 #ifndef SIMULATE_SIO
     Platform_STATUS pfStatus;
@@ -133,14 +132,6 @@ Int main()
     Log_info0("initDev2");
     initDev2();
 #endif // SIMULATE_SIO
-    
-    {   // base: 0x81000000, len: 0x01000000,
-        UInt Common2_DDR3_MAR_base = 0x01848204;
-        UInt Common2_DDR3_base = 0x81000000;
-        UInt Common2_DDR3_len = 0x01000000;
-        // disable cache for common2 DDR3
-        Cache_setMar(Common2_DDR3_base, Common2_DDR3_len, Cache_Mar_DISABLE);
-    }
 
     Log_info0("IPC start");
     // Initialize IPC
index ab3bf34466c3998dd6e2c5aa71bc3731ce044e2c..cdc3a4c6aa782f60c78a33f0b0cecc3fd74c1ca6 100644 (file)
@@ -73,8 +73,6 @@ All rights reserved.
 
 #include "statusOp_common.h"
 
-#define CACHE_COHERENCE
-
 
 // -----------------------------------------------------------------------------
 // Debugging Trace Control, local to this file.
@@ -338,7 +336,7 @@ Void taskAsipFxn(
     // Messaging
     ASP_Msg *pAspMsg;              
     Int status;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
 
@@ -527,6 +525,26 @@ Void taskAsipFxn(
     Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), size, Cache_Type_ALLD, 0);
     Cache_wait();
     
+#ifdef NON_CACHE_STATUS
+    // Get the shared status structure GateMP handles. Initialized at slave.
+    if (statusOp_Init(GATEMP_INDEX_DEC) == STATUSOP_INIT_FAIL)
+    {
+        Log_info1("TaskAfp: Gate Index %d:Open status GateMP Fail.", GATEMP_INDEX_DEC);
+    }
+    if (statusOp_Init(GATEMP_INDEX_DDP) == STATUSOP_INIT_FAIL)
+    {
+        Log_info1("TaskAfp: Gate Index %d:Open status GateMP Fail.", GATEMP_INDEX_DDP);
+    }
+    if (statusOp_Init(GATEMP_INDEX_PCM) == STATUSOP_INIT_FAIL)
+    {
+        Log_info1("TaskAfp: Gate Index %d:Open status GateMP Fail.", GATEMP_INDEX_PCM);
+    }
+    if (statusOp_Init(GATEMP_INDEX_THD) == STATUSOP_INIT_FAIL)
+    {
+        Log_info1("TaskAfp: Gate Index %d:Open status GateMP Fail.", GATEMP_INDEX_THD);
+    }
+#endif
+
     // (***) FL: revisit
     // invalidate Dec configuration
     Cache_inv(&gPAF_AST_config.xDec[0], DECODEN*sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
@@ -604,11 +622,12 @@ Void taskAsipFxn(
         // so set to unknown and skip any remaining processing
         if (!pAstCfg->xInp[zMI].hRxSio)
         {
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             tempVar8 = PAF_SOURCE_UNKNOWN;
             statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
                            &tempVar8,
-                           sizeof(tempVar8));
+                           sizeof(tempVar8),
+                           GATEMP_INDEX_DEC);
 #else
             pAstCfg->xDec[zMD].decodeStatus.sourceProgram = PAF_SOURCE_UNKNOWN;
 #endif
@@ -623,10 +642,11 @@ Void taskAsipFxn(
             continue;
         }
         
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.mode),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         // If master decoder is not enabled, or the input is unlocked, then do nothing
         if (!tempVar8 || !pAstCfg->xInp[zMI].inpBufStatus.lock)
         {
@@ -642,17 +662,19 @@ Void taskAsipFxn(
         }
 #endif
         
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         // If no source selected then do nothing
         if (tempVar8 == PAF_SOURCE_NONE)
         {
             tempVar8 = PAF_SOURCE_NONE;
             statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
                            &tempVar8,
-                           sizeof(tempVar8));
+                           sizeof(tempVar8),
+                           GATEMP_INDEX_DEC);
             TRACE_VERBOSE1("TaskAsip: AS%d: no source selected, continue", as+zMS);
             continue;
         }
@@ -666,10 +688,11 @@ Void taskAsipFxn(
         }
 #endif
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         // If we want pass processing then proceed directly
         if (tempVar8 == PAF_SOURCE_PASS)
         {
@@ -678,7 +701,8 @@ Void taskAsipFxn(
             tempVar8 = PAF_SOURCE_PASS;
             statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
                            &tempVar8,
-                           sizeof(tempVar8));
+                           sizeof(tempVar8),
+                           GATEMP_INDEX_DEC);
 #else
         // If we want pass processing then proceed directly
         if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_PASS) 
@@ -700,10 +724,11 @@ Void taskAsipFxn(
             continue;
         }
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         // .....................................................................
         // At this point we have an enabled input and want to decode something.
         // If no decoder selected then do nothing. Need to reset the sourceProgram, since
@@ -734,10 +759,11 @@ Void taskAsipFxn(
             errno = ASPERR_AUTO_PROGRAM;
             continue;
         }
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
                       &(sourceProgram),
-                      sizeof(sourceProgram));
+                      sizeof(sourceProgram),
+                      GATEMP_INDEX_DEC);
 #else
         pAstCfg->xDec[zMD].decodeStatus.sourceProgram = sourceProgram;
 #endif
@@ -753,10 +779,11 @@ Void taskAsipFxn(
         // input frame, we determine whether or not to call decodeProcessing and with
         // what decAlg.
         sourceSelect = PAF_SOURCE_NONE;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         switch (tempVar8)
         {
 #else
@@ -807,11 +834,12 @@ Void taskAsipFxn(
             // If user made specific selection then program must match select.
             // (NB: this compare relies on ordering of PAF_SOURCE)
             default:
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
                 sourceSelect = 0; // due to size difference
                 statusOp_read(&sourceSelect,
                               &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                              sizeof(Int8));
+                              sizeof(Int8),
+                              GATEMP_INDEX_DEC);
 #else
                 sourceSelect = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
 #endif
@@ -984,6 +1012,16 @@ PAF_ASIT_initPhaseMalloc(
         INPUTN * sizeof (*pAstCfg->xInp),
         HEAP_ID_INTERNAL1_SHM, (IArg)pAstCfg->xInp);
 
+#ifdef NON_CACHE_STATUS
+    /* Decode memory */
+    if (!(pAstCfg->xDec = Memory_calloc((IHeap_Handle)HEAP_EXTERNAL_NONCACHED_SHM,
+        DECODEN * sizeof (*pAstCfg->xDec), 4, &eb)))
+    {
+        TRACE_TERSE1("PAF_ASIT_initPhaseMalloc: AS%d: Memory_calloc failed", as+zMS);
+        SW_BREAKPOINT;
+        return __LINE__;
+    }
+#else
     /* Decode memory */
     if (!(pAstCfg->xDec = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, 
         DECODEN * sizeof (*pAstCfg->xDec), 4, &eb)))
@@ -992,6 +1030,7 @@ PAF_ASIT_initPhaseMalloc(
         SW_BREAKPOINT;
         return __LINE__;
     }
+#endif
     TRACE_TERSE3("PAF_ASIT_initPhaseMalloc. (pC->xDec) %d bytes from space %d at 0x%x.",
         DECODEN * sizeof (*pAstCfg->xDec),
         HEAP_ID_INTERNAL1_SHM, (IArg)pAstCfg->xDec);
@@ -1452,6 +1491,7 @@ PAF_ASIT_initPhaseDecOpCircBuf(
         SW_BREAKPOINT;
         return __LINE__;
     }
+
     TRACE_TERSE3("PAF_ASIT_initPhaseDecOpCircBuf. (pC->xDecOpCb) %d bytes from space %d at 0x%x.",
         DECODEN * sizeof (*pAstCfg->xDecOpCb),
         HEAP_ID_INTERNAL1_SHM, (IArg)pAstCfg->xDecOpCb);
@@ -1959,7 +1999,7 @@ PAF_ASIT_decodeProcessing(
     //PAF_InpBufConfig *pIpBufConfig;
     Int frame; // decoder input frame count
     Int block; // (***) FL: formerly  -- decoder output block count / input frame
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
     
@@ -1980,10 +2020,11 @@ PAF_ASIT_decodeProcessing(
     state = INIT;
     errno = 0; /* error number */
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     statusOp_read(&tempVar8,
                   &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                  sizeof(tempVar8));
+                  sizeof(tempVar8),
+                  GATEMP_INDEX_DEC);
     TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", tempVar8);
 
     for (;;) 
@@ -2113,10 +2154,11 @@ PAF_ASIT_decodeProcessing(
 #endif                
 
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
                 statusOp_read(&tempVar8,
                               &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
-                              sizeof(tempVar8));
+                              sizeof(tempVar8),
+                              GATEMP_INDEX_DEC);
                 // Don't start decode until major access unit is found.
                 if (((tempVar8 == PAF_SOURCE_THD)    ||
                      (tempVar8 == PAF_SOURCE_DXP)    ||
@@ -2134,10 +2176,11 @@ PAF_ASIT_decodeProcessing(
                     for (z=DECODE1; z < DECODEN; z++) 
                     {
                         Int zI = pP->inputsFromDecodes[z];
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
                         statusOp_read(&tempVar8,
                                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                                      sizeof(tempVar8));
+                                      sizeof(tempVar8),
+                                      GATEMP_INDEX_DEC);
                         if (pAstCfg->xInp[zI].hRxSio && tempVar8)
                         {
 #else
@@ -2315,7 +2358,7 @@ PAF_ASIT_decodeCommand(
     Int as;                 /* Audio Stream Number (1, 2, etc.) */
     Int z;                  /* decode counter */
     Int zS;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
 
@@ -2325,10 +2368,11 @@ PAF_ASIT_decodeCommand(
     for (z=DECODE1; z < DECODEN; z++) 
     {
         zS = pP->streamsFromDecodes[z];
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.command2),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         if (!(tempVar8 & 0x80))
         {
             switch (tempVar8)
@@ -2337,21 +2381,24 @@ PAF_ASIT_decodeCommand(
                     tempVar8 |= 0x80;
                     statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
                                    &tempVar8,
-                                   sizeof(tempVar8));
+                                   sizeof(tempVar8),
+                                   GATEMP_INDEX_DEC);
                     break;
                 case 1: // command abort - leave now
                     TRACE_TERSE2("AS%d: PAF_ASIT_decodeCommand: decode command abort (0x%02x)", as+zS, 1);
                     tempVar8 |= 0x80;
                     statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
                                    &tempVar8,
-                                   sizeof(tempVar8));
+                                   sizeof(tempVar8),
+                                   GATEMP_INDEX_DEC);
                     return (ASPERR_ABORT);
                 case 2: // command restart - leave later
                     TRACE_TERSE2("AS%d: PAF_ASIT_decodeCommand: decode command quit (0x%02x)", as+zS, 2);
                     tempVar8 |= 0x80;
                     statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
                                    &tempVar8,
-                                   sizeof(tempVar8));
+                                   sizeof(tempVar8),
+                                   GATEMP_INDEX_DEC);
                     return (ASPERR_QUIT);
                 default: // command unknown - ignore
                     break;
@@ -2415,7 +2462,7 @@ PAF_ASIT_decodeInit(
     Int argIdx;
     Int decErrno;
     Int status;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
     
@@ -2427,19 +2474,21 @@ PAF_ASIT_decodeInit(
     
     pCbCtl = &pC->pAspmCfg->decOpCircBufCtl; // get pointer to circular buffer control
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     // reset frameCount
     for (z=DECODE1; z < DECODEN; z++)
     {
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         if (tempVar8)
         {
             tempVar8 = 0;
             statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
                           &tempVar8,
-                          sizeof(tempVar8));
+                          sizeof(tempVar8),
+                          GATEMP_INDEX_DEC);
         }
     }
 
@@ -2450,7 +2499,8 @@ PAF_ASIT_decodeInit(
         (void)zS; // clear compiler warning in case not used with tracing disabled
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(tempVar8));
+                      sizeof(tempVar8),
+                      GATEMP_INDEX_DEC);
         if (pAstCfg->xInp[zI].hRxSio && tempVar8)
         {
 #else
@@ -2601,15 +2651,17 @@ PAF_ASIT_decodeInit(
                 return errno;
 #endif
             
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             gear = 0;  // due to size difference
             statusOp_read(&gear,
                           &(pAstCfg->xDec[z].decodeStatus.aspGearControl),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             tempVar8 = gear < GEARS ? gear : 0;
             statusOp_write(&(pAstCfg->xDec[z].decodeStatus.aspGearStatus),
                            &tempVar8,
-                           sizeof(tempVar8));
+                           sizeof(tempVar8),
+                           GATEMP_INDEX_DEC);
 #else
             gear = pAstCfg->xDec[z].decodeStatus.aspGearControl;
             pAstCfg->xDec[z].decodeStatus.aspGearStatus = gear < GEARS ? gear : 0;
@@ -2666,10 +2718,11 @@ PAF_ASIT_decodeInit(
                 }
             }
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             statusOp_read(&tempVar8,
                           &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_SOURCESELECT,
                 DECSIOMAP(tempVar8)))
             {
@@ -2743,7 +2796,7 @@ PAF_ASIT_decodeInfo(
     ASP_Msg *pAspMsg;          /* Messaging */
     Int argIdx;
     Int status;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
     Int tempVar;
 #endif
@@ -2791,10 +2844,11 @@ PAF_ASIT_decodeInfo(
                     // return (ASPERR_INFO_RATECHANGE);
                 }
             }
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             statusOp_read(&tempVar8,
                           &(pAstCfg->xDec[zD].decodeStatus.sourceDecode),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             pAstCfg->xDec[zD].decodeControl.emphasis = 
                 tempVar8 != PAF_SOURCE_PCM
                 ? PAF_IEC_PREEMPHASIS_NO // fix for Mantis ID #119
@@ -2845,10 +2899,11 @@ PAF_ASIT_decodeInfo(
         zI = pP->inputsFromDecodes[z];
         zS = pP->streamsFromDecodes[z];
         (void)zS; // clear compiler warning in case not used with tracing disabled
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(Int8));
+                      sizeof(Int8),
+                      GATEMP_INDEX_DEC);
         if (pAstCfg->xInp[zI].hRxSio && tempVar8)
         {
 #else
@@ -2940,15 +2995,17 @@ PAF_ASIT_decodeInfo(
                 TRACE_TERSE1("return error errno 0x%x.", errno);
                 return errno;
             }
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             statusOp_read(&tempVar,
                           &(pAstCfg->xDec[z].decodeStatus.frameCount),
-                          sizeof(Int));
+                          sizeof(Int),
+                          GATEMP_INDEX_DEC);
             // increment decoded frame count
             tempVar += 1;
             statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
                            &tempVar,
-                           sizeof(Int));
+                           sizeof(Int),
+                           GATEMP_INDEX_DEC);
 #else
             // increment decoded frame count
             pAstCfg->xDec[z].decodeStatus.frameCount += 1;
@@ -2956,10 +3013,11 @@ PAF_ASIT_decodeInfo(
         }
     } // z=DECODE1 to DECODEN
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     statusOp_read(&tempVar8,
                   &(pAstCfg->xDec[zMD].decodeStatus.mode),
-                  sizeof(Int8));
+                  sizeof(Int8),
+                  GATEMP_INDEX_DEC);
     // query IB for latest sourceProgram (needed if we started decoding due to a force mode)
     if (tempVar8)
     {
@@ -2972,7 +3030,8 @@ PAF_ASIT_decodeInfo(
         }
         statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
                        &(sourceProgram),
-                       sizeof(Int8));
+                       sizeof(Int8),
+                       GATEMP_INDEX_DEC);
     }
 
     // since now decoding update decode status for all enabled decoders
@@ -2980,24 +3039,29 @@ PAF_ASIT_decodeInfo(
     {
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(Int8));
+                      sizeof(Int8),
+                      GATEMP_INDEX_DEC);
         if (tempVar8)
         {
             statusOp_read(&tempVar8,
                           &(pAstCfg->xDec[z].decodeStatus.sourceProgram),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
                            &tempVar8,
-                           sizeof(Int8));
+                           sizeof(Int8),
+                           GATEMP_INDEX_DEC);
             statusOp_read(&tempVar8,
                           &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             if (tempVar8 == PAF_SOURCE_SNG)
             {
                 tempVar8 = PAF_SOURCE_SNG;
                 statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
                                &tempVar8,
-                               sizeof(Int8));
+                               sizeof(Int8),
+                               GATEMP_INDEX_DEC);
             }
         }
     }
@@ -3142,7 +3206,7 @@ PAF_AST_decodeCont(
     Int z;                      /* decode counter */
     Int zI, zS;
     Int zMD;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
 
@@ -3158,10 +3222,11 @@ PAF_AST_decodeCont(
         zI = pP->inputsFromDecodes[z];
         zS = pP->streamsFromDecodes[z];
         (void)zS;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(Int8));
+                      sizeof(Int8),
+                      GATEMP_INDEX_DEC);
         if (z == zMD
             || ! pAstCfg->xInp[zI].hRxSio
             || ! tempVar8)
@@ -3438,21 +3503,23 @@ PAF_ASIT_decodeFinalTest(
     Int zMD;
     Int sourceSelect;
     Int sourceProgram;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8, temp2Var8;
 #endif
 
     pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
     zMD = pAstCfg->masterDec;
 
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     statusOp_read(&tempVar8,
                   &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                  sizeof(Int8));
+                  sizeof(Int8),
+                  GATEMP_INDEX_DEC);
     sourceSelect = tempVar8;
     statusOp_read(&tempVar8,
                   &(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
-                  sizeof(Int8));
+                  sizeof(Int8),
+                  GATEMP_INDEX_DEC);
     sourceProgram = tempVar8;
 #else
     sourceSelect  = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
@@ -3489,13 +3556,15 @@ PAF_ASIT_decodeFinalTest(
         }
         else 
         {
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
             statusOp_read(&tempVar8,
                           &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             statusOp_read(&temp2Var8,
                           &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
-                          sizeof(Int8));
+                          sizeof(Int8),
+                          GATEMP_INDEX_DEC);
             if (temp2Var8 != tempVar8)
             {
                 return 1;
@@ -3541,7 +3610,7 @@ PAF_ASIT_decodeComplete(
     Int argIdx;
     Int errno;                  /* error number */
     Int status;
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
 
@@ -3559,10 +3628,11 @@ PAF_ASIT_decodeComplete(
         DEC_Handle dec = (DEC_Handle )decAlg[z];
 #endif /* PAF_ASP_FINAL */
         Int zI = pP->inputsFromDecodes[z];
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(Int8));
+                      sizeof(Int8),
+                      GATEMP_INDEX_DEC);
         if (pAstCfg->xInp[zI].hRxSio && tempVar8)
         {
 #else
@@ -3734,7 +3804,7 @@ PAF_ASIT_sourceDecode(
 {
     PAF_AST_Config *pAstCfg;
     Int z;                              /* decode counter */
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
     Int8 tempVar8;
 #endif
 
@@ -3742,16 +3812,18 @@ PAF_ASIT_sourceDecode(
 
     for (z=DECODE1; z < DECODEN; z++)
     {
-#ifdef CACHE_COHERENCE
+#ifdef NON_CACHE_STATUS
         statusOp_read(&tempVar8,
                       &(pAstCfg->xDec[z].decodeStatus.mode),
-                      sizeof(Int8));
+                      sizeof(Int8),
+                      GATEMP_INDEX_DEC);
         if (tempVar8)
         {
             tempVar8 = x;
             statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
                            &tempVar8,
-                           sizeof(Int8));
+                           sizeof(Int8),
+                           GATEMP_INDEX_DEC);
         }
 #else
         if (pAstCfg->xDec[z].decodeStatus.mode)