/**CFile**************************************************************** FileName [rwrUtil.c] SystemName [ABC: Logic synthesis and verification system.] PackageName [DAG-aware AIG rewriting package.] Synopsis [Various utilities.] Author [Alan Mishchenko] Affiliation [UC Berkeley] Date [Ver. 1.0. Started - June 20, 2005.] Revision [$Id: rwrUtil.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] ***********************************************************************/ #include "rwr.h" //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFITIONS /// //////////////////////////////////////////////////////////////////////// /**Function************************************************************* Synopsis [Creates the array of fanout counters.] Description [] SideEffects [] SeeAlso [] ***********************************************************************/ Vec_Int_t * Rwt_NtkFanoutCounters( Abc_Ntk_t * pNtk ) { Vec_Int_t * vFanNums; Abc_Obj_t * pObj; int i; vFanNums = Vec_IntAlloc( 0 ); Vec_IntFill( vFanNums, Abc_NtkObjNumMax(pNtk), -1 ); Abc_NtkForEachObj( pNtk, pObj, i ) if ( Abc_ObjIsNode( pObj ) ) Vec_IntWriteEntry( vFanNums, i, Abc_ObjFanoutNum(pObj) ); return vFanNums; } //////////////////////////////////////////////////////////////////////// /// END OF FILE /// ////////////////////////////////////////////////////////////////////////