From 19a4bb930edcfc7910388bb08fd86482b9dd35e7 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Wed, 23 Sep 2015 15:24:25 -0700 Subject: Threshold logic checking code by Augusto Neutzling and Jody Matos. --- src/base/abci/abc.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/base') diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index e1dd7bb4..f9af09e9 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -16724,11 +16724,11 @@ 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 fVerbose ); + 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, fVerbose = 0; + int c, nLimit = 0, nLutSize = -1, fCleanOccur = 0, fCleanMarks = 0, fInvMarks = 0, fUnate = 0, fThresh = 0, fThreshHeuristic = 0, fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "LKomiutvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "LKomiutsvh" ) ) != EOF ) { switch ( c ) { @@ -16765,6 +16765,9 @@ int Abc_CommandDsdFilter( Abc_Frame_t * pAbc, int argc, char ** argv ) case 't': fThresh ^= 1; break; + case 's': + fThreshHeuristic ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -16789,14 +16792,11 @@ int Abc_CommandDsdFilter( Abc_Frame_t * pAbc, int argc, char ** argv ) If_DsdManCleanMarks( pDsd, fVerbose ); if ( fInvMarks ) If_DsdManInvertMarks( pDsd, fVerbose ); - if ( fUnate ) - Id_DsdManTuneThresh( pDsd, 1, 0, fVerbose ); - if ( fThresh ) - Id_DsdManTuneThresh( pDsd, 0, 1, fVerbose ); + Id_DsdManTuneThresh( pDsd, fUnate, fThresh, fThreshHeuristic, fVerbose ); return 0; usage: - Abc_Print( -2, "usage: dsd_filter [-LK num] [-omiutvh]\n" ); + Abc_Print( -2, "usage: dsd_filter [-LK num] [-omiutsvh]\n" ); Abc_Print( -2, "\t filtering structured and modifying parameters of DSD manager\n" ); Abc_Print( -2, "\t-L num : remove structures with fewer occurrences that this [default = %d]\n", nLimit ); Abc_Print( -2, "\t-K num : new LUT size to set for the DSD manager [default = %d]\n", nLutSize ); @@ -16805,8 +16805,15 @@ usage: Abc_Print( -2, "\t-i : toggles inverting matching marks [default = %s]\n", fInvMarks? "yes": "no" ); Abc_Print( -2, "\t-u : toggles marking unate functions [default = %s]\n", fUnate? "yes": "no" ); Abc_Print( -2, "\t-t : toggles marking threshold functions [default = %s]\n", fThresh? "yes": "no" ); + Abc_Print( -2, "\t-s : toggles marking threshold functions heuristically [default = %s]\n", fThreshHeuristic?"yes":"no"); Abc_Print( -2, "\t-v : toggles verbose output [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); + Abc_Print( -2, "\t \n" ); + Abc_Print( -2, "\t Option \"dsd_filter -s\" was contributed by Augusto Neutzling and Jody Matos from\n" ); + Abc_Print( -2, "\t Federal University of Rio Grande do Sul, Brazil. The paper describing the method:\n" ); + Abc_Print( -2, "\t A. Neutzling, J. M. Matos, A. Mishchenko, R. Ribas, and A. Reis,\n" ); + Abc_Print( -2, "\t \"Threshold logic synthesis based on cut pruning\". Proc. ICCAD 2015.\n" ); +// Abc_Print( -2, "\t http://www.eecs.berkeley.edu/~alanmi/publications/2015/iccad15_thresh.pdf\n" ); return 1; } -- cgit v1.2.3