From 539f05c09f48b5d024b385b4a735f55da1c2c3fc Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 4 Dec 2013 00:18:07 -0800 Subject: Upgrading command 'print_supp'. --- src/base/abci/abcPrint.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c index 66cb5af0..4be6dcde 100644 --- a/src/base/abci/abcPrint.c +++ b/src/base/abci/abcPrint.c @@ -1174,18 +1174,27 @@ void Abc_NtkPrintSharing( Abc_Ntk_t * pNtk ) SeeAlso [] ***********************************************************************/ +int Abc_NtkCountPis( Vec_Ptr_t * vSupp ) +{ + Abc_Obj_t * pObj; + int i, Counter = 0; + Vec_PtrForEachEntry( Abc_Obj_t *, vSupp, pObj, i ) + Counter += Abc_ObjIsPi(pObj); + return Counter; +} void Abc_NtkPrintStrSupports( Abc_Ntk_t * pNtk, int fMatrix ) { Vec_Ptr_t * vSupp, * vNodes; Abc_Obj_t * pObj; - int i, k; + int i, k, nPis; printf( "Structural support info:\n" ); Abc_NtkForEachCo( pNtk, pObj, i ) { vSupp = Abc_NtkNodeSupport( pNtk, &pObj, 1 ); vNodes = Abc_NtkDfsNodes( pNtk, &pObj, 1 ); - printf( "%5d %20s : Cone = %5d. Supp = %5d.\n", - i, Abc_ObjName(pObj), vNodes->nSize, vSupp->nSize ); + nPis = Abc_NtkCountPis( vSupp ); + printf( "%5d %20s : Cone = %5d. Supp = %5d. (PIs = %5d. FFs = %5d.)\n", + i, Abc_ObjName(pObj), vNodes->nSize, vSupp->nSize, nPis, vSupp->nSize - nPis ); Vec_PtrFree( vNodes ); Vec_PtrFree( vSupp ); } -- cgit v1.2.3