diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-10 17:29:21 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-02-10 17:29:21 -0800 |
commit | 4b93ddda632a6d87457bf88688fd5e32332ec15b (patch) | |
tree | ae790157075da847b7de4961fc7b8fcb560a0e2a /src/base | |
parent | 6bda7ca8f4175b9dcdd4b033e17f42ed4faf6129 (diff) | |
download | abc-4b93ddda632a6d87457bf88688fd5e32332ec15b.tar.gz abc-4b93ddda632a6d87457bf88688fd5e32332ec15b.tar.bz2 abc-4b93ddda632a6d87457bf88688fd5e32332ec15b.zip |
Adding resource limit to 'sop'.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abc/abcFunc.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/base/abc/abcFunc.c b/src/base/abc/abcFunc.c index 6e9e3d09..ff18fb13 100644 --- a/src/base/abc/abcFunc.c +++ b/src/base/abc/abcFunc.c @@ -364,7 +364,20 @@ int Abc_NtkBddToSop( Abc_Ntk_t * pNtk, int fDirect ) DdManager * dd = (DdManager *)pNtk->pManFunc; DdNode * bFunc; Vec_Str_t * vCube; - int i, fMode; + int i, fMode, nCubes; + + // collect all BDDs into one array + Vec_Ptr_t * vFuncs = Vec_PtrAlloc( Abc_NtkNodeNum(pNtk) ); + assert( !Cudd_ReorderingStatus(dd, &nCubes) ); + Abc_NtkForEachNode( pNtk, pNode, i ) + if ( !Abc_ObjIsBarBuf(pNode) ) + Vec_PtrPush( vFuncs, pNode->pData ); + // estimate the number of cubes in the ISOPs + nCubes = Extra_bddCountCubes( dd, (DdNode **)Vec_PtrArray(vFuncs), Vec_PtrSize(vFuncs), fDirect, 100000 ); + Vec_PtrFree( vFuncs ); + if ( nCubes == -1 ) + return 0; + printf( "The total number of cubes = %d.\n", nCubes ); if ( fDirect ) fMode = 1; |