mirror of https://github.com/YosysHQ/abc.git
Adding new command line options for &verify and &synch2.
This commit is contained in:
parent
4712edc097
commit
1676df19e7
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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" );
|
||||
|
|
|
|||
Loading…
Reference in New Issue