summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/gia.h1
-rw-r--r--src/aig/gia/giaDup.c7
-rw-r--r--src/aig/gia/giaMan.c1
-rw-r--r--src/aig/gia/giaShow.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h
index ab6870d8..1877821a 100644
--- a/src/aig/gia/gia.h
+++ b/src/aig/gia/gia.h
@@ -156,6 +156,7 @@ struct Gia_Man_t_
Vec_Int_t * vRegInits; // initial state
Vec_Int_t * vDoms; // dominators
Vec_Int_t * vBarBufs; // barrier buffers
+ Vec_Int_t * vXors; // temporary XORs
unsigned char* pSwitching; // switching activity for each object
Gia_Plc_t * pPlacement; // placement of the objects
Gia_Man_t * pAigExtra; // combinational logic of holes
diff --git a/src/aig/gia/giaDup.c b/src/aig/gia/giaDup.c
index a01c93fd..dbfe38f3 100644
--- a/src/aig/gia/giaDup.c
+++ b/src/aig/gia/giaDup.c
@@ -2995,7 +2995,12 @@ Gia_Man_t * Gia_ManDupAndCones( Gia_Man_t * p, int * pAnds, int nAnds, int fTrim
// Gia_ObjRiToRo(p, pObj)->Value = Gia_ManAppendCi( pNew );
// create internal nodes
Vec_PtrForEachEntry( Gia_Obj_t *, vNodes, pObj, i )
- pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
+ if ( Gia_ObjIsMux(p, pObj) )
+ pObj->Value = Gia_ManAppendMux( pNew, Gia_ObjFanin2Copy(p, pObj), Gia_ObjFanin1Copy(pObj), Gia_ObjFanin0Copy(pObj) );
+ else if ( Gia_ObjIsXor(pObj) )
+ pObj->Value = Gia_ManAppendXor( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
+ else
+ pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
// create COs
Vec_PtrForEachEntry( Gia_Obj_t *, vRoots, pObj, i )
// Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
diff --git a/src/aig/gia/giaMan.c b/src/aig/gia/giaMan.c
index 27dff3ad..d9e878a7 100644
--- a/src/aig/gia/giaMan.c
+++ b/src/aig/gia/giaMan.c
@@ -109,6 +109,7 @@ void Gia_ManStop( Gia_Man_t * p )
Vec_IntFreeP( &p->vRegInits );
Vec_IntFreeP( &p->vDoms );
Vec_IntFreeP( &p->vBarBufs );
+ Vec_IntFreeP( &p->vXors );
Vec_IntFreeP( &p->vLevels );
Vec_IntFreeP( &p->vTruths );
Vec_IntErase( &p->vCopies );
diff --git a/src/aig/gia/giaShow.c b/src/aig/gia/giaShow.c
index 91edbaa5..9d585d6d 100644
--- a/src/aig/gia/giaShow.c
+++ b/src/aig/gia/giaShow.c
@@ -156,7 +156,7 @@ int Gia_WriteDotAigLevel( Gia_Man_t * p, Vec_Int_t * vFadds, Vec_Int_t * vHadds,
Vec_IntWriteEntry( vRemap, pFanins[0], pFanins[1] );
//printf( "Making HA output %d.\n", pFanins[1] );
}
- else
+ else // if ( Attr == 3 || Attr == 0 )
{
Gia_Obj_t * pObj = Gia_ManObj( p, Node );
int pFaninsIn[2] = { Gia_ObjFaninId0(pObj, Node), Gia_ObjFaninId1(pObj, Node) };