diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-06 21:21:02 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-06 21:21:02 -0800 |
commit | 839632140e675c628e08a00dc904b6d7cb877ba0 (patch) | |
tree | f3e3e56731ff865b386fba02cf9184a1aa420d15 /src/base/abci/abc.c | |
parent | 5b3d4b7de254df3213d1ded6dc1658bce54ad1bb (diff) | |
download | abc-839632140e675c628e08a00dc904b6d7cb877ba0.tar.gz abc-839632140e675c628e08a00dc904b6d7cb877ba0.tar.bz2 abc-839632140e675c628e08a00dc904b6d7cb877ba0.zip |
Changes to LUT mappers.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r-- | src/base/abci/abc.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 9c8a2972..109f5ce3 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -235,6 +235,7 @@ static int Abc_CommandDsdSave ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandDsdLoad ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandDsdFree ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandDsdPs ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandDsdTune ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandScut ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandInit ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -793,6 +794,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "FPGA mapping", "dsd_load", Abc_CommandDsdLoad, 0 ); Cmd_CommandAdd( pAbc, "FPGA mapping", "dsd_free", Abc_CommandDsdFree, 0 ); Cmd_CommandAdd( pAbc, "FPGA mapping", "dsd_ps", Abc_CommandDsdPs, 0 ); + Cmd_CommandAdd( pAbc, "FPGA mapping", "dsd_tune", Abc_CommandDsdTune, 0 ); // Cmd_CommandAdd( pAbc, "Sequential", "scut", Abc_CommandScut, 0 ); Cmd_CommandAdd( pAbc, "Sequential", "init", Abc_CommandInit, 1 ); @@ -15559,6 +15561,70 @@ usage: return 1; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Abc_CommandDsdTune( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + int c, fVerbose = 0, fFast = 0, fSpec = 0, LutSize = 0; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "Kfsvh" ) ) != EOF ) + { + switch ( c ) + { + case 'K': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-K\" should be followed by a floating point number.\n" ); + goto usage; + } + LutSize = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( LutSize < 4 || LutSize > 6 ) + goto usage; + break; + case 'f': + fFast ^= 1; + break; + case 's': + fSpec ^= 1; + break; + case 'v': + fVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } + if ( !Abc_FrameReadManDsd() ) + { + Abc_Print( 1, "The DSD manager is not started.\n" ); + return 0; + } + If_DsdManTune( (If_DsdMan_t *)Abc_FrameReadManDsd(), LutSize, fFast, fSpec, fVerbose ); + return 0; + +usage: + Abc_Print( -2, "usage: dsd_tune [-K num] [-fsvh]\n" ); + Abc_Print( -2, "\t tunes DSD manager for the given LUT size\n" ); + Abc_Print( -2, "\t-K num : LUT size used for tuning [default = %d]\n", LutSize ); + Abc_Print( -2, "\t-f : toggles using fast check [default = %s]\n", fFast? "yes": "no" ); + Abc_Print( -2, "\t-s : toggles using specialized check [default = %s]\n", fSpec? "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"); + return 1; +} + /**Function************************************************************* |