diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-11-22 20:09:25 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-11-22 20:09:25 -0800 |
commit | 64bdbe1a74fcf6343e06caa0dc4f6dae0e621e76 (patch) | |
tree | 2550880c19afe04036b1269e645a6c546ccaedaf /src/base/abci/abc.c | |
parent | b483c97fdd6e1fe6d52158d1b0231678073ace5e (diff) | |
download | abc-64bdbe1a74fcf6343e06caa0dc4f6dae0e621e76.tar.gz abc-64bdbe1a74fcf6343e06caa0dc4f6dae0e621e76.tar.bz2 abc-64bdbe1a74fcf6343e06caa0dc4f6dae0e621e76.zip |
Adding switch '-c' to generate only stuck-at faults in 'faultclasses -g'.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r-- | src/base/abci/abc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 3efc41c9..4dcea33a 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -7241,18 +7241,21 @@ usage: int Abc_CommandFaultClasses( Abc_Frame_t * pAbc, int argc, char ** argv ) { extern void Abc_NtkDetectClassesTest( Abc_Ntk_t * pNtk, int fSeq, int fVerbose, int fVeryVerbose ); - extern void Abc_NtkGenFaultList( Abc_Ntk_t * pNtk, char * pFileName ); + extern void Abc_NtkGenFaultList( Abc_Ntk_t * pNtk, char * pFileName, int fStuckAt ); Abc_Ntk_t * pNtk; - int c, fGen = 0, fSeq = 0, fVerbose = 0, fVeryVerbose = 0; + int c, fGen = 0, fStuckAt = 0, fSeq = 0, fVerbose = 0, fVeryVerbose = 0; pNtk = Abc_FrameReadNtk(pAbc); Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "gsvwh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "gcsvwh" ) ) != EOF ) { switch ( c ) { case 'g': fGen ^= 1; break; + case 'c': + fStuckAt ^= 1; + break; case 's': fSeq ^= 1; break; @@ -7281,18 +7284,19 @@ int Abc_CommandFaultClasses( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fGen ) { char * pFileName = Extra_FileNameGenericAppend(Abc_NtkSpec(pNtk), "_faults.txt"); - Abc_NtkGenFaultList( pNtk, pFileName ); + Abc_NtkGenFaultList( pNtk, pFileName, fStuckAt ); } else Abc_NtkDetectClassesTest( pNtk, fSeq, fVerbose, fVeryVerbose ); return 0; usage: - Abc_Print( -2, "usage: faultclasses [-gsvwh]\n" ); + Abc_Print( -2, "usage: faultclasses [-gcsvwh]\n" ); Abc_Print( -2, "\t computes equivalence classes of faults in the given mapped netlist;\n" ); Abc_Print( -2, "\t the fault list with faults in the format: <fault_id> <node_name> <fault_name>\n" ); Abc_Print( -2, "\t should be read by command \"read_fins\" before calling this command\n" ); Abc_Print( -2, "\t-g : toggle generating a fault list for the current mapped network [default = %s]\n", fGen? "yes": "no" ); + Abc_Print( -2, "\t-c : toggle using only stuck-at faults in the generated fault list [default = %s]\n", fStuckAt? "yes": "no" ); Abc_Print( -2, "\t-s : toggle detecting sequential equivalence classes [default = %s]\n", fSeq? "yes": "no" ); Abc_Print( -2, "\t-v : toggle verbose printout during computation [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-w : toggle printing of resulting fault equivalence classes [default = %s]\n", fVeryVerbose? "yes": "no" ); |