diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-05-11 11:07:34 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-05-11 11:07:34 -0700 |
commit | 6e8efec57d5ef07ca33a3cefc3c1e6c3f7c70856 (patch) | |
tree | a932d3800b3dcd220173982289f5bc0c01613a4c /src/aig | |
parent | c89f987dc7aeea7efa4506503446fd22a1cfd7d3 (diff) | |
download | abc-6e8efec57d5ef07ca33a3cefc3c1e6c3f7c70856.tar.gz abc-6e8efec57d5ef07ca33a3cefc3c1e6c3f7c70856.tar.bz2 abc-6e8efec57d5ef07ca33a3cefc3c1e6c3f7c70856.zip |
Experiments with CEC for arithmetic circuits.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/gia.h | 1 | ||||
-rw-r--r-- | src/aig/gia/giaDup.c | 7 | ||||
-rw-r--r-- | src/aig/gia/giaMan.c | 1 | ||||
-rw-r--r-- | src/aig/gia/giaShow.c | 2 |
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) }; |