diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-12-14 20:13:56 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-12-14 20:13:56 -0800 |
commit | 53d4d6513cb285f49ec5fe4c8211738cd52aad52 (patch) | |
tree | 8aed68266613ddcd9a898a9b6f2c829a3f51691f /src/base | |
parent | e73fca371023c25e17dab0ae4f1b555b64d68df0 (diff) | |
download | abc-53d4d6513cb285f49ec5fe4c8211738cd52aad52.tar.gz abc-53d4d6513cb285f49ec5fe4c8211738cd52aad52.tar.bz2 abc-53d4d6513cb285f49ec5fe4c8211738cd52aad52.zip |
Adding experimental command.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 96432812..29673aef 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -524,6 +524,7 @@ static int Abc_CommandAbc9Esop ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandAbc9Exorcism ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Mfs ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Mfsd ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandAbc9DeepSyn ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9PoPart2 ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9CexCut ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9CexMerge ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -1227,6 +1228,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "ABC9", "&exorcism", Abc_CommandAbc9Exorcism, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&mfs", Abc_CommandAbc9Mfs, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&mfsd", Abc_CommandAbc9Mfsd, 0 ); + Cmd_CommandAdd( pAbc, "ABC9", "&deepsyn", Abc_CommandAbc9DeepSyn, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&cexmerge", Abc_CommandAbc9CexMerge, 0 ); @@ -44893,6 +44895,76 @@ usage: SeeAlso [] ***********************************************************************/ +int Abc_CommandAbc9DeepSyn( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern Gia_Man_t * Gia_ManDeepSyn( Gia_Man_t * pGia, int TimeOut, int nAnds, int fVerbose ); + Gia_Man_t * pTemp; int c, TimeOut = 0, nAnds = 0, fVerbose = 0; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "TAvh" ) ) != EOF ) + { + switch ( c ) + { + case 'T': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-T\" should be followed by an integer.\n" ); + goto usage; + } + TimeOut = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( TimeOut < 0 ) + goto usage; + break; + case 'A': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-A\" should be followed by an integer.\n" ); + goto usage; + } + nAnds = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( nAnds < 0 ) + goto usage; + break; + case 'v': + fVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } + if ( pAbc->pGia == NULL ) + { + Abc_Print( -1, "Abc_CommandAbc9DeepSyn(): There is no AIG.\n" ); + return 0; + } + pTemp = Gia_ManDeepSyn( pAbc->pGia, TimeOut, nAnds, fVerbose ); + Abc_FrameUpdateGia( pAbc, pTemp ); + return 0; + +usage: + Abc_Print( -2, "usage: &deepsyn [-TA <num>] [-vh]\n" ); + Abc_Print( -2, "\t performs synthesis\n" ); + Abc_Print( -2, "\t-T <num> : the timeout in seconds (0 = no timeout) [default = %d]\n", TimeOut ); + Abc_Print( -2, "\t-A <num> : the number of nodes to stop (0 = no limit) [default = %d]\n", nAnds ); + Abc_Print( -2, "\t-v : toggle printing optimization summary [default = %s]\n", fVerbose? "yes": "no" ); + Abc_Print( -2, "\t-h : print the command usage\n"); + return 1; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv ) { return -1; |