diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-15 18:09:01 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-06-15 18:09:01 -0700 |
commit | 3d3384865996b7ff1453c7e41949dc56dab0a7e0 (patch) | |
tree | 81621b863e81fa481ac9c4ce398843cffb7380be /src | |
parent | e2637595f8758c33e3921a9bd84ec8e640b8ea4d (diff) | |
download | abc-3d3384865996b7ff1453c7e41949dc56dab0a7e0.tar.gz abc-3d3384865996b7ff1453c7e41949dc56dab0a7e0.tar.bz2 abc-3d3384865996b7ff1453c7e41949dc56dab0a7e0.zip |
Updates and bug fixes.
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/giaMuxes.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/aig/gia/giaMuxes.c b/src/aig/gia/giaMuxes.c index 85db6e76..c6fdc9a4 100644 --- a/src/aig/gia/giaMuxes.c +++ b/src/aig/gia/giaMuxes.c @@ -114,6 +114,7 @@ Gia_Man_t * Gia_ManDupMuxes( Gia_Man_t * p, int Limit ) Gia_ManHashStart( pNew ); Gia_ManForEachAnd( p, pObj, i ) { +/* if ( !Gia_ObjIsMuxType(pObj) || Gia_ObjRefNum(p, Gia_ObjFanin0(pObj)) + Gia_ObjRefNum(p, Gia_ObjFanin1(pObj)) > Limit ) pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); else if ( Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) ) @@ -123,6 +124,18 @@ Gia_Man_t * Gia_ManDupMuxes( Gia_Man_t * p, int Limit ) pFanC = Gia_ObjRecognizeMux( pObj, &pFan1, &pFan0 ); pObj->Value = Gia_ManHashMuxReal( pNew, Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFanC)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan1)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan0)) ); } +*/ + if ( !Gia_ObjIsMuxType(pObj) ) + pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); + else if ( Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) ) + pObj->Value = Gia_ManHashXorReal( pNew, Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan0)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan1)) ); + else if ( Gia_ObjRefNum(p, Gia_ObjFanin0(pObj)) + Gia_ObjRefNum(p, Gia_ObjFanin1(pObj)) > Limit ) + pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) ); + else + { + pFanC = Gia_ObjRecognizeMux( pObj, &pFan1, &pFan0 ); + pObj->Value = Gia_ManHashMuxReal( pNew, Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFanC)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan1)), Gia_ObjLitCopy(p, Gia_ObjToLit(p, pFan0)) ); + } } Gia_ManHashStop( pNew ); // create ROs |