summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/aig/gia/gia.h2
-rw-r--r--src/aig/gia/giaTim.c14
-rw-r--r--src/base/abci/abc.c20
3 files changed, 28 insertions, 8 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index b5f073b3..a72b2936 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -1533,7 +1533,7 @@ extern void * Gia_ManUpdateTimMan2( Gia_Man_t * p, Vec_Int_t * vBox
extern Gia_Man_t * Gia_ManUpdateExtraAig( void * pTime, Gia_Man_t * pAig, Vec_Int_t * vBoxPres );
extern Gia_Man_t * Gia_ManUpdateExtraAig2( void * pTime, Gia_Man_t * pAig, Vec_Int_t * vBoxesLeft );
extern Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * vBoxPres, int fSeq );
-extern int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char * pFileSpec );
+extern int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fDumpFiles, int fVerbose, char * pFileSpec );
/*=== giaTruth.c ===========================================================*/
extern word Gia_LutComputeTruth6( Gia_Man_t * p, int iObj, Vec_Wrd_t * vTruths );
extern word Gia_ObjComputeTruthTable6Lut( Gia_Man_t * p, int iObj, Vec_Wrd_t * vTemp );
diff --git a/src/aig/gia/giaTim.c b/src/aig/gia/giaTim.c
index 29aa93f8..22212793 100644
--- a/src/aig/gia/giaTim.c
+++ b/src/aig/gia/giaTim.c
@@ -21,6 +21,7 @@
#include "gia.h"
#include "giaAig.h"
#include "misc/tim/tim.h"
+#include "misc/extra/extra.h"
#include "proof/cec/cec.h"
#include "proof/fra/fra.h"
@@ -892,7 +893,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
SeeAlso []
***********************************************************************/
-int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char * pFileSpec )
+int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fDumpFiles, int fVerbose, char * pFileSpec )
{
int Status = -1;
Gia_Man_t * pSpec, * pGia0, * pGia1, * pMiter;
@@ -955,6 +956,17 @@ int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fS
pGia1 = Gia_ManDup( pGia );
Vec_IntFreeP( &vBoxPres );
}
+ if ( fDumpFiles )
+ {
+ char pFileName0[1000], pFileName1[1000];
+ char * pNameGeneric = Extra_FileNameGeneric( pFileSpec ? pFileSpec : pGia->pSpec );
+ sprintf( pFileName0, "%s_spec.aig", pNameGeneric );
+ sprintf( pFileName1, "%s_impl.aig", pNameGeneric );
+ Gia_AigerWrite( pGia0, pFileName0, 0, 0 );
+ Gia_AigerWrite( pGia1, pFileName1, 0, 0 );
+ ABC_FREE( pNameGeneric );
+ printf( "Dumped two parts of the miter into files \"%s\" and \"%s\".\n", pFileName0, pFileName1 );
+ }
// compute the miter
if ( fSeq )
{
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 8dbf1332..a3c21c72 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -31846,7 +31846,7 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
Dch_ManSetDefaultParams( pPars );
pPars->nBTLimit = 100;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "WCSKRfvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "WCSKRfrvh" ) ) != EOF )
{
switch ( c )
{
@@ -31908,6 +31908,9 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'f':
pPars->fLightSynth ^= 1;
break;
+ case 'r':
+ pPars->fSkipRedSupp ^= 1;
+ break;
case 'v':
pPars->fVerbose ^= 1;
break;
@@ -31927,7 +31930,7 @@ int Abc_CommandAbc9Synch2( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
usage:
- Abc_Print( -2, "usage: &synch2 [-WCSKR num] [-fvh]\n" );
+ Abc_Print( -2, "usage: &synch2 [-WCSKR num] [-frvh]\n" );
Abc_Print( -2, "\t computes structural choices using a new approach\n" );
Abc_Print( -2, "\t-W num : the max number of simulation words [default = %d]\n", pPars->nWords );
Abc_Print( -2, "\t-C num : the max number of conflicts at a node [default = %d]\n", pPars->nBTLimit );
@@ -31935,6 +31938,7 @@ usage:
Abc_Print( -2, "\t-K num : the target LUT size for downstream mapping [default = %d]\n", nLutSize );
Abc_Print( -2, "\t-R num : the delay relaxation ratio (num >= 0) [default = %d]\n", nRelaxRatio );
Abc_Print( -2, "\t-f : toggle using lighter logic synthesis [default = %s]\n", pPars->fLightSynth? "yes": "no" );
+ Abc_Print( -2, "\t-r : toggle skipping choices with redundant support [default = %s]\n", pPars->fSkipRedSupp? "yes": "no" );
Abc_Print( -2, "\t-v : toggle verbose printout [default = %s]\n", pPars->fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
@@ -33891,9 +33895,9 @@ usage:
int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
{
char * pFileSpec = NULL;
- int c, nBTLimit = 1000, nTimeLim = 0, fSeq = 0, fVerbose = 0;
+ int c, nBTLimit = 1000, nTimeLim = 0, fSeq = 0, fDumpFiles = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "CTsvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "CTsdvh" ) ) != EOF )
{
switch ( c )
{
@@ -33922,6 +33926,9 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
case 's':
fSeq ^= 1;
break;
+ case 'd':
+ fDumpFiles ^= 1;
+ break;
case 'v':
fVerbose ^= 1;
break;
@@ -33937,15 +33944,16 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
Extra_FileNameCorrectPath( pFileSpec );
printf( "Taking spec from file \"%s\".\n", pFileSpec );
}
- Gia_ManVerifyWithBoxes( pAbc->pGia, nBTLimit, nTimeLim, fSeq, fVerbose, pFileSpec );
+ Gia_ManVerifyWithBoxes( pAbc->pGia, nBTLimit, nTimeLim, fSeq, fDumpFiles, fVerbose, pFileSpec );
return 0;
usage:
- Abc_Print( -2, "usage: &verify [-CT num] [-svh] <file>\n" );
+ Abc_Print( -2, "usage: &verify [-CT num] [-sdvh] <file>\n" );
Abc_Print( -2, "\t performs verification of combinational design\n" );
Abc_Print( -2, "\t-C num : the max number of conflicts at a node [default = %d]\n", nBTLimit );
Abc_Print( -2, "\t-T num : approximate runtime limit in seconds [default = %d]\n", nTimeLim );
Abc_Print( -2, "\t-s : toggle using sequential verification [default = %s]\n", fSeq? "yes":"no");
+ Abc_Print( -2, "\t-d : toggle dumping AIGs to be compared [default = %s]\n", fDumpFiles? "yes":"no");
Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes":"no");
Abc_Print( -2, "\t-h : print the command usage\n");
Abc_Print( -2, "\t<file> : optional file name with the spec [default = not used]\n" );