diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-01-12 13:33:04 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-01-12 13:33:04 -0800 |
commit | 12a51a2b51ec2325c635905cc0e4b8704b17395a (patch) | |
tree | 76daff7996b5ca0f935c2ce7e51f8694edaa9336 /src/aig/gia | |
parent | 9e419f538ffd554b65e4f998b99d4a409546db4e (diff) | |
download | abc-12a51a2b51ec2325c635905cc0e4b8704b17395a.tar.gz abc-12a51a2b51ec2325c635905cc0e4b8704b17395a.tar.bz2 abc-12a51a2b51ec2325c635905cc0e4b8704b17395a.zip |
Adding one API of GIA manager.
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/gia.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index d6375312..e7e64302 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -849,6 +849,24 @@ static inline int Gia_ManAppendXor2( Gia_Man_t * p, int iLit0, int iLit1 ) return Gia_ManAppendMux2( p, iLit0, Abc_LitNot(iLit1), iLit1 ); } +static inline int Gia_ManAppendXorReal2( Gia_Man_t * p, int iLit0, int iLit1 ) +{ + int fCompl; + if ( !p->fGiaSimple ) + { + if ( iLit0 < 2 ) + return iLit0 ? Abc_LitNot(iLit1) : iLit1; + if ( iLit1 < 2 ) + return iLit1 ? Abc_LitNot(iLit0) : iLit0; + if ( iLit0 == iLit1 ) + return 0; + if ( iLit0 == Abc_LitNot(iLit1) ) + return 1; + } + fCompl = Abc_LitIsCompl(iLit0) ^ Abc_LitIsCompl(iLit1); + return Abc_LitNotCond( Gia_ManAppendXorReal( p, Abc_LitRegular(iLit0), Abc_LitRegular(iLit1) ), fCompl ); +} + static inline void Gia_ManPatchCoDriver( Gia_Man_t * p, int iCoIndex, int iLit0 ) { Gia_Obj_t * pObjCo = Gia_ManCo( p, iCoIndex ); |