summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-12-11 21:13:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2019-12-11 21:13:00 -0800
commit6fb8b17c2d4183b595d7f6fd0cfc7fb387f450f2 (patch)
tree3ed9490cfc84a099bf750f14e09efdb086382cf4 /src/aig
parent4f4b207f2f648808e8feffcc4bfea6e8f7c40734 (diff)
downloadabc-6fb8b17c2d4183b595d7f6fd0cfc7fb387f450f2.tar.gz
abc-6fb8b17c2d4183b595d7f6fd0cfc7fb387f450f2.tar.bz2
abc-6fb8b17c2d4183b595d7f6fd0cfc7fb387f450f2.zip
Making &gla iterate over property outputs.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/gia.h1
-rw-r--r--src/aig/gia/giaDup.c24
2 files changed, 25 insertions, 0 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index 18544a73..0efc263b 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -1293,6 +1293,7 @@ extern Gia_Man_t * Gia_ManDupFlopClass( Gia_Man_t * p, int iClass );
extern Gia_Man_t * Gia_ManDupMarked( Gia_Man_t * p );
extern Gia_Man_t * Gia_ManDupTimes( Gia_Man_t * p, int nTimes );
extern Gia_Man_t * Gia_ManDupDfs( Gia_Man_t * p );
+extern Gia_Man_t * Gia_ManDupDfsOnePo( Gia_Man_t * p, int iPo );
extern Gia_Man_t * Gia_ManDupCofactorVar( Gia_Man_t * p, int iVar, int Value );
extern Gia_Man_t * Gia_ManDupCofactorObj( Gia_Man_t * p, int iObj, int Value );
extern Gia_Man_t * Gia_ManDupMux( int iVar, Gia_Man_t * pCof1, Gia_Man_t * pCof0 );
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index 988d50a2..e05380d5 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -1556,6 +1556,30 @@ Gia_Man_t * Gia_ManDupDfs( Gia_Man_t * p )
pNew->pCexSeq = Abc_CexDup( p->pCexSeq, Gia_ManRegNum(p) );
return pNew;
}
+Gia_Man_t * Gia_ManDupDfsOnePo( Gia_Man_t * p, int iPo )
+{
+ Gia_Man_t * pNew, * pTemp;
+ Gia_Obj_t * pObj;
+ int i;
+ assert( iPo >= 0 && iPo < Gia_ManPoNum(p) );
+ pNew = Gia_ManStart( Gia_ManObjNum(p) );
+ pNew->pName = Abc_UtilStrsav( p->pName );
+ pNew->pSpec = Abc_UtilStrsav( p->pSpec );
+ Gia_ManFillValue( p );
+ Gia_ManConst0(p)->Value = 0;
+ Gia_ManForEachCi( p, pObj, i )
+ pObj->Value = Gia_ManAppendCi(pNew);
+ Gia_ManForEachCo( p, pObj, i )
+ if ( !Gia_ObjIsPo(p, pObj) || i == iPo )
+ Gia_ManDupDfs_rec( pNew, p, Gia_ObjFanin0(pObj) );
+ Gia_ManForEachCo( p, pObj, i )
+ if ( !Gia_ObjIsPo(p, pObj) || i == iPo )
+ pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
+ Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
+ pNew = Gia_ManCleanup( pTemp = pNew );
+ Gia_ManStop( pTemp );
+ return pNew;
+}
/**Function*************************************************************