summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-05-01 20:54:52 +0800
committerAlan Mishchenko <alanmi@berkeley.edu>2019-05-01 20:54:52 +0800
commiteb2764b5251aa23588f5aa6179197a378f15d759 (patch)
treea2296dfd50c6d6d5a8474f6727ebc50fe90344da /src/aig
parentd07608c052cb673f4aef8096b5ad71dd662214cc (diff)
downloadabc-eb2764b5251aa23588f5aa6179197a378f15d759.tar.gz
abc-eb2764b5251aa23588f5aa6179197a378f15d759.tar.bz2
abc-eb2764b5251aa23588f5aa6179197a378f15d759.zip
Experiment with frontier cut computation.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/giaUtil.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index 204d3033..feac7d08 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -771,6 +771,20 @@ int * Gia_ManCreateMuxRefs( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
+Vec_Int_t * Gia_ManBfsForCrossCut( Gia_Man_t * p )
+{
+ Vec_Int_t * vNodes = Vec_IntAlloc( Gia_ManObjNum(p) );
+ Vec_Vec_t * vLevels = Gia_ManLevelize( p );
+ Vec_Ptr_t * vObjs;
+ Gia_Obj_t * pObj;
+ int i, k;
+ Vec_VecForEachLevel( vLevels, vObjs, i )
+ Vec_PtrForEachEntry( Gia_Obj_t *, vObjs, pObj, k )
+ Vec_IntPush( vNodes, Gia_ObjId(p, pObj) );
+ Vec_VecFree( vLevels );
+ return vNodes;
+}
+
void Gia_ManDfsForCrossCut_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vNodes )
{
if ( Gia_ObjIsTravIdCurrent(p, pObj) )
@@ -823,6 +837,7 @@ int Gia_ManCrossCut( Gia_Man_t * p, int fReverse )
Gia_Obj_t * pObj;
int i, nCutCur = 0, nCutMax = 0;
vNodes = Gia_ManDfsForCrossCut( p, fReverse );
+ //vNodes = Gia_ManBfsForCrossCut( p );
Gia_ManForEachObjVec( vNodes, p, pObj, i )
{
if ( pObj->Value )