Commit 3368b2dd by Alan Mishchenko

Improvements to handling boxes and flops.

parent df83fb5e
...@@ -1317,7 +1317,8 @@ extern Gia_Man_t * Gia_ManSpeedup( Gia_Man_t * p, int Percentage, int De ...@@ -1317,7 +1317,8 @@ extern Gia_Man_t * Gia_ManSpeedup( Gia_Man_t * p, int Percentage, int De
extern void Gia_ManStgPrint( FILE * pFile, Vec_Int_t * vLines, int nIns, int nOuts, int nStates ); extern void Gia_ManStgPrint( FILE * pFile, Vec_Int_t * vLines, int nIns, int nOuts, int nStates );
extern Gia_Man_t * Gia_ManStgRead( char * pFileName, int kHot, int fVerbose ); extern Gia_Man_t * Gia_ManStgRead( char * pFileName, int kHot, int fVerbose );
/*=== giaSweep.c ============================================================*/ /*=== giaSweep.c ============================================================*/
extern Gia_Man_t * Gia_ManFraigSweep( Gia_Man_t * p, void * pPars ); extern Gia_Man_t * Gia_ManFraigSweepSimple( Gia_Man_t * p, void * pPars );
extern Gia_Man_t * Gia_ManSweepWithBoxes( Gia_Man_t * p, void * pParsC, void * pParsS, int fConst, int fEquiv, int fVerbose );
/*=== giaSweeper.c ============================================================*/ /*=== giaSweeper.c ============================================================*/
extern Gia_Man_t * Gia_SweeperStart( Gia_Man_t * p ); extern Gia_Man_t * Gia_SweeperStart( Gia_Man_t * p );
extern void Gia_SweeperStop( Gia_Man_t * p ); extern void Gia_SweeperStop( Gia_Man_t * p );
...@@ -1349,6 +1350,7 @@ extern Vec_Int_t * Gia_ManComputeSwitchProbs( Gia_Man_t * pGia, int nFra ...@@ -1349,6 +1350,7 @@ extern Vec_Int_t * Gia_ManComputeSwitchProbs( Gia_Man_t * pGia, int nFra
extern Vec_Flt_t * Gia_ManPrintOutputProb( Gia_Man_t * p ); extern Vec_Flt_t * Gia_ManPrintOutputProb( Gia_Man_t * p );
/*=== giaTim.c ===========================================================*/ /*=== giaTim.c ===========================================================*/
extern int Gia_ManBoxNum( Gia_Man_t * p ); extern int Gia_ManBoxNum( Gia_Man_t * p );
extern int Gia_ManRegBoxNum( Gia_Man_t * p );
extern int Gia_ManIsSeqWithBoxes( Gia_Man_t * p ); extern int Gia_ManIsSeqWithBoxes( Gia_Man_t * p );
extern int Gia_ManIsNormalized( Gia_Man_t * p ); extern int Gia_ManIsNormalized( Gia_Man_t * p );
extern Gia_Man_t * Gia_ManDupNormalize( Gia_Man_t * p ); extern Gia_Man_t * Gia_ManDupNormalize( Gia_Man_t * p );
...@@ -1360,8 +1362,8 @@ extern void * Gia_ManUpdateTimMan( Gia_Man_t * p, Vec_Int_t * vBoxP ...@@ -1360,8 +1362,8 @@ extern void * Gia_ManUpdateTimMan( Gia_Man_t * p, Vec_Int_t * vBoxP
extern void * Gia_ManUpdateTimMan2( Gia_Man_t * p, Vec_Int_t * vBoxesLeft ); extern void * Gia_ManUpdateTimMan2( Gia_Man_t * p, Vec_Int_t * vBoxesLeft );
extern Gia_Man_t * Gia_ManUpdateExtraAig( void * pTime, Gia_Man_t * pAig, Vec_Int_t * vBoxPres ); 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_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 ); 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, void * pParsInit, char * pFileSpec ); extern int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char * pFileSpec );
/*=== giaTruth.c ===========================================================*/ /*=== giaTruth.c ===========================================================*/
extern word Gia_ObjComputeTruthTable6Lut( Gia_Man_t * p, int iObj, Vec_Wrd_t * vTemp ); extern word Gia_ObjComputeTruthTable6Lut( Gia_Man_t * p, int iObj, Vec_Wrd_t * vTemp );
extern word Gia_ObjComputeTruthTable6( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp, Vec_Wrd_t * vTruths ); extern word Gia_ObjComputeTruthTable6( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vSupp, Vec_Wrd_t * vTruths );
......
...@@ -1885,9 +1885,10 @@ void Gia_ManTransferTiming( Gia_Man_t * p, Gia_Man_t * pGia ) ...@@ -1885,9 +1885,10 @@ void Gia_ManTransferTiming( Gia_Man_t * p, Gia_Man_t * pGia )
{ {
if ( pGia->pManTime == NULL || p == pGia ) if ( pGia->pManTime == NULL || p == pGia )
return; return;
p->pManTime = pGia->pManTime; pGia->pManTime = NULL; p->pManTime = pGia->pManTime; pGia->pManTime = NULL;
p->pAigExtra = pGia->pAigExtra; pGia->pAigExtra = NULL; p->pAigExtra = pGia->pAigExtra; pGia->pAigExtra = NULL;
p->nAnd2Delay = pGia->nAnd2Delay; pGia->nAnd2Delay = 0; p->vRegClasses = pGia->vRegClasses; pGia->vRegClasses = NULL;
p->nAnd2Delay = pGia->nAnd2Delay; pGia->nAnd2Delay = 0;
} }
/**Function************************************************************* /**Function*************************************************************
......
...@@ -19,8 +19,10 @@ ...@@ -19,8 +19,10 @@
***********************************************************************/ ***********************************************************************/
#include "gia.h" #include "gia.h"
#include "giaAig.h"
#include "misc/tim/tim.h" #include "misc/tim/tim.h"
#include "proof/cec/cec.h" #include "proof/cec/cec.h"
#include "proof/fra/fra.h"
ABC_NAMESPACE_IMPL_START ABC_NAMESPACE_IMPL_START
...@@ -48,6 +50,10 @@ int Gia_ManBoxNum( Gia_Man_t * p ) ...@@ -48,6 +50,10 @@ int Gia_ManBoxNum( Gia_Man_t * p )
{ {
return p->pManTime ? Tim_ManBoxNum((Tim_Man_t *)p->pManTime) : 0; return p->pManTime ? Tim_ManBoxNum((Tim_Man_t *)p->pManTime) : 0;
} }
int Gia_ManRegBoxNum( Gia_Man_t * p )
{
return p->vRegClasses ? Vec_IntSize(p->vRegClasses) : 0;
}
/**Function************************************************************* /**Function*************************************************************
...@@ -701,13 +707,14 @@ void Gia_ManDupCollapse_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Man_t * pNew ) ...@@ -701,13 +707,14 @@ void Gia_ManDupCollapse_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Gia_Man_t * pNew )
if ( Gia_ObjSibl(p, Gia_ObjId(p, pObj)) ) if ( Gia_ObjSibl(p, Gia_ObjId(p, pObj)) )
pNew->pSibls[Abc_Lit2Var(pObj->Value)] = Abc_Lit2Var(Gia_ObjSiblObj(p, Gia_ObjId(p, pObj))->Value); pNew->pSibls[Abc_Lit2Var(pObj->Value)] = Abc_Lit2Var(Gia_ObjSiblObj(p, Gia_ObjId(p, pObj))->Value);
} }
Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * vBoxPres ) Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * vBoxPres, int fSeq )
{ {
// this procedure assumes that sequential AIG with boxes is unshuffled to have valid boxes // this procedure assumes that sequential AIG with boxes is unshuffled to have valid boxes
Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime; Tim_Man_t * pManTime = (Tim_Man_t *)p->pManTime;
Gia_Man_t * pNew, * pTemp; Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj, * pObjBox; Gia_Obj_t * pObj, * pObjBox;
int i, k, curCi, curCo; int i, k, curCi, curCo;
assert( !fSeq || p->vRegClasses );
//assert( Gia_ManRegNum(p) == 0 ); //assert( Gia_ManRegNum(p) == 0 );
assert( Gia_ManCiNum(p) == Tim_ManPiNum(pManTime) + Gia_ManCoNum(pBoxes) ); assert( Gia_ManCiNum(p) == Tim_ManPiNum(pManTime) + Gia_ManCoNum(pBoxes) );
pNew = Gia_ManStart( Gia_ManObjNum(p) ); pNew = Gia_ManStart( Gia_ManObjNum(p) );
...@@ -790,7 +797,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v ...@@ -790,7 +797,7 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
// verify counts // verify counts
assert( curCi == Gia_ManCiNum(p) ); assert( curCi == Gia_ManCiNum(p) );
assert( curCo == Gia_ManCoNum(p) ); assert( curCo == Gia_ManCoNum(p) );
Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) ); Gia_ManSetRegNum( pNew, (fSeq && p->vRegClasses) ? Vec_IntSize(p->vRegClasses) : Gia_ManRegNum(p) );
Gia_ManHashStop( pNew ); Gia_ManHashStop( pNew );
pNew = Gia_ManCleanup( pTemp = pNew ); pNew = Gia_ManCleanup( pTemp = pNew );
Gia_ManCleanupRemap( p, pTemp ); Gia_ManCleanupRemap( p, pTemp );
...@@ -811,9 +818,8 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v ...@@ -811,9 +818,8 @@ Gia_Man_t * Gia_ManDupCollapse( Gia_Man_t * p, Gia_Man_t * pBoxes, Vec_Int_t * v
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, void * pParsInit, char * pFileSpec ) int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, int nBTLimit, int nTimeLim, int fSeq, int fVerbose, char * pFileSpec )
{ {
int fVerbose = 1;
int Status = -1; int Status = -1;
Gia_Man_t * pSpec, * pGia0, * pGia1, * pMiter; Gia_Man_t * pSpec, * pGia0, * pGia1, * pMiter;
Vec_Int_t * vBoxPres = NULL; Vec_Int_t * vBoxPres = NULL;
...@@ -866,28 +872,48 @@ int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, void * pParsInit, char * pFileSpec ...@@ -866,28 +872,48 @@ int Gia_ManVerifyWithBoxes( Gia_Man_t * pGia, void * pParsInit, char * pFileSpec
} }
// collapse two designs // collapse two designs
if ( Gia_ManBoxNum(pSpec) > 0 ) if ( Gia_ManBoxNum(pSpec) > 0 )
pGia0 = Gia_ManDupCollapse( pSpec, pSpec->pAigExtra, vBoxPres ); pGia0 = Gia_ManDupCollapse( pSpec, pSpec->pAigExtra, vBoxPres, fSeq );
else else
pGia0 = Gia_ManDup( pSpec ); pGia0 = Gia_ManDup( pSpec );
if ( Gia_ManBoxNum(pGia) > 0 ) if ( Gia_ManBoxNum(pGia) > 0 )
pGia1 = Gia_ManDupCollapse( pGia, pGia->pAigExtra, NULL ); pGia1 = Gia_ManDupCollapse( pGia, pGia->pAigExtra, NULL, fSeq );
else else
pGia1 = Gia_ManDup( pGia ); pGia1 = Gia_ManDup( pGia );
Vec_IntFreeP( &vBoxPres ); Vec_IntFreeP( &vBoxPres );
} }
// compute the miter // compute the miter
pMiter = Gia_ManMiter( pGia0, pGia1, 0, 1, 0, 0, fVerbose ); if ( fSeq )
if ( pMiter ) {
pMiter = Gia_ManMiter( pGia0, pGia1, 0, 0, 1, 0, fVerbose );
if ( pMiter )
{
Aig_Man_t * pMan;
Fra_Sec_t SecPar, * pSecPar = &SecPar;
Fra_SecSetDefaultParams( pSecPar );
pSecPar->nBTLimit = nBTLimit;
pSecPar->TimeLimit = nTimeLim;
pSecPar->fVerbose = fVerbose;
pMan = Gia_ManToAig( pMiter, 0 );
Gia_ManStop( pMiter );
Status = Fra_FraigSec( pMan, pSecPar, NULL );
Aig_ManStop( pMan );
}
}
else
{ {
Cec_ParCec_t ParsCec, * pPars = &ParsCec; pMiter = Gia_ManMiter( pGia0, pGia1, 0, 1, 0, 0, fVerbose );
Cec_ManCecSetDefaultParams( pPars ); if ( pMiter )
pPars->fVerbose = fVerbose; {
if ( pParsInit ) Cec_ParCec_t ParsCec, * pPars = &ParsCec;
memcpy( pPars, pParsInit, sizeof(Cec_ParCec_t) ); Cec_ManCecSetDefaultParams( pPars );
Status = Cec_ManVerify( pMiter, pPars ); pPars->nBTLimit = nBTLimit;
Gia_ManStop( pMiter ); pPars->TimeLimit = nTimeLim;
if ( pPars->iOutFail >= 0 ) pPars->fVerbose = fVerbose;
Abc_Print( 1, "Verification failed for at least one output (%d).\n", pPars->iOutFail ); Status = Cec_ManVerify( pMiter, pPars );
if ( pPars->iOutFail >= 0 )
Abc_Print( 1, "Verification failed for at least one output (%d).\n", pPars->iOutFail );
Gia_ManStop( pMiter );
}
} }
Gia_ManStop( pGia0 ); Gia_ManStop( pGia0 );
Gia_ManStop( pGia1 ); Gia_ManStop( pGia1 );
......
...@@ -20534,7 +20534,6 @@ int Abc_CommandDSec( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -20534,7 +20534,6 @@ int Abc_CommandDSec( Abc_Frame_t * pAbc, int argc, char ** argv )
int c; int c;
int fIgnoreNames; int fIgnoreNames;
extern void Fra_SecSetDefaultParams( Fra_Sec_t * p );
extern int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * p ); extern int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * p );
pNtk = Abc_FrameReadNtk(pAbc); pNtk = Abc_FrameReadNtk(pAbc);
...@@ -26544,12 +26543,12 @@ int Abc_CommandAbc9Strash( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -26544,12 +26543,12 @@ int Abc_CommandAbc9Strash( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
Gia_Man_t * pUnshuffled = Gia_ManDupUnshuffleInputs( pAbc->pGia ); Gia_Man_t * pUnshuffled = Gia_ManDupUnshuffleInputs( pAbc->pGia );
Gia_ManTransferTiming( pUnshuffled, pAbc->pGia ); Gia_ManTransferTiming( pUnshuffled, pAbc->pGia );
pTemp = Gia_ManDupCollapse( pUnshuffled, pUnshuffled->pAigExtra, NULL ); pTemp = Gia_ManDupCollapse( pUnshuffled, pUnshuffled->pAigExtra, NULL, 0 );
Gia_ManTransferTiming( pAbc->pGia, pUnshuffled ); Gia_ManTransferTiming( pAbc->pGia, pUnshuffled );
Gia_ManStop( pUnshuffled ); Gia_ManStop( pUnshuffled );
} }
else else
pTemp = Gia_ManDupCollapse( pAbc->pGia, pAbc->pGia->pAigExtra, NULL ); pTemp = Gia_ManDupCollapse( pAbc->pGia, pAbc->pGia->pAigExtra, NULL, 0 );
if ( !Abc_FrameReadFlag("silentmode") ) if ( !Abc_FrameReadFlag("silentmode") )
printf( "Collapsed AIG with boxes and logic of the boxes.\n" ); printf( "Collapsed AIG with boxes and logic of the boxes.\n" );
} }
...@@ -29424,6 +29423,22 @@ int Abc_CommandAbc9Scl( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29424,6 +29423,22 @@ int Abc_CommandAbc9Scl( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Scl(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Scl(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManBoxNum(pAbc->pGia) && Gia_ManRegBoxNum(pAbc->pGia) )
{
if ( pAbc->pGia->pAigExtra == NULL )
{
printf( "Timing manager is given but there is no GIA of boxes.\n" );
return 0;
}
pTemp = Gia_ManSweepWithBoxes( pAbc->pGia, NULL, NULL, fConst, fEquiv, fVerbose );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
}
if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{
Abc_Print( -1, "The network is combinational.\n" );
return 0;
}
pTemp = Gia_ManSeqStructSweep( pAbc->pGia, fConst, fEquiv, fVerbose ); pTemp = Gia_ManSeqStructSweep( pAbc->pGia, fConst, fEquiv, fVerbose );
Abc_FrameUpdateGia( pAbc, pTemp ); Abc_FrameUpdateGia( pAbc, pTemp );
return 0; return 0;
...@@ -29512,6 +29527,17 @@ int Abc_CommandAbc9Lcorr( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29512,6 +29527,17 @@ int Abc_CommandAbc9Lcorr( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Lcorr(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Lcorr(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManBoxNum(pAbc->pGia) && Gia_ManRegBoxNum(pAbc->pGia) )
{
if ( pAbc->pGia->pAigExtra == NULL )
{
printf( "Timing manager is given but there is no GIA of boxes.\n" );
return 0;
}
pTemp = Gia_ManSweepWithBoxes( pAbc->pGia, NULL, pPars, 0, 0, pPars->fVerbose );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
}
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -29619,6 +29645,17 @@ int Abc_CommandAbc9Scorr( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29619,6 +29645,17 @@ int Abc_CommandAbc9Scorr( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Scorr(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Scorr(): There is no AIG.\n" );
return 1; return 1;
} }
if ( Gia_ManBoxNum(pAbc->pGia) && Gia_ManRegBoxNum(pAbc->pGia) )
{
if ( pAbc->pGia->pAigExtra == NULL )
{
printf( "Timing manager is given but there is no GIA of boxes.\n" );
return 0;
}
pTemp = Gia_ManSweepWithBoxes( pAbc->pGia, NULL, pPars, 0, 0, pPars->fVerbose );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
}
if ( Gia_ManRegNum(pAbc->pGia) == 0 ) if ( Gia_ManRegNum(pAbc->pGia) == 0 )
{ {
Abc_Print( -1, "The network is combinational.\n" ); Abc_Print( -1, "The network is combinational.\n" );
...@@ -30735,11 +30772,9 @@ usage: ...@@ -30735,11 +30772,9 @@ usage:
int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
char * pFileSpec = NULL; char * pFileSpec = NULL;
Cec_ParCec_t ParsCec, * pPars = &ParsCec; int c, nBTLimit = 1000, nTimeLim = 0, fSeq = 0, fVerbose = 0;
int c;
Cec_ManCecSetDefaultParams( pPars );
Extra_UtilGetoptReset(); Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "CTvh" ) ) != EOF ) while ( ( c = Extra_UtilGetopt( argc, argv, "CTsvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
...@@ -30749,9 +30784,9 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -30749,9 +30784,9 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Command line switch \"-C\" should be followed by an integer.\n" ); Abc_Print( -1, "Command line switch \"-C\" should be followed by an integer.\n" );
goto usage; goto usage;
} }
pPars->nBTLimit = atoi(argv[globalUtilOptind]); nBTLimit = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->nBTLimit < 0 ) if ( nBTLimit < 0 )
goto usage; goto usage;
break; break;
case 'T': case 'T':
...@@ -30760,13 +30795,16 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -30760,13 +30795,16 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Command line switch \"-T\" should be followed by an integer.\n" ); Abc_Print( -1, "Command line switch \"-T\" should be followed by an integer.\n" );
goto usage; goto usage;
} }
pPars->TimeLimit = atoi(argv[globalUtilOptind]); nTimeLim = atoi(argv[globalUtilOptind]);
globalUtilOptind++; globalUtilOptind++;
if ( pPars->TimeLimit < 0 ) if ( nTimeLim < 0 )
goto usage; goto usage;
break; break;
case 's':
fSeq ^= 1;
break;
case 'v': case 'v':
pPars->fVerbose ^= 1; fVerbose ^= 1;
break; break;
case 'h': case 'h':
goto usage; goto usage;
...@@ -30780,15 +30818,16 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -30780,15 +30818,16 @@ int Abc_CommandAbc9Verify( Abc_Frame_t * pAbc, int argc, char ** argv )
Extra_FileNameCorrectPath( pFileSpec ); Extra_FileNameCorrectPath( pFileSpec );
printf( "Taking spec from file \"%s\".\n", pFileSpec ); printf( "Taking spec from file \"%s\".\n", pFileSpec );
} }
Gia_ManVerifyWithBoxes( pAbc->pGia, pPars, pFileSpec ); Gia_ManVerifyWithBoxes( pAbc->pGia, nBTLimit, nTimeLim, fSeq, fVerbose, pFileSpec );
return 0; return 0;
usage: usage:
Abc_Print( -2, "usage: &verify [-CT num] [-vh] <file>\n" ); Abc_Print( -2, "usage: &verify [-CT num] [-svh] <file>\n" );
Abc_Print( -2, "\t performs verification of combinational design\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", pPars->nBTLimit ); 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", pPars->TimeLimit ); Abc_Print( -2, "\t-T num : approximate runtime limit in seconds [default = %d]\n", nTimeLim );
Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", pPars->fVerbose? "yes":"no"); Abc_Print( -2, "\t-s : toggle using sequential verification [default = %s]\n", fSeq? "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-h : print the command usage\n");
Abc_Print( -2, "\t<file> : optional file name with the spec [default = not used\n" ); Abc_Print( -2, "\t<file> : optional file name with the spec [default = not used\n" );
return 1; return 1;
...@@ -30876,7 +30915,15 @@ int Abc_CommandAbc9Sweep( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -30876,7 +30915,15 @@ int Abc_CommandAbc9Sweep( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Sweep(): There is no AIG.\n" ); Abc_Print( -1, "Abc_CommandAbc9Sweep(): There is no AIG.\n" );
return 1; return 1;
} }
pTemp = Gia_ManFraigSweep( pAbc->pGia, pPars ); if ( Gia_ManBoxNum(pAbc->pGia) && pAbc->pGia->pAigExtra == NULL )
{
printf( "Timing manager is given but there is no GIA of boxes.\n" );
return 0;
}
if ( Gia_ManBoxNum(pAbc->pGia) )
pTemp = Gia_ManSweepWithBoxes( pAbc->pGia, pPars, NULL, 0, 0, pPars->fVerbose );
else
pTemp = Gia_ManFraigSweepSimple( pAbc->pGia, pPars );
Abc_FrameUpdateGia( pAbc, pTemp ); Abc_FrameUpdateGia( pAbc, pTemp );
return 0; return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment