improved overall diagnostics, and specifically TMU-FBI BUS.
This commit is contained in:
@@ -46,7 +46,6 @@ extern const def_sFaultSourceLineMap ar_sFaultSourceLineMap[];
|
||||
|
||||
void DisplayPattern(const def_sTestPattern * const pREF)
|
||||
{
|
||||
printf("==========================\n");
|
||||
printf("RGB: %04X %04X %04X %04X\n",
|
||||
pREF->data.access.u16Pix[0][0],
|
||||
pREF->data.access.u16Pix[0][1],
|
||||
@@ -111,6 +110,7 @@ double ComputePatternDistance( const def_sTestPattern * const pA,
|
||||
dDistance += dComputeDistance32(pA->data.raw[i+3],pB->data.raw[i+3]);
|
||||
}
|
||||
dDistance /= 12*4*32;
|
||||
logT("dDistance: %f\n",dDistance);
|
||||
return dDistance;
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ void GetNearestIndexes( const def_sTestPattern * const pREF,
|
||||
{
|
||||
ScoreSet[i].pREF = &pSet[i];
|
||||
ScoreSet[i].dScore = (1 - ScaleScore(ComputePatternDistance(pREF,pSet+i),100));
|
||||
logT("ScoreSet[%d].dScore = %f\n",i,ScoreSet[i].dScore);
|
||||
}
|
||||
|
||||
qsort(ScoreSet,uNbPattern,sizeof(def_sScoreSet),scoreSetCmp);
|
||||
@@ -176,52 +177,57 @@ unsigned char DistributeFaults( const def_sTestPattern * const pREF,
|
||||
|
||||
GetNearestIndexes(pREF,pREFPatterns,ScoreSet,uNbREFPatterns);
|
||||
|
||||
for( int i =0; i<uNbREFPatterns;i++)
|
||||
for( int i = 0 ; i < uNbREFPatterns ; i++)
|
||||
{
|
||||
if( ScoreSet[i].pREF->bReferenceSet && ScoreSet[i].dScore==100)
|
||||
{
|
||||
//logD("No Fault found\n");
|
||||
free(ScoreSet);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
logD("==========================\n");
|
||||
logD("Read:\n");
|
||||
if( sOptions.eLogLevel >= E_LOGLEVEL__DEBUG)
|
||||
{
|
||||
DisplayPattern(pREF);
|
||||
for( int i = 0 ; i < uNbREFPatterns ; i++)
|
||||
{
|
||||
logD("==========================\n");
|
||||
for( int i =0; i<uNbREFPatterns;i++)
|
||||
if((!ScoreSet[i].pREF->bReferenceSet) && (ScoreSet[i].dScore>=80))
|
||||
{
|
||||
if((!ScoreSet[i].pREF->bReferenceSet) && (ScoreSet[i].dScore>=80))
|
||||
logD( "%d Score = %f\n",
|
||||
ScoreSet[i].pREF->u8FaultLineIdx,ScoreSet[i].dScore);
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU0_RES,
|
||||
ScoreSet[i].dScore);
|
||||
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_FBI,
|
||||
ScoreSet[i].dScore);
|
||||
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU0_FBI,
|
||||
ScoreSet[i].dScore);
|
||||
if(ucNumTMU==1)
|
||||
{
|
||||
logD( "%d Score = %f\n",
|
||||
ScoreSet[i].pREF->u8FaultLineIdx,ScoreSet[i].dScore);
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU0_RES,
|
||||
.eTMUFaultSource_TMU0_TMU1,
|
||||
ScoreSet[i].dScore);
|
||||
/*FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_FBI,
|
||||
ScoreSet[i].dScore);*/
|
||||
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU0_FBI,
|
||||
.eTMUFaultSource_TMU1,
|
||||
ScoreSet[i].dScore);
|
||||
if(ucNumTMU==1)
|
||||
{
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU0_TMU1,
|
||||
ScoreSet[i].dScore);
|
||||
FaultSource_addScore( pFaultSrcCtx,
|
||||
ar_sFaultSourceLineMap
|
||||
[ScoreSet[i].pREF->u8FaultLineIdx]
|
||||
.eTMUFaultSource_TMU1,
|
||||
ScoreSet[i].dScore);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,7 +306,7 @@ void TestStep_NoMem(FxU32 * const sst,
|
||||
SST_RGB565 | SST_TC_REPLACE | SST_TCA_REPLACE);
|
||||
}
|
||||
|
||||
#define N_LOOP_TEST 20
|
||||
#define N_LOOP_TEST 100
|
||||
unsigned long long
|
||||
test_TMU_datalines_NoMem( sst1DeviceInfoStruct * const devInfo,
|
||||
FxU32 * const sst,
|
||||
@@ -355,27 +361,27 @@ test_TMU_datalines_NoMem( sst1DeviceInfoStruct * const devInfo,
|
||||
/* RGB: 0, A: 0*/
|
||||
/***************/
|
||||
/* Not implemented because the "all on" test should be enough for now
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 0 ,0, 1,
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 0 ,0, 0,
|
||||
&ar_ResultPattern[i][0]);*/
|
||||
|
||||
/***************/
|
||||
/* RGB: 1, A: 0*/
|
||||
/***************/
|
||||
/* Not implemented because the "all on" test should be enough for now
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 1, 0, 1,
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 1, 0, 0,
|
||||
&ar_ResultPattern[i][1]);*/
|
||||
|
||||
/***************/
|
||||
/* RGB: 1, A: 1*/
|
||||
/***************/
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 1, 1 , 1,
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 1, 1 , 0,
|
||||
&ar_ResultPattern[i][2]);
|
||||
|
||||
/***************/
|
||||
/* RGB: 0, A: 1*/
|
||||
/***************/
|
||||
/* Not implemented because the "all on" test should be enough for now
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 0, 1 , 1,
|
||||
TestStep_NoMem( sst, sstregs, ucNumTMU, 0, 1 , 0,
|
||||
&ar_ResultPattern[i][3]);*/
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user