summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-04-01 15:36:23 +0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-04-01 15:36:23 +0700
commit9cee4366866da9a13fa8fe6b14a80b91f13d229d (patch)
tree5639d19493592dadbd26b4a8112e7d81900df38a /src/base/abci
parent0c47d04c0b7b8096ea37300720165bb0b0c183d9 (diff)
downloadabc-9cee4366866da9a13fa8fe6b14a80b91f13d229d.tar.gz
abc-9cee4366866da9a13fa8fe6b14a80b91f13d229d.tar.bz2
abc-9cee4366866da9a13fa8fe6b14a80b91f13d229d.zip
Added backward flop order to &icheck (switch -b).
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abc.c12
-rw-r--r--src/base/abci/abcMfs.c4
2 files changed, 10 insertions, 6 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 901e0047..2fd6c633 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -36176,9 +36176,9 @@ usage:
***********************************************************************/
int Abc_CommandAbc9ICheck( Abc_Frame_t * pAbc, int argc, char ** argv )
{
- int c, nFramesMax = 1, nTimeOut = 0, fEmpty = 0, fSearch = 1, fReverse = 0, fDump = 0, fVerbose = 0;
+ int c, nFramesMax = 1, nTimeOut = 0, fEmpty = 0, fSearch = 1, fReverse = 0, fBackTopo = 0, fDump = 0, fVerbose = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "MTesrdvh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "MTesrbdvh" ) ) != EOF )
{
switch ( c )
{
@@ -36213,6 +36213,9 @@ int Abc_CommandAbc9ICheck( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'r':
fReverse ^= 1;
break;
+ case 'b':
+ fBackTopo ^= 1;
+ break;
case 'd':
fDump ^= 1;
break;
@@ -36237,20 +36240,21 @@ int Abc_CommandAbc9ICheck( Abc_Frame_t * pAbc, int argc, char ** argv )
}
Vec_IntFreeP( &pAbc->vIndFlops );
if ( fSearch )
- pAbc->vIndFlops = Bmc_PerformISearch( pAbc->pGia, nFramesMax, nTimeOut, fReverse, fDump, fVerbose );
+ pAbc->vIndFlops = Bmc_PerformISearch( pAbc->pGia, nFramesMax, nTimeOut, fReverse, fBackTopo, fDump, fVerbose );
else
Bmc_PerformICheck( pAbc->pGia, nFramesMax, nTimeOut, fEmpty, fVerbose );
pAbc->nIndFrames = pAbc->vIndFlops ? nFramesMax : 0;
return 0;
usage:
- Abc_Print( -2, "usage: &icheck [-MT num] [-esrdvh]\n" );
+ Abc_Print( -2, "usage: &icheck [-MT num] [-esrbdvh]\n" );
Abc_Print( -2, "\t performs specialized induction check\n" );
Abc_Print( -2, "\t-M num : the number of timeframes used for induction [default = %d]\n", nFramesMax );
Abc_Print( -2, "\t-T num : approximate global runtime limit in seconds [default = %d]\n", nTimeOut );
Abc_Print( -2, "\t-e : toggle using empty set of next-state functions [default = %s]\n", fEmpty? "yes": "no" );
Abc_Print( -2, "\t-s : toggle searching for a minimal subset [default = %s]\n", fSearch? "yes": "no" );
Abc_Print( -2, "\t-r : toggle searching in the reverse order [default = %s]\n", fReverse? "yes": "no" );
+ Abc_Print( -2, "\t-b : toggle searching in backward order from POs [default = %s]\n", fBackTopo? "yes": "no" );
Abc_Print( -2, "\t-d : toggle printing out the resulting set [default = %s]\n", fDump? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
diff --git a/src/base/abci/abcMfs.c b/src/base/abci/abcMfs.c
index 67ecf48d..69d57363 100644
--- a/src/base/abci/abcMfs.c
+++ b/src/base/abci/abcMfs.c
@@ -397,7 +397,7 @@ void Abc_NtkReinsertNodes( Abc_Ntk_t * p, Abc_Ntk_t * pNtk, int iPivot )
assert( Vec_PtrSize(vNodes) + Abc_NtkCiNum(p) + Abc_NtkPoNum(p) == iPivot );
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{
- pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i );
+ pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i + 1 );
if ( pNodeNew == NULL )
continue;
pNodeNew->pCopy = pNode;
@@ -405,7 +405,7 @@ void Abc_NtkReinsertNodes( Abc_Ntk_t * p, Abc_Ntk_t * pNtk, int iPivot )
// connect internal nodes
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNode, i )
{
- pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i );
+ pNodeNew = Abc_NtkObj( pNtk, Abc_NtkCiNum(p) + i + 1 );
if ( pNodeNew == NULL )
continue;
assert( pNodeNew->pCopy == pNode );