diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-17 23:19:54 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-09-17 23:19:54 -0700 |
commit | d4bd7846c3bb80c89ae646d20d8c144d089564b0 (patch) | |
tree | 569aeaf2cafe986e034e07d6334158a8e0453c45 | |
parent | 3d8dc1217c3634963e36f793d475cb73622d8719 (diff) | |
download | abc-d4bd7846c3bb80c89ae646d20d8c144d089564b0.tar.gz abc-d4bd7846c3bb80c89ae646d20d8c144d089564b0.tar.bz2 abc-d4bd7846c3bb80c89ae646d20d8c144d089564b0.zip |
Added bridge integration for multi-output 'bmc3 -a'.
-rw-r--r-- | src/base/abci/abc.c | 1 | ||||
-rw-r--r-- | src/sat/bmc/bmc.h | 1 | ||||
-rw-r--r-- | src/sat/bmc/bmcBmc3.c | 12 |
3 files changed, 14 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 8773f9d1..47f78c51 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -21901,6 +21901,7 @@ int Abc_CommandBmc3( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Constraints have to be folded (use \"fold\").\n" ); return 0; } + pPars->fUseBridge = pAbc->fBridgeMode; pAbc->Status = Abc_NtkDarBmc3( pNtk, pPars, fOrDecomp ); pAbc->nFrames = pNtk->vSeqModelVec ? -1 : pPars->iFrame; if ( pLogFileName ) diff --git a/src/sat/bmc/bmc.h b/src/sat/bmc/bmc.h index 08db89a7..072040c5 100644 --- a/src/sat/bmc/bmc.h +++ b/src/sat/bmc/bmc.h @@ -56,6 +56,7 @@ struct Saig_ParBmc_t_ int nPisAbstract; // the number of PIs to abstract int fSolveAll; // does not stop at the first SAT output int fStoreCex; // enable storing CEXes in the MO mode + int fUseBridge; // use bridge interface int fDropSatOuts; // replace sat outputs by constant 0 int nFfToAddMax; // max number of flops to add during CBA int fSkipRand; // skip random decisions diff --git a/src/sat/bmc/bmcBmc3.c b/src/sat/bmc/bmcBmc3.c index e312e3be..8e22a0d5 100644 --- a/src/sat/bmc/bmcBmc3.c +++ b/src/sat/bmc/bmcBmc3.c @@ -64,6 +64,8 @@ struct Gia_ManBmc_t_ char * pSopSizes, ** pSops; // CNF representation }; +extern int Gia_ManToBridgeResult( FILE * pFile, int Result, Abc_Cex_t * pCex, int iPoProved ); + //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// @@ -1424,6 +1426,11 @@ clkOther += Abc_Clock() - clk2; nOutDigits, i, f, nOutDigits, pPars->nFailOuts, nOutDigits, Saig_ManPoNum(pAig) ); if ( p->vCexes == NULL ) p->vCexes = Vec_PtrStart( Saig_ManPoNum(pAig) ); + if ( p->pPars->fUseBridge ) + { + Abc_Cex_t * pCexNew = Abc_CexMakeTriv( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), f*Saig_ManPoNum(pAig)+i ); + Gia_ManToBridgeResult( stdout, 0, pCexNew, pCexNew->iPo ); + } Vec_PtrWriteEntry( p->vCexes, i, pPars->fStoreCex ? Abc_CexMakeTriv( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), Saig_ManPoNum(pAig), f*Saig_ManPoNum(pAig)+i ) : (void *)(ABC_PTRINT_T)1 ); if ( pPars->pFuncOnFail && pPars->pFuncOnFail(i, pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, i) : NULL) ) { @@ -1514,6 +1521,11 @@ nTimeSat += Abc_Clock() - clk2; nOutDigits, i, f, nOutDigits, pPars->nFailOuts, nOutDigits, Saig_ManPoNum(pAig) ); if ( p->vCexes == NULL ) p->vCexes = Vec_PtrStart( Saig_ManPoNum(pAig) ); + if ( p->pPars->fUseBridge ) + { + Abc_Cex_t * pCexNew = Saig_ManGenerateCex( p, f, i ); + Gia_ManToBridgeResult( stdout, 0, pCexNew, pCexNew->iPo ); + } Vec_PtrWriteEntry( p->vCexes, i, pPars->fStoreCex? Saig_ManGenerateCex( p, f, i ) : (void *)(ABC_PTRINT_T)1 ); if ( pPars->pFuncOnFail && pPars->pFuncOnFail(i, pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, i) : NULL) ) { |