From 198fe99416cdc4cb8ec131f190024bb1d5608efa Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 5 Sep 2016 23:47:58 +0300 Subject: Experimental code for polynomial construction. --- src/base/abci/abc.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src/base') diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 2eb3f0b5..151d05c9 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -476,6 +476,7 @@ static int Abc_CommandAbc9PoXsim ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandAbc9Demiter ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Fadds ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Polyn ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandAbc9ATree ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Acec ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Esop ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Exorcism ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -1116,6 +1117,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "ABC9", "&demiter", Abc_CommandAbc9Demiter, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&fadds", Abc_CommandAbc9Fadds, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&polyn", Abc_CommandAbc9Polyn, 0 ); + Cmd_CommandAdd( pAbc, "ABC9", "&atree", Abc_CommandAbc9ATree, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&acec", Abc_CommandAbc9Acec, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&esop", Abc_CommandAbc9Esop, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&exorcism", Abc_CommandAbc9Exorcism, 0 ); @@ -40175,6 +40177,57 @@ usage: return 1; } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Abc_CommandAbc9ATree( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern Gia_Man_t * Gia_PolynCoreDetectTest( Gia_Man_t * pGia ); + Gia_Man_t * pTemp = NULL; + int c, fVerbose = 0, fVeryVerbose = 0; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "vwh" ) ) != EOF ) + { + switch ( c ) + { + case 'v': + fVerbose ^= 1; + break; + case 'w': + fVeryVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } + if ( pAbc->pGia == NULL ) + { + Abc_Print( -1, "Abc_CommandAbc9Esop(): There is no AIG.\n" ); + return 0; + } + pTemp = Gia_PolynCoreDetectTest( pAbc->pGia ); + Abc_FrameUpdateGia( pAbc, pTemp ); + return 0; + +usage: + Abc_Print( -2, "usage: &atree [-vwh]\n" ); + Abc_Print( -2, "\t extracts adder tree rooting in primary outputs\n" ); + Abc_Print( -2, "\t-v : toggles printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); + Abc_Print( -2, "\t-w : toggles printing very verbose information [default = %s]\n", fVeryVerbose? "yes": "no" ); + Abc_Print( -2, "\t-h : print the command usage\n"); + return 1; +} + /**Function************************************************************* Synopsis [] -- cgit v1.2.3 From ca93730781ac2a6559e16a6203786073b1cbd514 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 5 Sep 2016 23:54:44 +0300 Subject: Experimental code for polynomial construction. --- src/base/exor/exor.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/base') diff --git a/src/base/exor/exor.c b/src/base/exor/exor.c index 052362e5..2310de5f 100644 --- a/src/base/exor/exor.c +++ b/src/base/exor/exor.c @@ -78,6 +78,7 @@ extern int s_fDecreaseLiterals; SeeAlso [] ***********************************************************************/ +/* static int QCost[16][16] = { { 1}, // 0 @@ -90,6 +91,7 @@ static int QCost[16][16] = { 56, 56, 56, 56, 58, 60, 62, 64}, // 7 { 0 } }; +*/ int GetQCost( int nVars, int nNegs ) { int Extra; -- cgit v1.2.3