From 19ccaf21df28e87a8f2d4861b1d2b893f34d8be6 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 19 Mar 2017 21:51:03 -0700 Subject: Experiments with new network data-structure. --- src/base/abci/abc.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'src/base/abci') 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 ); @@ -6513,6 +6515,53 @@ usage: return 1; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + 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 [] -- cgit v1.2.3