summaryrefslogtreecommitdiffstats
path: root/src/sat/bmc/bmcBmcAnd.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-09-10 23:14:20 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-09-10 23:14:20 -0700
commit299099a443f4a908cd8281b08181de79f655bdab (patch)
tree42ada16c1276bd467e9e3ecb109762b48a9c3df0 /src/sat/bmc/bmcBmcAnd.c
parent26c0e9370ab8c2c6b54c1199da808476846bdf95 (diff)
downloadabc-299099a443f4a908cd8281b08181de79f655bdab.tar.gz
abc-299099a443f4a908cd8281b08181de79f655bdab.tar.bz2
abc-299099a443f4a908cd8281b08181de79f655bdab.zip
Updates for the new BMC engine.
Diffstat (limited to 'src/sat/bmc/bmcBmcAnd.c')
-rw-r--r--src/sat/bmc/bmcBmcAnd.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/sat/bmc/bmcBmcAnd.c b/src/sat/bmc/bmcBmcAnd.c
index 9833c692..a5ada748 100644
--- a/src/sat/bmc/bmcBmcAnd.c
+++ b/src/sat/bmc/bmcBmcAnd.c
@@ -618,6 +618,15 @@ int Gia_ManBmcCheckOutputs( Gia_Man_t * pFrames, int iStart, int iStop )
return 0;
return 1;
}
+int Gia_ManBmcFindFirst( Gia_Man_t * pFrames )
+{
+ Gia_Obj_t * pObj;
+ int i;
+ Gia_ManForEachPo( pFrames, pObj, i )
+ if ( Gia_ObjChild0(pObj) != Gia_ManConst0(pFrames) )
+ return i;
+ return -1;
+}
/**Function*************************************************************
@@ -723,11 +732,16 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
nFramesMax = Gia_ManPoNum(p->pFrames) / Gia_ManPoNum(pGia);
if ( pPars->fVerbose )
{
- printf( "Performed unfolding for %d frames. ", nFramesMax );
- Abc_PrintTime( 1, "Unfolding time", Abc_Clock() - clk );
+ printf( "Unfolding for %d frames with first non-trivial PO %d. ", nFramesMax, Gia_ManBmcFindFirst(p->pFrames) );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
if ( pPars->fVerbose )
Gia_ManPrintStats( p->pFrames, NULL );
+ if ( pPars->fDumpFrames )
+ {
+ Gia_AigerWrite( p->pFrames, "frames.aig", 0, 0 );
+ printf( "Dumped unfolded frames into file \"frames.aig\".\n" );
+ }
for ( f = 0; f < nFramesMax; f++ )
{
if ( !Gia_ManBmcCheckOutputs( p->pFrames, f * Gia_ManPoNum(pGia), (f+1) * Gia_ManPoNum(pGia) ) )
@@ -777,14 +791,6 @@ int Gia_ManBmcPerform( Gia_Man_t * pGia, Bmc_AndPar_t * pPars )
}
if ( RetValue == -2 )
RetValue = -1;
- // dump unfolded frames
- if ( pPars->fDumpFrames )
- {
- p->pFrames = Gia_ManCleanup( p->pFrames );
- Gia_AigerWrite( p->pFrames, "frames.aig", 0, 0 );
- printf( "Dumped unfolded frames into file \"frames.aig\".\n" );
- Gia_ManStop( p->pFrames );
- }
// cleanup
Gia_ManStop( p->pFrames );
Bmc_MnaFree( p );