36static void Abc_NtkAutoPrintAll( DdManager * dd,
int nInputs, DdNode * pbOutputs[],
int nOutputs,
char * pInputNames[],
char * pOutputNames[],
int fNaive );
37static void Abc_NtkAutoPrintOne( DdManager * dd,
int nInputs, DdNode * pbOutputs[],
int Output,
char * pInputNames[],
char * pOutputNames[],
int fNaive );
60 int nOutputs, nInputs, i;
69 nInputs = Abc_NtkCiNum(pNtk);
70 nOutputs = Abc_NtkCoNum(pNtk);
72 dd = (DdManager *)Abc_NtkGlobalBddMan( pNtk );
75 vFuncsGlob = Vec_PtrAlloc( Abc_NtkCoNum(pNtk) );
77 Vec_PtrPush( vFuncsGlob, Abc_ObjGlobalBdd(pObj) );
78 pbGlobal = (DdNode **)Vec_PtrArray( vFuncsGlob );
86 printf(
"Shared BDD size = %6d nodes.\n", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
89 for ( i = 0; i < nInputs; i++ )
91 assert( Cudd_ReadSize(dd) == 2 * nInputs );
94 Cudd_zddVarsFromBddVars( dd, 2 );
98 Abc_NtkAutoPrintAll( dd, nInputs, pbGlobal, nOutputs, pInputNames, pOutputNames, fNaive );
100 Abc_NtkAutoPrintOne( dd, nInputs, pbGlobal, Output, pInputNames, pOutputNames, fNaive );
110 Vec_PtrFree( vFuncsGlob );
124void Abc_NtkAutoPrintAll( DdManager * dd,
int nInputs, DdNode * pbOutputs[],
int nOutputs,
char * pInputNames[],
char * pOutputNames[],
int fNaive )
126 DdNode * bSpace1, * bSpace2, * bCanVars, * bReduced, * zEquations;
128 int nSupp, SigCounter, o;
133 int nAutoSymsMaxSupp;
141 nAutoSymsMaxSupp = 0;
146 for ( o = 0; o < nOutputs; o++ )
154 nSupp = Cudd_SupportSize( dd, bSpace1 );
155 nMints = Cudd_CountMinterm( dd, bSpace1, nSupp );
157 printf(
"Output #%3d: Inputs = %2d. AutoK = %2d.\n", o, nSupp, nAutos );
163 if ( nAutoSymsMax < nAutos )
165 nAutoSymsMax = nAutos;
166 nAutoSymsMaxSupp = nSupp;
169 if ( nSuppSizeMax < nSupp )
170 nSuppSizeMax = nSupp;
184 if ( bSpace1 != bSpace2 )
185 printf(
"Spaces are NOT EQUAL!\n" );
189 Cudd_RecursiveDeref( dd, bSpace1 );
190 Cudd_RecursiveDeref( dd, bSpace2 );
191 Cudd_RecursiveDeref( dd, bCanVars );
192 Cudd_RecursiveDeref( dd, bReduced );
193 Cudd_RecursiveDerefZdd( dd, zEquations );
196 printf(
"The cumulative statistics for all outputs:\n" );
197 printf(
"Ins=%3d ", nInputs );
198 printf(
"InMax=%3d ", nSuppSizeMax );
199 printf(
"Outs=%3d ", nOutputs );
200 printf(
"Auto=%3d ", nAutoSymOuts );
201 printf(
"SumK=%3d ", nAutoSyms );
202 printf(
"KMax=%2d ", nAutoSymsMax );
203 printf(
"Supp=%3d ", nAutoSymsMaxSupp );
204 printf(
"Time=%4.2f ", (
float)(Abc_Clock() - clk)/(
float)(CLOCKS_PER_SEC) );
219void Abc_NtkAutoPrintOne( DdManager * dd,
int nInputs, DdNode * pbOutputs[],
int Output,
char * pInputNames[],
char * pOutputNames[],
int fNaive )
221 DdNode * bSpace1, * bCanVars, * bReduced, * zEquations;
223 int nSupp, SigCounter;
233 nSupp = Cudd_SupportSize( dd, bSpace1 );
234 nMints = Cudd_CountMinterm( dd, bSpace1, nSupp );
236 printf(
"Output #%3d: Inputs = %2d. AutoK = %2d.\n", Output, nSupp, nAutos );
238 Cudd_RecursiveDeref( dd, bSpace1 );
239 Cudd_RecursiveDeref( dd, bCanVars );
240 Cudd_RecursiveDeref( dd, bReduced );
241 Cudd_RecursiveDerefZdd( dd, zEquations );
ABC_NAMESPACE_IMPL_START void Abc_NtkAutoPrint(Abc_Ntk_t *pNtk, int Output, int fNaive, int fVerbose)
DECLARATIONS ///.
struct Abc_Obj_t_ Abc_Obj_t
#define Abc_NtkForEachCo(pNtk, pCo, i)
struct Abc_Ntk_t_ Abc_Ntk_t
ABC_DLL void * Abc_NtkFreeGlobalBdds(Abc_Ntk_t *pNtk, int fFreeMan)
ABC_DLL void * Abc_NtkBuildGlobalBdds(Abc_Ntk_t *pNtk, int fBddSizeMax, int fDropInternal, int fReorder, int fReverse, int fVerbose)
ABC_DLL char ** Abc_NtkCollectCioNames(Abc_Ntk_t *pNtk, int fCollectCos)
#define ABC_NAMESPACE_IMPL_START
#define ABC_NAMESPACE_IMPL_END
typedefABC_NAMESPACE_HEADER_START struct Vec_Ptr_t_ Vec_Ptr_t
INCLUDES ///.