diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2006-11-28 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2006-11-28 08:01:00 -0800 |
commit | 44d220d28fa2ee56cb539e03684f021731814f17 (patch) | |
tree | 97ece1e77fa8fff2283c62fb9253424e566e7fba /src/base/abci/abcSymm.c | |
parent | 6ad22b4d3b0446652919d95b15fefb374bddfac0 (diff) | |
download | abc-44d220d28fa2ee56cb539e03684f021731814f17.tar.gz abc-44d220d28fa2ee56cb539e03684f021731814f17.tar.bz2 abc-44d220d28fa2ee56cb539e03684f021731814f17.zip |
Version abc61128
Diffstat (limited to 'src/base/abci/abcSymm.c')
-rw-r--r-- | src/base/abci/abcSymm.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/base/abci/abcSymm.c b/src/base/abci/abcSymm.c index d3fcb7c9..0f76065c 100644 --- a/src/base/abci/abcSymm.c +++ b/src/base/abci/abcSymm.c @@ -24,7 +24,7 @@ /// DECLARATIONS /// //////////////////////////////////////////////////////////////////////// -static void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fVerbose ); +static void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fReorder, int fVerbose ); static void Abc_NtkSymmetriesUsingSandS( Abc_Ntk_t * pNtk, int fVerbose ); static void Ntk_NetworkSymmsBdd( DdManager * dd, Abc_Ntk_t * pNtk, int fNaive, int fVerbose ); static void Ntk_NetworkSymmsPrint( Abc_Ntk_t * pNtk, Extra_SymmInfo_t * pSymms ); @@ -44,10 +44,10 @@ static void Ntk_NetworkSymmsPrint( Abc_Ntk_t * pNtk, Extra_SymmInfo_t * pSymms ) SeeAlso [] ***********************************************************************/ -void Abc_NtkSymmetries( Abc_Ntk_t * pNtk, int fUseBdds, int fNaive, int fVerbose ) +void Abc_NtkSymmetries( Abc_Ntk_t * pNtk, int fUseBdds, int fNaive, int fReorder, int fVerbose ) { - if ( fUseBdds ) - Abc_NtkSymmetriesUsingBdds( pNtk, fNaive, fVerbose ); + if ( fUseBdds || fNaive ) + Abc_NtkSymmetriesUsingBdds( pNtk, fNaive, fReorder, fVerbose ); else Abc_NtkSymmetriesUsingSandS( pNtk, fVerbose ); } @@ -81,15 +81,19 @@ void Abc_NtkSymmetriesUsingSandS( Abc_Ntk_t * pNtk, int fVerbose ) SeeAlso [] ***********************************************************************/ -void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fVerbose ) +void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fReorder, int fVerbose ) { DdManager * dd; int clk, clkBdd, clkSym; + int fGarbCollect = 1; // compute the global functions clk = clock(); - dd = Abc_NtkBuildGlobalBdds( pNtk, 10000000, 1, 1, fVerbose ); + dd = Abc_NtkBuildGlobalBdds( pNtk, 10000000, 1, fReorder, fVerbose ); + printf( "Shared BDD size = %d nodes.\n", Abc_NtkSizeOfGlobalBdds(pNtk) ); Cudd_AutodynDisable( dd ); + if ( !fGarbCollect ) + Cudd_DisableGarbageCollection( dd ); Cudd_zddVarsFromBddVars( dd, 2 ); clkBdd = clock() - clk; // create the collapsed network @@ -97,11 +101,10 @@ clk = clock(); Ntk_NetworkSymmsBdd( dd, pNtk, fNaive, fVerbose ); clkSym = clock() - clk; // undo the global functions -// Abc_NtkFreeGlobalBdds( pNtk ); -// Extra_StopManager( dd ); -// pNtk->pManGlob = NULL; Abc_NtkFreeGlobalBdds( pNtk, 1 ); - +printf( "Statistics of BDD-based symmetry detection:\n" ); +printf( "Algorithm = %s. Reordering = %s. Garbage collection = %s.\n", + fNaive? "naive" : "fast", fReorder? "yes" : "no", fGarbCollect? "yes" : "no" ); PRT( "Constructing BDDs", clkBdd ); PRT( "Computing symms ", clkSym ); PRT( "TOTAL ", clkBdd + clkSym ); |