diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:05:09 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:05:09 -0700 |
commit | 327078393947f3c2e0b5548e5fada9ee67ef6134 (patch) | |
tree | 31edc870bb31135eae3e2a50551eaa04968474e7 /src/base/abci | |
parent | 4d1bc4a268ad0be95818c718eae82e0be5c9057c (diff) | |
download | abc-327078393947f3c2e0b5548e5fada9ee67ef6134.tar.gz abc-327078393947f3c2e0b5548e5fada9ee67ef6134.tar.bz2 abc-327078393947f3c2e0b5548e5fada9ee67ef6134.zip |
Version abc90813
committer: Baruch Sterin <baruchs@gmail.com>
Diffstat (limited to 'src/base/abci')
-rw-r--r-- | src/base/abci/abc.c | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 50aa938c..789d2714 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -264,6 +264,7 @@ static int Abc_CommandAbc8Balance ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandAbc8Speedup ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc8Merge ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc8Insert ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandAbc8ClpLut ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc8Fraig ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc8Scl ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -598,6 +599,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "ABC8", "*speedup", Abc_CommandAbc8Speedup, 0 ); Cmd_CommandAdd( pAbc, "ABC8", "*merge", Abc_CommandAbc8Merge, 0 ); Cmd_CommandAdd( pAbc, "ABC8", "*insert", Abc_CommandAbc8Insert, 0 ); + Cmd_CommandAdd( pAbc, "ABC8", "*clplut", Abc_CommandAbc8ClpLut, 0 ); Cmd_CommandAdd( pAbc, "ABC8", "*fraig", Abc_CommandAbc8Fraig, 0 ); Cmd_CommandAdd( pAbc, "ABC8", "*scl", Abc_CommandAbc8Scl, 0 ); @@ -21026,6 +21028,50 @@ usage: SideEffects [] + SeeAlso [] + +***********************************************************************/ +int Abc_CommandAbc8ClpLut( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern void * Ntl_ManDupCollapseLuts( void * p ); + void * pNtlNew; + int c; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) + { + switch ( c ) + { + case 'h': + goto usage; + default: + goto usage; + } + } + if ( pAbc->pAbc8Ntl == NULL ) + { + printf( "Abc_CommandAbc8Insert(): There is no design.\n" ); + return 1; + } + pNtlNew = Ntl_ManDupCollapseLuts( pAbc->pAbc8Ntl ); + Abc_FrameClearDesign(); + pAbc->pAbc8Ntl = pNtlNew; + pAbc->pAbc8Aig = Ntl_ManExtract( pAbc->pAbc8Ntl ); + return 0; + +usage: + fprintf( stdout, "usage: *clplut [-h]\n" ); + fprintf( stdout, "\t collapses comb white boxes whose model name begins with \"LUT\"\n" ); + fprintf( stdout, "\t-h : print the command usage\n"); + return 1; +} +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + SeeAlso [] ***********************************************************************/ |