summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
authorMathias Soeken <mathias.soeken@gmail.com>2016-09-09 11:49:43 +0200
committerMathias Soeken <mathias.soeken@gmail.com>2016-09-09 11:49:43 +0200
commitb11406c566c72974d7bde310feca6792953d5802 (patch)
tree415126c7be68d2431a06a44a9dbe9451449ac10b /src/base/abci
parenta46af9de7b8fd6465f4a89e0842bf8f3313b06b0 (diff)
parentca93730781ac2a6559e16a6203786073b1cbd514 (diff)
downloadabc-b11406c566c72974d7bde310feca6792953d5802.tar.gz
abc-b11406c566c72974d7bde310feca6792953d5802.tar.bz2
abc-b11406c566c72974d7bde310feca6792953d5802.zip
Merged alanmi/abc into default
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abc.c53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 97d6b157..8322f27c 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 );
@@ -40236,6 +40238,57 @@ usage:
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 []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
int Abc_CommandAbc9Acec( Abc_Frame_t * pAbc, int argc, char ** argv )
{
FILE * pFile;