summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/gia/giaUtil.c')
-rw-r--r--src/aig/gia/giaUtil.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index e16ee44f..365a8539 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -746,6 +746,34 @@ int * Gia_ManCreateMuxRefs( Gia_Man_t * p )
/**Function*************************************************************
+ Synopsis [Assigns references.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_ManCountMuxXor( Gia_Man_t * p, int * pnMuxes, int * pnXors )
+{
+ Gia_Obj_t * pObj, * pFan0, * pFan1;
+ int i;
+ *pnMuxes = 0;
+ *pnXors = 0;
+ Gia_ManForEachAnd( p, pObj, i )
+ {
+ if ( !Gia_ObjIsMuxType(pObj) )
+ continue;
+ if ( Gia_ObjRecognizeExor(pObj, &pFan0, &pFan1) )
+ (*pnXors)++;
+ else
+ (*pnMuxes)++;
+ }
+}
+
+/**Function*************************************************************
+
Synopsis [Computes the maximum frontier size.]
Description []