summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-02-10 17:29:21 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-02-10 17:29:21 -0800
commit4b93ddda632a6d87457bf88688fd5e32332ec15b (patch)
treeae790157075da847b7de4961fc7b8fcb560a0e2a /src/base
parent6bda7ca8f4175b9dcdd4b033e17f42ed4faf6129 (diff)
downloadabc-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.c15
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;