summaryrefslogtreecommitdiffstats
path: root/src/base/wlc/wlcUif.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-02-28 18:45:44 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2018-02-28 18:45:44 -0800
commit7e9f3f027b8de37480cc8dd6d3de17541a8caeba (patch)
treef0df813a0dd7edef77ba3757493955f28c1e29fa /src/base/wlc/wlcUif.c
parent33971604cf9187a473fa6de335e4849365bbf106 (diff)
downloadabc-7e9f3f027b8de37480cc8dd6d3de17541a8caeba.tar.gz
abc-7e9f3f027b8de37480cc8dd6d3de17541a8caeba.tar.bz2
abc-7e9f3f027b8de37480cc8dd6d3de17541a8caeba.zip
Adding parameters and improvements to %blast.
Diffstat (limited to 'src/base/wlc/wlcUif.c')
-rw-r--r--src/base/wlc/wlcUif.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/base/wlc/wlcUif.c b/src/base/wlc/wlcUif.c
index 78451c17..3c7a08ac 100644
--- a/src/base/wlc/wlcUif.c
+++ b/src/base/wlc/wlcUif.c
@@ -32,6 +32,38 @@ ABC_NAMESPACE_IMPL_START
/**Function*************************************************************
+ Synopsis [Collect adds and mults.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Vec_Int_t * Wlc_NtkCollectAddMult( Wlc_Ntk_t * p, Wlc_BstPar_t * pPar, int * pCountA, int * pCountM )
+{
+ Vec_Int_t * vBoxIds;
+ Wlc_Obj_t * pObj; int i;
+ *pCountA = *pCountM = 0;
+ if ( pPar->nAdderLimit == 0 && pPar->nMultLimit == 0 )
+ return NULL;
+ vBoxIds = Vec_IntAlloc( 100 );
+ Wlc_NtkForEachObj( p, pObj, i )
+ {
+ if ( pObj->Type == WLC_OBJ_ARI_ADD && pPar->nAdderLimit && Wlc_ObjRange(pObj) >= pPar->nAdderLimit )
+ Vec_IntPush( vBoxIds, i ), (*pCountA)++;
+ else if ( pObj->Type == WLC_OBJ_ARI_MULTI && pPar->nMultLimit && Wlc_ObjRange(pObj) >= pPar->nMultLimit )
+ Vec_IntPush( vBoxIds, i ), (*pCountM)++;
+ }
+ if ( Vec_IntSize( vBoxIds ) > 0 )
+ return vBoxIds;
+ Vec_IntFree( vBoxIds );
+ return NULL;
+}
+
+/**Function*************************************************************
+
Synopsis [Check if two objects have the same input/output signatures.]
Description []