summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaDup.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-12-01 23:13:24 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2012-12-01 23:13:24 -0800
commit86fcba60c276788bc28b0548415be83d3b75ca96 (patch)
treef5531285e5912745b9592939403fe3a5a4608dd1 /src/aig/gia/giaDup.c
parent01bea8ef3a79d7ee991cf4e7776fabb9cec58219 (diff)
downloadabc-86fcba60c276788bc28b0548415be83d3b75ca96.tar.gz
abc-86fcba60c276788bc28b0548415be83d3b75ca96.tar.bz2
abc-86fcba60c276788bc28b0548415be83d3b75ca96.zip
Enabling command &append for combiming multiple AIGs.
Diffstat (limited to 'src/aig/gia/giaDup.c')
-rw-r--r--src/aig/gia/giaDup.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index 3b8980af..95de5c02 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -430,6 +430,38 @@ Gia_Man_t * Gia_ManDup( Gia_Man_t * p )
/**Function*************************************************************
+ Synopsis [Appends second AIG without any changes.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_ManDupAppend( Gia_Man_t * pNew, Gia_Man_t * pTwo )
+{
+ Gia_Obj_t * pObj;
+ int i;
+ if ( pNew->nRegs > 0 )
+ pNew->nRegs = 0;
+ if ( pNew->pHTable == NULL )
+ Gia_ManHashAlloc( pNew );
+ Gia_ManConst0(pTwo)->Value = 0;
+ Gia_ManForEachObj1( pTwo, pObj, i )
+ {
+ if ( Gia_ObjIsAnd(pObj) )
+ pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
+ else if ( Gia_ObjIsCi(pObj) )
+ pObj->Value = Gia_ManAppendCi( pNew );
+ else if ( Gia_ObjIsCo(pObj) )
+ pObj->Value = Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
+ }
+ return pNew;
+}
+
+/**Function*************************************************************
+
Synopsis [Duplicates while adding self-loops to the registers.]
Description []