diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-29 10:10:21 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2013-07-29 10:10:21 -0700 |
commit | 4c6804c3aea08f6aec693c686ec409191e983ca4 (patch) | |
tree | f0153e44ffd69a9e576084157a21929f3e512a53 /src/map/scl/scl.c | |
parent | a206287b21632331eb6c433a8c1854a6baecbe40 (diff) | |
download | abc-4c6804c3aea08f6aec693c686ec409191e983ca4.tar.gz abc-4c6804c3aea08f6aec693c686ec409191e983ca4.tar.bz2 abc-4c6804c3aea08f6aec693c686ec409191e983ca4.zip |
Improved gate-sizing.
Diffstat (limited to 'src/map/scl/scl.c')
-rw-r--r-- | src/map/scl/scl.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index eaff6a31..ea8731c4 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -556,11 +556,12 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Ntk_t * pNtkRes; int Degree, fUseInvs; int c, fVerbose; + int fOldAlgo = 0; Degree = 4; fUseInvs = 0; fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "Nivh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "Naivh" ) ) != EOF ) { switch ( c ) { @@ -575,6 +576,9 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( Degree < 0 ) goto usage; break; + case 'a': + fOldAlgo ^= 1; + break; case 'i': fUseInvs ^= 1; break; @@ -600,7 +604,10 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) } // modify the current network - pNtkRes = Abc_SclPerformBuffering( pNtk, Degree, fUseInvs, fVerbose ); + if ( fOldAlgo ) + pNtkRes = Abc_SclPerformBuffering( pNtk, Degree, fUseInvs, fVerbose ); + else + pNtkRes = Abc_SclBufPerform( pNtk, fVerbose ); if ( pNtkRes == NULL ) { Abc_Print( -1, "The command has failed.\n" ); @@ -611,9 +618,10 @@ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) return 0; usage: - fprintf( pAbc->Err, "usage: buffer [-N num] [-ivh]\n" ); + fprintf( pAbc->Err, "usage: buffer [-N num] [-aivh]\n" ); fprintf( pAbc->Err, "\t performs buffering of the mapped network\n" ); fprintf( pAbc->Err, "\t-N <num> : the max allowed fanout count of node/buffer [default = %d]\n", Degree ); + fprintf( pAbc->Err, "\t-a : toggle using old algorithm [default = %s]\n", fOldAlgo? "yes": "no" ); fprintf( pAbc->Err, "\t-i : toggle using interters instead of buffers [default = %s]\n", fUseInvs? "yes": "no" ); fprintf( pAbc->Err, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); fprintf( pAbc->Err, "\t-h : print the command usage\n"); |