diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-08-16 11:54:49 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-08-16 11:54:49 -0700 |
commit | 06100279cdf00acc67a3e08da389220d6dc47f92 (patch) | |
tree | 47b35bc331b1ecebacb3d4fc3bec60aa0475e8f7 /src/base/abci | |
parent | c8bfe83e55cf008554161ab69a7545775e14c10d (diff) | |
download | abc-06100279cdf00acc67a3e08da389220d6dc47f92.tar.gz abc-06100279cdf00acc67a3e08da389220d6dc47f92.tar.bz2 abc-06100279cdf00acc67a3e08da389220d6dc47f92.zip |
Added DSD-based collapsing &dsd.
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 6ca352cd..5702b9fe 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -347,6 +347,7 @@ static int Abc_CommandAbc9Frames ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandAbc9Retime ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Enable ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Dc2 ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandAbc9Dsd ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Bidec ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Shrink ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Fx ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -929,6 +930,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "ABC9", "&retime", Abc_CommandAbc9Retime, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&enable", Abc_CommandAbc9Enable, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&dc2", Abc_CommandAbc9Dc2, 0 ); + Cmd_CommandAdd( pAbc, "ABC9", "&dsd", Abc_CommandAbc9Dsd, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&bidec", Abc_CommandAbc9Bidec, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&shrink", Abc_CommandAbc9Shrink, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&fx", Abc_CommandAbc9Fx, 0 ); @@ -27521,6 +27523,58 @@ usage: SeeAlso [] ***********************************************************************/ +int Abc_CommandAbc9Dsd( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern Gia_Man_t * Gia_ManCollapseTest( Gia_Man_t * p, int fVerbose ); + Gia_Man_t * pTemp; + int c, fVerbose = 0; + int fUpdateLevel = 1; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "lvh" ) ) != EOF ) + { + switch ( c ) + { + case 'l': + fUpdateLevel ^= 1; + break; + case 'v': + fVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } + if ( pAbc->pGia == NULL ) + { + Abc_Print( -1, "Abc_CommandAbc9Dsd(): There is no AIG.\n" ); + return 1; + } + pTemp = Gia_ManCollapseTest( pAbc->pGia, fVerbose ); + Abc_FrameUpdateGia( pAbc, pTemp ); + return 0; + +usage: + Abc_Print( -2, "usage: &dsd [-vh]\n" ); + Abc_Print( -2, "\t performs DSD-based collapsing\n" ); +// Abc_Print( -2, "\t-l : toggle level update during rewriting [default = %s]\n", fUpdateLevel? "yes": "no" ); + 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_CommandAbc9Bidec( Abc_Frame_t * pAbc, int argc, char ** argv ) { Gia_Man_t * pTemp; |