From 0145b0ca724ba866480a3edcc1292cdf04117d6f Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 16 Oct 2015 18:34:06 -0700 Subject: [PATCH] Moving BDD-based threshold function detection to the BDD part of the code. --- abclib.dsp | 8 ++++---- src/base/abci/abc.c | 3 ++- .../extraUtilThresh.c => bdd/extrab/extraBddThresh.c} | 4 ++-- src/bdd/extrab/module.make | 1 + src/map/if/if.h | 1 + src/map/if/ifDsd.c | 8 ++++++++ src/misc/extra/module.make | 1 - 7 files changed, 18 insertions(+), 8 deletions(-) rename src/{misc/extra/extraUtilThresh.c => bdd/extrab/extraBddThresh.c} (99%) diff --git a/abclib.dsp b/abclib.dsp index 722f13e83..93a71ea9e 100644 --- a/abclib.dsp +++ b/abclib.dsp @@ -987,6 +987,10 @@ SOURCE=.\src\bdd\extrab\extraBddSymm.c # End Source File # Begin Source File +SOURCE=.\src\bdd\extrab\extraBddThresh.c +# End Source File +# Begin Source File + SOURCE=.\src\bdd\extrab\extraBddTime.c # End Source File # Begin Source File @@ -3119,10 +3123,6 @@ SOURCE=.\src\misc\extra\extraUtilSupp.c # End Source File # Begin Source File -SOURCE=.\src\misc\extra\extraUtilThresh.c -# End Source File -# Begin Source File - SOURCE=.\src\misc\extra\extraUtilTruth.c # End Source File # Begin Source File diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 187fcf896..d6a9b1ccc 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -16941,7 +16941,6 @@ usage: ***********************************************************************/ int Abc_CommandDsdFilter( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern void Id_DsdManTuneThresh( If_DsdMan_t * p, int fUnate, int fThresh, int fThreshHeuristic, int fVerbose ); If_DsdMan_t * pDsd = (If_DsdMan_t *)Abc_FrameReadManDsd(); int c, nLimit = 0, nLutSize = -1, fCleanOccur = 0, fCleanMarks = 0, fInvMarks = 0, fUnate = 0, fThresh = 0, fThreshHeuristic = 0, fVerbose = 0; Extra_UtilGetoptReset(); @@ -17009,8 +17008,10 @@ int Abc_CommandDsdFilter( Abc_Frame_t * pAbc, int argc, char ** argv ) If_DsdManCleanMarks( pDsd, fVerbose ); if ( fInvMarks ) If_DsdManInvertMarks( pDsd, fVerbose ); +#ifdef ABC_USE_CUDD else Id_DsdManTuneThresh( pDsd, fUnate, fThresh, fThreshHeuristic, fVerbose ); +#endif return 0; usage: diff --git a/src/misc/extra/extraUtilThresh.c b/src/bdd/extrab/extraBddThresh.c similarity index 99% rename from src/misc/extra/extraUtilThresh.c rename to src/bdd/extrab/extraBddThresh.c index 6633381c6..511fc24b7 100644 --- a/src/misc/extra/extraUtilThresh.c +++ b/src/bdd/extrab/extraBddThresh.c @@ -1,6 +1,6 @@ /**CFile**************************************************************** - FileName [extraUtilThresh.c] + FileName [extraBddThresh.c] SystemName [ABC: Logic synthesis and verification system.] @@ -14,7 +14,7 @@ Date [Ver. 1.0. Started - October 7, 2014.] - Revision [$Id: extraUtilThresh.c,v 1.0 2014/10/07 00:00:00 alanmi Exp $] + Revision [$Id: extraBddThresh.c,v 1.0 2014/10/07 00:00:00 alanmi Exp $] ***********************************************************************/ diff --git a/src/bdd/extrab/module.make b/src/bdd/extrab/module.make index 38cdddb6a..8369315cb 100644 --- a/src/bdd/extrab/module.make +++ b/src/bdd/extrab/module.make @@ -4,5 +4,6 @@ SRC += src/bdd/extrab/extraBddAuto.c \ src/bdd/extrab/extraBddKmap.c \ src/bdd/extrab/extraBddMisc.c \ src/bdd/extrab/extraBddSymm.c \ + src/misc/extra/extraBddThresh.c \ src/bdd/extrab/extraBddTime.c \ src/bdd/extrab/extraBddUnate.c diff --git a/src/map/if/if.h b/src/map/if/if.h index 214eda88e..55f28fabc 100644 --- a/src/map/if/if.h +++ b/src/map/if/if.h @@ -576,6 +576,7 @@ extern char * If_DsdManGetCellStr( If_DsdMan_t * p ); extern unsigned If_DsdManCheckXY( If_DsdMan_t * p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose ); extern int If_CutDsdBalanceEval( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vAig ); extern int If_CutDsdBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm ); +extern void Id_DsdManTuneThresh( If_DsdMan_t * p, int fUnate, int fThresh, int fThreshHeuristic, int fVerbose ); /*=== ifLib.c =============================================================*/ extern If_LibLut_t * If_LibLutRead( char * FileName ); extern If_LibLut_t * If_LibLutDup( If_LibLut_t * p ); diff --git a/src/map/if/ifDsd.c b/src/map/if/ifDsd.c index 5d9077c3b..f70f2177a 100644 --- a/src/map/if/ifDsd.c +++ b/src/map/if/ifDsd.c @@ -26,6 +26,10 @@ #include "aig/gia/gia.h" #include "bool/kit/kit.h" +#ifdef ABC_USE_CUDD +#include "bdd/extrab/extraBdd.h" +#endif + #ifdef ABC_USE_PTHREADS #ifdef _WIN32 @@ -2761,6 +2765,8 @@ void Id_DsdManTuneStr( If_DsdMan_t * p, char * pStruct, int nConfls, int nProcs, SeeAlso [] ***********************************************************************/ +#ifdef ABC_USE_CUDD + void Id_DsdManTuneThresh( If_DsdMan_t * p, int fUnate, int fThresh, int fThreshHeuristic, int fVerbose ) { extern int Extra_ThreshCheck( word * t, int nVars, int * pW ); @@ -2821,6 +2827,8 @@ void Id_DsdManTuneThresh( If_DsdMan_t * p, int fUnate, int fThresh, int fThreshH If_DsdManPrintDistrib( p ); } +#endif // ABC_USE_CUDD are used + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// //////////////////////////////////////////////////////////////////////// diff --git a/src/misc/extra/module.make b/src/misc/extra/module.make index 5c1276e3a..e9bd782e2 100644 --- a/src/misc/extra/module.make +++ b/src/misc/extra/module.make @@ -10,6 +10,5 @@ SRC += src/misc/extra/extraUtilBitMatrix.c \ src/misc/extra/extraUtilProgress.c \ src/misc/extra/extraUtilReader.c \ src/misc/extra/extraUtilSupp.c \ - src/misc/extra/extraUtilThresh.c \ src/misc/extra/extraUtilTruth.c \ src/misc/extra/extraUtilUtil.c