summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-03-23 10:47:08 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-03-23 10:47:08 -0700
commitb13e65882de94db9f28b9819d9e3a184ee507f07 (patch)
tree529cca750b1ca2a15b5e54acd334db3ef49afc0e /src/base
parent1aa6751ac4b799c706ae1e93e4ce40e657c1add9 (diff)
downloadabc-b13e65882de94db9f28b9819d9e3a184ee507f07.tar.gz
abc-b13e65882de94db9f28b9819d9e3a184ee507f07.tar.bz2
abc-b13e65882de94db9f28b9819d9e3a184ee507f07.zip
Experiments with stuck-at fault testing.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abc.c50
1 files changed, 31 insertions, 19 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 7b45de68..c01757b1 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -399,7 +399,7 @@ static int Abc_CommandAbc9MultiProve ( Abc_Frame_t * pAbc, int argc, cha
static int Abc_CommandAbc9Bmc ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9ICheck ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9SatTest ( Abc_Frame_t * pAbc, int argc, char ** argv );
-static int Abc_CommandAbc9FunFaTest ( Abc_Frame_t * pAbc, int argc, char ** argv );
+static int Abc_CommandAbc9FFTest ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Inse ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Maxi ( Abc_Frame_t * pAbc, int argc, char ** argv );
static int Abc_CommandAbc9Bmci ( Abc_Frame_t * pAbc, int argc, char ** argv );
@@ -966,10 +966,10 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd( pAbc, "ABC9", "&bmc", Abc_CommandAbc9Bmc, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&icheck", Abc_CommandAbc9ICheck, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&sattest", Abc_CommandAbc9SatTest, 0 );
- Cmd_CommandAdd( pAbc, "ABC9", "&funfatest", Abc_CommandAbc9FunFaTest, 0 );
+ Cmd_CommandAdd( pAbc, "ABC9", "&fftest", Abc_CommandAbc9FFTest, 0 );
Cmd_CommandAdd( pAbc, "ABC9", "&inse", Abc_CommandAbc9Inse, 0 );
- Cmd_CommandAdd( pAbc, "ABC9", "&maxi", Abc_CommandAbc9Maxi, 0 );
- Cmd_CommandAdd( pAbc, "ABC9", "&bmci", Abc_CommandAbc9Bmci, 0 );
+ Cmd_CommandAdd( pAbc, "ABC9", "&maxi", Abc_CommandAbc9Maxi, 0 );
+ Cmd_CommandAdd( pAbc, "ABC9", "&bmci", Abc_CommandAbc9Bmci, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 );
// Cmd_CommandAdd( pAbc, "ABC9", "&cexmerge", Abc_CommandAbc9CexMerge, 0 );
@@ -32855,15 +32855,26 @@ usage:
SeeAlso []
***********************************************************************/
-int Abc_CommandAbc9FunFaTest( Abc_Frame_t * pAbc, int argc, char ** argv )
+int Abc_CommandAbc9FFTest( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- extern void Gia_ManFaultTest( Gia_Man_t * p, int fStuckAt, int fComplVars, int nTimeOut, int fDump, int fVerbose );
- int c, fStuckAt = 0, fComplVars = 0, nTimeOut = 0, fDump = 0, fVerbose = 0;
+ extern void Gia_ManFaultTest( Gia_Man_t * p, int Algo, int fComplVars, int nTimeOut, int fDump, int fVerbose );
+ int c, Algo = 0, fComplVars = 0, nTimeOut = 0, fDump = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "Tscdvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "ATcdvh" ) ) != EOF )
{
switch ( c )
{
+ case 'A':
+ if ( globalUtilOptind >= argc )
+ {
+ Abc_Print( -1, "Command line switch \"-A\" should be followed by an integer.\n" );
+ goto usage;
+ }
+ Algo = atoi(argv[globalUtilOptind]);
+ globalUtilOptind++;
+ if ( Algo < 1 || Algo > 3 )
+ goto usage;
+ break;
case 'T':
if ( globalUtilOptind >= argc )
{
@@ -32875,9 +32886,6 @@ int Abc_CommandAbc9FunFaTest( Abc_Frame_t * pAbc, int argc, char ** argv )
if ( nTimeOut < 0 )
goto usage;
break;
- case 's':
- fStuckAt ^= 1;
- break;
case 'c':
fComplVars ^= 1;
break;
@@ -32895,23 +32903,27 @@ int Abc_CommandAbc9FunFaTest( Abc_Frame_t * pAbc, int argc, char ** argv )
}
if ( pAbc->pGia == NULL )
{
- Abc_Print( -1, "Abc_CommandAbc9FunFaTest(): There is no AIG.\n" );
+ Abc_Print( -1, "Abc_CommandAbc9FFTest(): There is no AIG.\n" );
return 0;
}
- if ( Gia_ManRegNum(pAbc->pGia) == 0 )
+ if ( Gia_ManRegNum(pAbc->pGia) == 0 && Algo == 1 )
{
- Abc_Print( -1, "Abc_CommandAbc9FunFaTest(): AIG is combinational.\n" );
+ Abc_Print( -1, "Abc_CommandAbc9FFTest(): For delay testing, AIG should be sequential.\n" );
return 0;
}
- Gia_ManFaultTest( pAbc->pGia, fStuckAt, fComplVars, nTimeOut, fDump, fVerbose );
+ Gia_ManFaultTest( pAbc->pGia, Algo, fComplVars, nTimeOut, fDump, fVerbose );
return 0;
usage:
- Abc_Print( -2, "usage: &funfatest [-T num] [-scdvh]\n" );
+ Abc_Print( -2, "usage: &fftest [-AT num] [-cdvh]\n" );
Abc_Print( -2, "\t performs functional fault test generation\n" );
- Abc_Print( -2, "\t-T num : approximate global runtime limit in seconds [default = %d]\n", nTimeOut );
- Abc_Print( -2, "\t-s : toggles generating tests for stuck-at faults [default = %s]\n", fStuckAt? "yes": "no" );
- Abc_Print( -2, "\t-c : toggles complementing control variables [default = %s]\n", fComplVars? "yes": "no" );
+ Abc_Print( -2, "\t-A num : selects test generation algorithm [default = %d]\n", Algo );
+ Abc_Print( -2, "\t 0: algorithm is not selected\n" );
+ Abc_Print( -2, "\t 1: delay fault testing for sequential circuits\n" );
+ Abc_Print( -2, "\t 2: traditional stuck-at testing\n" );
+ Abc_Print( -2, "\t 3: complement fault testing\n" );
+ Abc_Print( -2, "\t-T num : specifies approximate runtime limit in seconds [default = %d]\n", nTimeOut );
+ Abc_Print( -2, "\t-c : toggles complementing control variables [default = %s]\n", fComplVars? "active-high": "active-low" );
Abc_Print( -2, "\t-d : toggles dumping test patterns into file \"tests.txt\" [default = %s]\n", fDump? "yes": "no" );
Abc_Print( -2, "\t-v : toggles printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");