summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcDar.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-07-22 20:20:19 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2011-07-22 20:20:19 +0700
commit76447062ccb56fc8c221942bcd11645ff88d4821 (patch)
tree4ed984f5ff70e33baf33b90bd54d05c88eb1304b /src/base/abci/abcDar.c
parent5b71a8f849a622160632860c5f5c2c22b3a072cb (diff)
downloadabc-76447062ccb56fc8c221942bcd11645ff88d4821.tar.gz
abc-76447062ccb56fc8c221942bcd11645ff88d4821.tar.bz2
abc-76447062ccb56fc8c221942bcd11645ff88d4821.zip
Adding &equiv3, a new way of refining equivalence classes.
Diffstat (limited to 'src/base/abci/abcDar.c')
-rw-r--r--src/base/abci/abcDar.c48
1 files changed, 47 insertions, 1 deletions
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index ff8aac38..8741b791 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -3028,7 +3028,53 @@ int Abc_NtkDarSeqSim2( Abc_Ntk_t * pNtk, int nFrames, int nWords, int nBinSize,
Abc_AigCleanup((Abc_Aig_t *)pNtk->pManFunc);
}
pMan = Abc_NtkToDar( pNtk, 0, 1 );
- if ( Ssw_RarSimulate( pMan, nFrames, nWords, nBinSize, nRounds, TimeOut, fVerbose ) )
+ if ( Ssw_RarSimulate( pMan, nFrames, nWords, nBinSize, nRounds, TimeOut, fVerbose ) == 0 )
+ {
+ if ( pMan->pSeqModel )
+ {
+ printf( "Simulation of %d frames with %d words asserted output %d in frame %d. ",
+ nFrames, nWords, pMan->pSeqModel->iPo, pMan->pSeqModel->iFrame );
+ status = Saig_ManVerifyCex( pMan, pMan->pSeqModel );
+ if ( status == 0 )
+ printf( "Abc_NtkDarSeqSim(): Counter-example verification has FAILED.\n" );
+ }
+ ABC_FREE( pNtk->pModel );
+ ABC_FREE( pNtk->pSeqModel );
+ pNtk->pSeqModel = pMan->pSeqModel; pMan->pSeqModel = NULL;
+ RetValue = 0;
+ }
+ else
+ {
+ printf( "Simulation of %d frames with %d words did not assert the outputs. ",
+ nFrames, nWords );
+ }
+ ABC_PRT( "Time", clock() - clk );
+ Aig_ManStop( pMan );
+ return RetValue;
+}
+
+/**Function*************************************************************
+
+ Synopsis [Performs random simulation.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Abc_NtkDarSeqEquiv2( Abc_Ntk_t * pNtk, int nFrames, int nWords, int nBinSize, int nRounds, int TimeOut, Abc_Cex_t * pCex, int fLatchOnly, int fVerbose )
+{
+ Aig_Man_t * pMan;
+ int status, RetValue = -1, clk = clock();
+ if ( Abc_NtkGetChoiceNum(pNtk) )
+ {
+ printf( "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
+ Abc_AigCleanup((Abc_Aig_t *)pNtk->pManFunc);
+ }
+ pMan = Abc_NtkToDar( pNtk, 0, 1 );
+ if ( Ssw_RarSignalFilter( pMan, nFrames, nWords, nBinSize, nRounds, TimeOut, pCex, fLatchOnly, fVerbose ) == 0 )
{
if ( pMan->pSeqModel )
{