diff --git a/pasdk/test_dsp/framework/audioStreamInpProc.c b/pasdk/test_dsp/framework/audioStreamInpProc.c
index 9e06ee9d85e84deebd4353d75564bab8db3bb225..e791f6c141cb30bb34f29dbb030135f1a0d37177 100644 (file)
// FL: debug
#include "dbgCapAf.h"
+#include "statusOp_common.h"
+
// -----------------------------------------------------------------------------
// Debugging Trace Control, local to this file.
};
// Global debug counters */
-UInt32 gTaskAsipCnt=0; // debug
-UInt32 gAsipInitCnt =0;
-UInt32 gAsipInfo1Cnt =0;
-UInt32 gAsipInfo2Cnt =0;
-UInt32 gAsipDecodeCnt =0;
-UInt32 gAsipFinalCnt =0;
-UInt32 gAsipQuitCnt =0;
-#include "dbgDib.h"
+UInt32 gTaskAsipCnt =0;
+UInt32 gAsipInitCnt =0;
+UInt32 gAsipInfo1Cnt =0;
+UInt32 gAsipInfo2Cnt =0;
+UInt32 gAsipDecodeCnt =0;
+UInt32 gAsipDecodeErrCnt =0;
+UInt32 gAsipFinalCnt =0;
+UInt32 gAsipQuitCnt =0;
+UInt32 gIbReset_cnt =0;
+UInt32 gcapIb_cnt =0;
+UInt32 gAsipInfo2_PrimaryErrCnt =0;
+UInt32 gAsipInfo2_ErrCnt =0;
+// debug
+UInt32 gCbWrtAfErrCnt =0; // // decoder output circular buffer write error count (returned from ARM to DSP)
+
+
+#include "dbgDib.h" // debug
extern struct {
Int size;
IALG_Status *pStatus[512];
} IACP_STD_BETA_TABLE;
+// FL: debug
+#include "evmc66x_gpio_dbg.h"
/*
* ======== taskAsipFxn ========
// Messaging
ASP_Msg *pAspMsg;
Int status;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
+ Task_Handle taskHandle;
Log_info0("Enter taskAsipFxn()");
pAstCfg->as = as;
TRACE_TERSE1("TaskAsip: Started with AS%d.", as);
+ taskHandle = Task_self();
+
//
// Initialize message log trace and line number reporting
//
Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM2]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
+ Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
+ Cache_inv((Ptr)(&IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), sizeof(IALG_Status *), Cache_Type_ALLD, 0);
Cache_wait();
if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]) Log_info0("ERROR: beta unit for Dec==NULL");
if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]) Log_info0("ERROR: beta unit for Dec==NULL");
if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM2]) Log_info0("ERROR: beta unit for Dec==NULL");
if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]) Log_info0("ERROR: beta unit for Dec==NULL");
if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]) Log_info0("ERROR: beta unit for Dec==NULL");
+ if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]) Log_info0("ERROR: beta unit for Dec==NULL");
+ if (!IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]) Log_info0("ERROR: beta unit for Dec==NULL");
// (***) FL: revisit
// invalidate Status structures for Beta Units initialized on Slave
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), sizeof(Int), Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP2]), size, Cache_Type_ALLD, 0);
+ Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), sizeof(Int), Cache_Type_ALLD, 0);
+ size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
+ Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
+ Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), sizeof(Int), Cache_Type_ALLD, 0);
+ size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]->size;
+ Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD2]), 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);
// so set to unknown and skip any remaining processing
if (!pAstCfg->xInp[zMI].hRxSio)
{
+#ifdef NON_CACHE_STATUS
+ tempVar8 = PAF_SOURCE_UNKNOWN;
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &tempVar8,
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+#else
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = PAF_SOURCE_UNKNOWN;
+#endif
TRACE_VERBOSE1("TaskAsip: AS%d: No input selected...", as+zMS);
continue;
}
continue;
}
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.mode),
+ 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)
+ {
+ TRACE_VERBOSE0("TaskAsip: Not locked, continue");
+ continue;
+ }
+#else
// If master decoder is not enabled, or the input is unlocked, then do nothing
if (!pAstCfg->xDec[zMD].decodeStatus.mode || !pAstCfg->xInp[zMI].inpBufStatus.lock)
{
TRACE_VERBOSE0("TaskAsip: Not locked, continue");
continue;
}
+#endif
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ 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),
+ GATEMP_INDEX_DEC);
+ TRACE_VERBOSE1("TaskAsip: AS%d: no source selected, continue", as+zMS);
+ continue;
+ }
+#else
// If no source selected then do nothing
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_NONE)
{
TRACE_VERBOSE1("TaskAsip: AS%d: no source selected, continue", as+zMS);
continue;
}
+#endif
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ // If we want pass processing then proceed directly
+ if (tempVar8 == PAF_SOURCE_PASS)
+ {
+ TRACE_VERBOSE1("TaskAsip: AS%d: Pass processing ...", as+zMS);
+
+ tempVar8 = PAF_SOURCE_PASS;
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &tempVar8,
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+#else
// If we want pass processing then proceed directly
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_PASS)
{
TRACE_VERBOSE1("TaskAsip: AS%d: Pass processing ...", as+zMS);
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = PAF_SOURCE_PASS;
+#endif
pP->fxns->sourceDecode(pP, pQ, pC, PAF_SOURCE_PASS);
if (pP->fxns->passProcessing)
{
continue;
}
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ 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
+ // 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
+ {
+ TRACE_VERBOSE1("TaskAsip: autoProcessing returns 0x%x, continue", errno);
+ continue;
+ }
+#else
// .....................................................................
// 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
TRACE_VERBOSE1("TaskAsip: autoProcessing returns 0x%x, continue", errno);
continue;
}
+#endif
// query for input type
if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM, (Arg )&sourceProgram))
errno = ASPERR_AUTO_PROGRAM;
continue;
}
+#ifdef NON_CACHE_STATUS
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &(sourceProgram),
+ sizeof(sourceProgram),
+ GATEMP_INDEX_DEC);
+#else
pAstCfg->xDec[zMD].decodeStatus.sourceProgram = sourceProgram;
+#endif
// if input is unclassifiable then do nothing
if (sourceProgram == PAF_SOURCE_UNKNOWN)
// input frame, we determine whether or not to call decodeProcessing and with
// what decAlg.
sourceSelect = PAF_SOURCE_NONE;
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ switch (tempVar8)
+ {
+#else
switch (pAstCfg->xDec[zMD].decodeStatus.sourceSelect)
{
+#endif
// If autodetecting, decoding everything, and input is something
// (i.e. bitstream or PCM) then decode.
case PAF_SOURCE_AUTO:
// If user made specific selection then program must match select.
// (NB: this compare relies on ordering of PAF_SOURCE)
default:
+#ifdef NON_CACHE_STATUS
+ sourceSelect = 0; // due to size difference
+ statusOp_read(&sourceSelect,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+#else
sourceSelect = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
+#endif
if ((sourceSelect >= PAF_SOURCE_PCM) && (sourceSelect <= PAF_SOURCE_N))
{
if (sourceProgram != sourceSelect)
}
// FL: debug, reset IB capture buffer
- //capIbReset();
- //Log_info0("capIbReset()");
-
+ capIbReset();
+ gIbReset_cnt++;
+ Log_info0("capIbReset()");
+
// FL: send source select message to slave
pAspMsg = (ASP_Msg *)MessageQ_alloc(hAspMsgMaster->heapId, hAspMsgMaster->msgSize); /* allocate message */
MessageQ_setReplyQueue(hAspMsgMaster->masterQue, (MessageQ_Msg)pAspMsg); /* set the return address in the message header */
TRACE_VERBOSE1(procName[sourceProgram], as+zMS);
+ // Reduce priority level since autodetection complete
+ Task_setPri(taskHandle, Task_getPri(taskHandle)-1);
+
TRACE_VERBOSE0("TaskAsip: calling decodeProcessing.");
errno = pP->fxns->decodeProcessing(pP, pQ, pC, sourceSelect);
if (errno)
TRACE_VERBOSE0("TaskAsip: decodeProcessing complete with no error.");
}
+ // Increase priority level since decoding complete
+ Task_setPri(taskHandle, Task_getPri(taskHandle)+1);
+
// FL: send dec exit message to slave
pAspMsg = (ASP_Msg *)MessageQ_alloc(hAspMsgMaster->heapId, hAspMsgMaster->msgSize); /* allocate message */
MessageQ_setReplyQueue(hAspMsgMaster->masterQue, (MessageQ_Msg)pAspMsg); /* set the return address in the message header */
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)))
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);
//
TRACE_TERSE0("PAF_ASIT_initPhaseCommon: calling PAF_ALG_setup.");
PAF_ALG_setup(&pafAlgConfig,
- HEAP_ID_INTERNAL, HEAP_INTERNAL,
- HEAP_ID_INTERNAL1, HEAP_INTERNAL1,
- HEAP_ID_EXTERNAL, HEAP_EXTERNAL,
- HEAP_ID_INTERNAL1_SHM, HEAP_INTERNAL1_SHM,
- HEAP_ID_EXTERNAL_SHM, HEAP_EXTERNAL_SHM,
+ HEAP_ID_INTERNAL, HEAP_INTERNAL,
+ HEAP_ID_INTERNAL1, HEAP_INTERNAL1,
+ HEAP_ID_EXTERNAL, HEAP_EXTERNAL,
+ HEAP_ID_INTERNAL1_SHM, HEAP_INTERNAL1_SHM,
+ HEAP_ID_EXTERNAL_SHM, HEAP_EXTERNAL_SHM,
+ HEAP_ID_EXTERNAL_NONCACHED_SHM, HEAP_EXTERNAL_NONCACHED_SHM,
HEAP_CLEAR);
if (pP->fxns->headerPrint)
if (pP->fxns->bufMemPrint)
{
PAF_ALG_setup (&pafAlgConfig,
- HEAP_ID_INTERNAL, HEAP_INTERNAL,
- HEAP_ID_INTERNAL1, HEAP_INTERNAL1,
- HEAP_ID_EXTERNAL, HEAP_EXTERNAL,
- HEAP_ID_INTERNAL1_SHM, HEAP_INTERNAL1_SHM,
- HEAP_ID_EXTERNAL_SHM, HEAP_EXTERNAL_SHM,
+ HEAP_ID_INTERNAL, HEAP_INTERNAL,
+ HEAP_ID_INTERNAL1, HEAP_INTERNAL1,
+ HEAP_ID_EXTERNAL, HEAP_EXTERNAL,
+ HEAP_ID_INTERNAL1_SHM, HEAP_INTERNAL1_SHM,
+ HEAP_ID_EXTERNAL_SHM, HEAP_EXTERNAL_SHM,
+ HEAP_ID_EXTERNAL_NONCACHED_SHM, HEAP_EXTERNAL_NONCACHED_SHM,
HEAP_CLEAR);
TRACE_TERSE2("PAF_ASIT_initPhaseDevice: AS%d: calling PAF_ALG_setup with clear at %d.", as, HEAP_CLEAR);
}
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);
// allocate audio frame PCM sample pointer array
for (i = 0; i<ASP_DECOP_CB_MAX_NUM_AF; i++)
{
- if (!(pCb->afCb[i].data.sample = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioData *), 4, &eb)))
+ if (!(pCb->afCb[i].data.sample = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_MAX_NUM_PCM_CH_MAT * sizeof(PAF_AudioData *), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
}
- if (!(pCb->afCb[i].data.samsiz = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_MAX_NUM_PCM_CH * sizeof(PAF_AudioSize), 4, &eb)))
+ if (!(pCb->afCb[i].data.samsiz = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_MAX_NUM_PCM_CH_MAT * sizeof(PAF_AudioSize), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
}
}
// allocate PCM sample buffer
- if (!(pCb->pcmBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_PCM_BUF_SZ * sizeof(PAF_AudioData), 4, &eb)))
+ if (!(pCb->pcmBuf = Memory_calloc((IHeap_Handle)HEAP_EXTERNAL_SHM, ASP_DECOP_CB_PCM_BUF_SZ * sizeof(PAF_AudioData), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
}
+ pCb->pcmBufEnd = pCb->pcmBuf + ASP_DECOP_CB_PCM_BUF_SZ;
// allocate Metadata buffers //QIN
- if (!(pCb->metaBuf = Memory_calloc((IHeap_Handle)HEAP_INTERNAL1_SHM, ASP_DECOP_CB_MAX_NUM_AF * PAF_MAX_PRIVATE_MD_SZ * PAF_MAX_NUM_PRIVATE_MD * sizeof(Int8), 4, &eb)))
+ if (!(pCb->metaBuf = Memory_calloc((IHeap_Handle)HEAP_EXTERNAL_SHM, ASP_DECOP_CB_MAX_NUM_AF * PAF_MAX_PRIVATE_MD_SZ * PAF_MAX_NUM_PRIVATE_MD * sizeof(Int8), 4, &eb)))
{
TRACE_TERSE1("PAF_ASIT_initPhaseDecOpCircBuf: AS%d: Memory_calloc failed", as+zMS);
SW_BREAKPOINT;
}
-
+ pCb->metaBufEnd = pCb->metaBuf + (ASP_DECOP_CB_MAX_NUM_AF * PAF_MAX_PRIVATE_MD_SZ * PAF_MAX_NUM_PRIVATE_MD);
// (***) FL: revisit, here PCM is hard-coded for 256 sample dec op frame length
// Initialize decoder output circular buffer for PCM
errno = cbInit(pCb);
nbytes = SIO_reclaim(pAstCfg->xInp[zMI].hRxSio, (Ptr)&pAstCfg->xInp[zMI].pInpBuf, NULL);
if (nbytes == -DIBERR_SYNC)
{
+#if 0 // (***) FL: shows timing of autosync restart
+ // (***) debug // B5
+ {
+ static Uint8 toggleState = 0;
+ if (toggleState == 0)
+ GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_99);
+ else
+ GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_99);
+ toggleState = ~(toggleState);
+ }
+#endif
+
TRACE_TERSE2("PAF_ASIT_autoProcessing: AS%d: SIO_reclaim returned 0x%x, ignoring", as+zMS, nbytes);
- return 0;
+ return nbytes;
}
if (nbytes != sizeof(PAF_InpBufConfig))
{
return errno;
} //PAF_ASIT_autoProcessing
+UInt32 gProbe1Err=0;
+UInt32 gProbe2Err=0;
+UInt32 gMajorAuMissed=0;
+
// -----------------------------------------------------------------------------
// ASIT Processing Function - Decode Processing
//
//PAF_InpBufConfig *pIpBufConfig;
Int frame; // decoder input frame count
Int block; // (***) FL: formerly -- decoder output block count / input frame
-
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8, temp2Var8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
zMD = pAstCfg->masterDec;
state = INIT;
errno = 0; /* error number */
- TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", pAstCfg->xDec[zMD].decodeStatus.sourceSelect);
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", tempVar8);
for (;;)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ if (tempVar8 == PAF_SOURCE_NONE)
+ {
+#else
+ TRACE_TERSE1("PAF_ASIT_decodeProcessing: sourceSelect is %d", pAstCfg->xDec[zMD].decodeStatus.sourceSelect);
+
+ for (;;)
{
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect == PAF_SOURCE_NONE)
{
+#endif
TRACE_VERBOSE0("PAF_ASIT_decodeProcessing: sourceSelect == PAF_SOURCE_NONE");
state = QUIT;
}
gAsipInitCnt++;
Log_info0("TaskAsip: state=INIT");
- // (***) FL: revisit
-#if 1 // status for shared beta units can change (e.g. at-boot or alpha)
+#if 0 // Not necessary since decoder status is in uncached memory
+ // status for shared beta units can change (e.g. at-boot or alpha)
+
// write back Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
+ size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
+ Cache_wb((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
Cache_wait();
#endif
-#if 0
+#if 0 // Not necessary since decoder status is in uncached memory
////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;
break;
}
-#if 1
- // (***) FL: revisit
+ //
+ // Not necessary since decoder status is in uncached memory
+ //
+
+#if 0 // Not necessary since decoder status is in uncached memory
// invalidate Status structures for shared Beta Units
//size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]->size;
//Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DECODE]), size, Cache_Type_ALLD, 0);
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_PCM]), size, Cache_Type_ALLD, 0);
size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]->size;
Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_DDP]), size, Cache_Type_ALLD, 0);
+ size = IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]->size;
+ Cache_inv((Ptr)(IACP_STD_BETA_TABLE.pStatus[STD_BETA_THD]), size, Cache_Type_ALLD, 0);
Cache_wait();
#endif
// Establish primary timing
if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
{
+ gProbe1Err++;
TRACE_TERSE1("INFO1: errno 0x%x after decodeInfo, primary timing", errno);
break;
}
//Cache_wait();
#endif
+
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ statusOp_read(&temp2Var8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sampleRate),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ // Don't start decode until major access unit is found.
+ if (((tempVar8 == PAF_SOURCE_THD) ||
+ (tempVar8 == PAF_SOURCE_DXP) ||
+ (tempVar8 == PAF_SOURCE_DTSHD)) &&
+ (temp2Var8 == PAF_SAMPLERATE_UNKNOWN))
+#else
// Don't start decode until major access unit is found.
if (((pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_THD) ||
(pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_DXP) ||
(pAstCfg->xDec[zMD].decodeStatus.sourceDecode == PAF_SOURCE_DTSHD)) &&
- (pAstCfg->xStr[zMS].pAudioFrame->sampleRate == PAF_SAMPLERATE_UNKNOWN))
+ (pAstCfg->xDec[zMD].decodeStatus.sampleRate == PAF_SAMPLERATE_UNKNOWN))
+#endif
{
Int z;
for (z=DECODE1; z < DECODEN; z++)
{
Int zI = pP->inputsFromDecodes[z];
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_VERBOSE0("TaskAsip: PAF_ASIT_decodeProcessing: INFO1, SIO_issue");
if (SIO_issue(pAstCfg->xInp[zI].hRxSio, &pAstCfg->xInp[zI].inpBufConfig,
sizeof(pAstCfg->xInp[zI].inpBufConfig), PAF_SIO_REQUEST_NEWFRAME))
{
+ gProbe2Err++;
TRACE_TERSE0("PAF_ASIT_decodeProcessing. %d: INFO1, return (ASPERR_ISSUE)");
return (ASPERR_ISSUE);
}
}
}
TRACE_VERBOSE1("PAF_ASIT_decodeProcessing: INFO1: frame %d, not major access unit", frame);
+ gMajorAuMissed++; // debug
frame++;
state = INFO1;
continue;
if (errno = pP->fxns->decodeInfo(pP, pQ, pC, frame, block))
{
TRACE_TERSE1("PAF_ASIT_decodeProcessing: INFO2 break on decodeInfo. errno 0x%x", errno);
+ gAsipInfo2_PrimaryErrCnt++;
break;
}
if (errno = pP->fxns->decodeInfo2(pP, pQ, pC, frame, block))
{
TRACE_TERSE1("PAF_ASIT_decodeProcessing. %d: INFO2 break on decodeInfo2. errno 0x%x", errno);
+ gAsipInfo2_ErrCnt++;
break;
}
if (errno = pP->fxns->decodeDecode(pP, pQ, pC, sourceSelect, frame, block))
{
- TRACE_TERSE1("PAF_ASIT_decodeProcessing: state: DECODE. decodeDecode err 0x%04x", errno);
+ gAsipDecodeErrCnt++;
+ TRACE_TERSE1("PAF_ASIT_decodeProcessing: state: DECODE. decodeDecode err 0x%04x", errno);
break;
}
Int as; /* Audio Stream Number (1, 2, etc.) */
Int z; /* decode counter */
Int zS;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
for (z=DECODE1; z < DECODEN; z++)
{
zS = pP->streamsFromDecodes[z];
- if (!(pAstCfg->xDec[z].decodeStatus.command2 & 0x80))
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.command2),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ if (!(tempVar8 & 0x80))
{
- switch (pAstCfg->xDec[z].decodeStatus.command2)
+ switch (tempVar8)
+ {
+ case 0: // command none - process
+ tempVar8 |= 0x80;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.command2),
+ &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),
+ 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),
+ GATEMP_INDEX_DEC);
+ return (ASPERR_QUIT);
+ default: // command unknown - ignore
+ break;
+ }
+ }
+#else
+ if (!(pAstCfg->xDec[z].decodeStatus.command2 & 0x80))
+ {
+ switch (pAstCfg->xDec[z].decodeStatus.command2)
{
case 0: // command none - process
pAstCfg->xDec[z].decodeStatus.command2 |= 0x80;
break;
}
}
+#endif
}
return 0;
Int argIdx;
Int decErrno;
Int status;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
as = pAstCfg->as;
pCbCtl = &pC->pAspmCfg->decOpCircBufCtl; // get pointer to circular buffer control
+#ifdef NON_CACHE_STATUS
+ // reset frameCount
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ if (tempVar8)
+ {
+ tempVar8 = 0;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
+ &tempVar8,
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ }
+ }
+
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ zI = pP->inputsFromDecodes[z];
+ zS = pP->streamsFromDecodes[z];
+ (void)zS; // clear compiler warning in case not used with tracing disabled
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
// reset frameCount
for (z=DECODE1; z < DECODEN; z++)
{
}
}
- for (z=DECODE1; z < DECODEN; z++)
+ for (z=DECODE1; z < DECODEN; z++)
{
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS; // clear compiler warning in case not used with tracing disabled
- if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
+ if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
Uns gear;
Int frameLength;
TRACE_VERBOSE1("AS%d: PAF_ASIT_decodeInit: initializing decode", as+zS);
// write back Dec configuration
Cache_wb(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
Cache_wait();
-
+
// FL: send dec activate message to slave
pAspMsg = (ASP_Msg *)MessageQ_alloc(hAspMsgMaster->heapId, hAspMsgMaster->msgSize); /* allocate message */
if (pAspMsg == NULL)
// (***) FL: revisit
// invalidate Dec configuration
Cache_inv(&pAstCfg->xDec[z], sizeof(PAF_AST_Decode), Cache_Type_ALLD, 0);
- Cache_wait();
+ Cache_wait();
#if 0 // FL: decoder reset call, slave
if (dec->fxns->reset
return errno;
#endif
+#ifdef NON_CACHE_STATUS
+ gear = 0; // due to size difference
+ statusOp_read(&gear,
+ &(pAstCfg->xDec[z].decodeStatus.aspGearControl),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ tempVar8 = gear < GEARS ? gear : 0;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.aspGearStatus),
+ &tempVar8,
+ sizeof(tempVar8),
+ GATEMP_INDEX_DEC);
+#else
gear = pAstCfg->xDec[z].decodeStatus.aspGearControl;
pAstCfg->xDec[z].decodeStatus.aspGearStatus = gear < GEARS ? gear : 0;
+#endif
#if 0 // FL: change handle to decIdx (zone index)
frameLength = pP->fxns->computeFrameLength(decAlg[z],
{
frameLength = 1536;
}
+ else if (sourceSelect == PAF_SOURCE_THD)
+ {
+ frameLength = 1536; //QIN FIX ME
+ }
else
{
frameLength = 256;
}
}
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_SOURCESELECT,
+ DECSIOMAP(tempVar8)))
+ {
+ return errno;
+ }
+#else
if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_SOURCESELECT,
DECSIOMAP(pAstCfg->xDec[z].decodeStatus.sourceSelect)))
{
return errno;
}
+#endif
if (errno = SIO_ctrl(pAstCfg->xInp[zI].hRxSio, PAF_SIO_CONTROL_SET_PCMFRAMELENGTH,
frameLength))
{
ASP_Msg *pAspMsg; /* Messaging */
Int argIdx;
Int status;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+ Int tempVar;
+#endif
// FL: revisit
//Int size;
//PAF_InpBufConfig *pIpBufConfig;
// return (ASPERR_INFO_RATECHANGE);
}
}
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zD].decodeStatus.sourceDecode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
pAstCfg->xDec[zD].decodeControl.emphasis =
+ tempVar8 != PAF_SOURCE_PCM
+ ? PAF_IEC_PREEMPHASIS_NO // fix for Mantis ID #119
+ : pAstCfg->xInp[z].inpBufStatus.emphasisStatus;
+#else
+ pAstCfg->xDec[zD].decodeControl.emphasis =
pAstCfg->xDec[zD].decodeStatus.sourceDecode != PAF_SOURCE_PCM
? PAF_IEC_PREEMPHASIS_NO // fix for Mantis ID #119
: pAstCfg->xInp[z].inpBufStatus.emphasisStatus;
+#endif
}
else
{
}
// FL: debug, capture input buffer
- //capIb(pAstCfg->xInp[zMI].pInpBuf);
+ capIb(pAstCfg->xInp[zMI].pInpBuf);
+ gcapIb_cnt++;
+#if 1 // (***) FL: shows timing of Input Rx SIO reclaim after decoding has started (autodet complete)
+ {
+ static Uint8 toggleState = 0;
+ if (toggleState == 0)
+ GPIOSetOutput(GPIO_PORT_0, GPIO_PIN_99);
+ else
+ GPIOClearOutput(GPIO_PORT_0, GPIO_PIN_99);
+ toggleState = ~(toggleState);
+ }
+#endif
+
//
// Simulate Rx SIO_reclaim() pend
//
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS; // clear compiler warning in case not used with tracing disabled
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_GEN2("PAF_ASIT_decodeInfo: AS%d: processing frame %d -- info", as+zS, frame);
if (errno = pP->fxns->updateInputStatus(pAstCfg->xInp[zI].hRxSio,
TRACE_TERSE1("return error errno 0x%x.", errno);
return errno;
}
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar,
+ &(pAstCfg->xDec[z].decodeStatus.frameCount),
+ sizeof(Int),
+ GATEMP_INDEX_DEC);
+ // increment decoded frame count
+ tempVar += 1;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.frameCount),
+ &tempVar,
+ sizeof(Int),
+ GATEMP_INDEX_DEC);
+#else
// increment decoded frame count
pAstCfg->xDec[z].decodeStatus.frameCount += 1;
+#endif
}
} // z=DECODE1 to DECODEN
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ // query IB for latest sourceProgram (needed if we started decoding due to a force mode)
+ if (tempVar8)
+ {
+ XDAS_Int8 sourceProgram;
+ if (errno = SIO_ctrl(pAstCfg->xInp[zMI].hRxSio, PAF_SIO_CONTROL_GET_SOURCEPROGRAM,
+ (Arg)&sourceProgram))
+ {
+ TRACE_TERSE1("return error ASPERR_AUTO_PROGRAM. errno 0x%x.", errno);
+ return ASPERR_AUTO_PROGRAM;
+ }
+ statusOp_write(&(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ &(sourceProgram),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ }
+
+ // since now decoding update decode status for all enabled decoders
+ for (z=DECODE1; z < DECODEN; z++)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (tempVar8)
+ {
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceProgram),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.sourceSelect),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (tempVar8 == PAF_SOURCE_SNG)
+ {
+ tempVar8 = PAF_SOURCE_SNG;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ }
+ }
+ }
+#else
// query IB for latest sourceProgram (needed if we started decoding due to a force mode)
if (pAstCfg->xDec[zMD].decodeStatus.mode)
{
}
}
}
+#endif
#if 0 // FL: ASDT (slave)
// TODO: move this to start of this function so that it doesn't affect IO timing
Int z; /* decode counter */
Int zI, zS;
Int zMD;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
(void)as; // clear compiler warning in case not used with tracing disabled
// Await slave inputs
- for (z=DECODE1; z < DECODEN; z++) {
+ for (z=DECODE1; z < DECODEN; z++)
+ {
zI = pP->inputsFromDecodes[z];
zS = pP->streamsFromDecodes[z];
(void)zS;
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (z == zMD
+ || ! pAstCfg->xInp[zI].hRxSio
+ || ! tempVar8)
+ continue;
+#else
if (z == zMD
|| ! pAstCfg->xInp[zI].hRxSio
|| ! pAstCfg->xDec[z].decodeStatus.mode)
continue;
+#endif
TRACE_VERBOSE2("PAF_AST_decodeCont: AS%d: awaiting frame %d -- data", as+zS, frame);
if (SIO_reclaim(pAstCfg->xInp[zI].hRxSio, (Ptr)&pAstCfg->xInp[zI].pInpBuf, NULL)
!= sizeof (pAstCfg->xInp[zI].inpBufConfig))
cbErrno = *(Int32 *)&pAspMsg->buf[argIdx];
if (cbErrno != 0)
{
+ gCbWrtAfErrCnt++;
TRACE_TERSE1("CB write error=%d", cbErrno);
- SW_BREAKPOINT; // temporary
+ //SW_BREAKPOINT; // temporary
}
}
else
{
frameLength = 1536;
}
+ else if (sourceSelect == PAF_SOURCE_THD)
+ {
+ frameLength = 1536; //QIN FIX ME
+ }
else
{
frameLength = 256;
Int zMD;
Int sourceSelect;
Int sourceProgram;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8, temp2Var8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
zMD = pAstCfg->masterDec;
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ sourceSelect = tempVar8;
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceProgram),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ sourceProgram = tempVar8;
+#else
sourceSelect = pAstCfg->xDec[zMD].decodeStatus.sourceSelect;
sourceProgram = pAstCfg->xDec[zMD].decodeStatus.sourceProgram;
+#endif
if ((sourceSelect == PAF_SOURCE_NONE) || (sourceSelect == PAF_SOURCE_PASS))
{
}
else
{
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceDecode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ statusOp_read(&temp2Var8,
+ &(pAstCfg->xDec[zMD].decodeStatus.sourceSelect),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (temp2Var8 != tempVar8)
+ {
+ return 1;
+ }
+#else
if (pAstCfg->xDec[zMD].decodeStatus.sourceSelect != pAstCfg->xDec[zMD].decodeStatus.sourceDecode)
{
return 1;
}
+#endif
}
}
Int argIdx;
Int errno; /* error number */
Int status;
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
DEC_Handle dec = (DEC_Handle )decAlg[z];
#endif /* PAF_ASP_FINAL */
Int zI = pP->inputsFromDecodes[z];
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (pAstCfg->xInp[zI].hRxSio && tempVar8)
+ {
+#else
if (pAstCfg->xInp[zI].hRxSio && pAstCfg->xDec[z].decodeStatus.mode)
{
+#endif
TRACE_VERBOSE1("PAF_ASIT_decodeComplete: AS%d: finalizing decode", as+z);
#ifdef PAF_ASP_FINAL
if (dec->fxns->final)
{
PAF_AST_Config *pAstCfg;
Int z; /* decode counter */
+#ifdef NON_CACHE_STATUS
+ Int8 tempVar8;
+#endif
pAstCfg = pC->pAstCfg; // get pointer to common (shared) configuration
for (z=DECODE1; z < DECODEN; z++)
{
+#ifdef NON_CACHE_STATUS
+ statusOp_read(&tempVar8,
+ &(pAstCfg->xDec[z].decodeStatus.mode),
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ if (tempVar8)
+ {
+ tempVar8 = x;
+ statusOp_write(&(pAstCfg->xDec[z].decodeStatus.sourceDecode),
+ &tempVar8,
+ sizeof(Int8),
+ GATEMP_INDEX_DEC);
+ }
+#else
if (pAstCfg->xDec[z].decodeStatus.mode)
{
pAstCfg->xDec[z].decodeStatus.sourceDecode = x;
}
+#endif
}
return 0;