diff options
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/gia.h | 1 | ||||
-rw-r--r-- | src/aig/gia/giaHash.c | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index f503b740..dba5c9db 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -1174,6 +1174,7 @@ extern int Gia_ManHashAnd( Gia_Man_t * p, int iLit0, int iLit1 ) extern int Gia_ManHashOr( Gia_Man_t * p, int iLit0, int iLit1 ); extern int Gia_ManHashXor( Gia_Man_t * p, int iLit0, int iLit1 ); extern int Gia_ManHashMux( Gia_Man_t * p, int iCtrl, int iData1, int iData0 ); +extern int Gia_ManHashMaj( Gia_Man_t * p, int iData0, int iData1, int iData2 ); extern int Gia_ManHashAndTry( Gia_Man_t * p, int iLit0, int iLit1 ); extern Gia_Man_t * Gia_ManRehash( Gia_Man_t * p, int fAddStrash ); extern void Gia_ManHashProfile( Gia_Man_t * p ); diff --git a/src/aig/gia/giaHash.c b/src/aig/gia/giaHash.c index f7253c51..10e1866e 100644 --- a/src/aig/gia/giaHash.c +++ b/src/aig/gia/giaHash.c @@ -688,6 +688,25 @@ int Gia_ManHashMux( Gia_Man_t * p, int iCtrl, int iData1, int iData0 ) /**Function************************************************************* + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Gia_ManHashMaj( Gia_Man_t * p, int iData0, int iData1, int iData2 ) +{ + int iTemp0 = Gia_ManHashOr( p, iData1, iData2 ); + int iTemp1 = Gia_ManHashAnd( p, iData0, iTemp0 ); + int iTemp2 = Gia_ManHashAnd( p, iData1, iData2 ); + return Gia_ManHashOr( p, iTemp1, iTemp2 ); +} + +/**Function************************************************************* + Synopsis [Rehashes AIG.] Description [] |