diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-03-19 21:51:03 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-03-19 21:51:03 -0700 |
commit | 19ccaf21df28e87a8f2d4861b1d2b893f34d8be6 (patch) | |
tree | 84c14c14b01e2f3c4dbfd7bc66f5dd5367b3f4c1 /src/base/abci | |
parent | 3329086947832ae10ec376f5b69118c357b508d4 (diff) | |
download | abc-19ccaf21df28e87a8f2d4861b1d2b893f34d8be6.tar.gz abc-19ccaf21df28e87a8f2d4861b1d2b893f34d8be6.tar.bz2 abc-19ccaf21df28e87a8f2d4861b1d2b893f34d8be6.zip |
Experiments with new network data-structure.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 69bd14e6..00b11c18 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -130,6 +130,7 @@ static int Abc_CommandMerge ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandTestDec ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandTestNpn ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandTestRPO ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandTestRun ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandRewrite ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandRefactor ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -785,6 +786,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "Synthesis", "testdec", Abc_CommandTestDec, 0 ); Cmd_CommandAdd( pAbc, "Synthesis", "testnpn", Abc_CommandTestNpn, 0 ); Cmd_CommandAdd( pAbc, "LogiCS", "testrpo", Abc_CommandTestRPO, 0 ); + Cmd_CommandAdd( pAbc, "Synthesis", "testrun", Abc_CommandTestRun, 0 ); Cmd_CommandAdd( pAbc, "Synthesis", "rewrite", Abc_CommandRewrite, 1 ); Cmd_CommandAdd( pAbc, "Synthesis", "refactor", Abc_CommandRefactor, 1 ); @@ -6524,6 +6526,53 @@ usage: SeeAlso [] ***********************************************************************/ +int Abc_CommandTestRun( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern void Acb_NtkTestRun( char * pFileNames[3], int fVerbose ); + int c, fVerbose = 0; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) + { + switch ( c ) + { + case 'v': + fVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } +// pArgvNew = argv + globalUtilOptind; +// nArgcNew = argc - globalUtilOptind; + if ( argc - globalUtilOptind != 3 ) + { + Abc_Print( 1, "Expecting three file names on the command line.\n" ); + goto usage; + } + Acb_NtkTestRun( argv + globalUtilOptind, fVerbose ); + return 0; + +usage: + Abc_Print( -2, "usage: testrun [-vh]\n" ); + Abc_Print( -2, "\t performs testing by running internal procedures\n" ); + Abc_Print( -2, "\t-v : toggle printing verbose information [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_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); |