summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abc.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-04-21 17:15:08 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2019-04-21 17:15:08 -0700
commit14a1ea844764de72a3935bc49f55d6170958aa27 (patch)
tree48062cf2e15bec62db83c6b02d16e0d911e0218e /src/base/abci/abc.c
parentcd0102f61e89e3d12281d026e5a26820cec4aed5 (diff)
downloadabc-14a1ea844764de72a3935bc49f55d6170958aa27.tar.gz
abc-14a1ea844764de72a3935bc49f55d6170958aa27.tar.bz2
abc-14a1ea844764de72a3935bc49f55d6170958aa27.zip
Adding switch &st -s for MUX restructring.
Diffstat (limited to 'src/base/abci/abc.c')
-rw-r--r--src/base/abci/abc.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 77d11cd1..6ece3b64 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -30995,14 +30995,16 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Strash( Abc_Frame_t * pAbc, int argc, char ** argv )
{
+ extern Gia_Man_t * Gia_ManDupMuxRestructure( Gia_Man_t * p );
Gia_Man_t * pTemp;
int c, Limit = 2;
int fAddStrash = 0;
int fCollapse = 0;
int fAddMuxes = 0;
+ int fStrMuxes = 0;
int fRehashMap = 0;
Extra_UtilGetoptReset();
- while ( ( c = Extra_UtilGetopt( argc, argv, "Lacmrh" ) ) != EOF )
+ while ( ( c = Extra_UtilGetopt( argc, argv, "Lacmrsh" ) ) != EOF )
{
switch ( c )
{
@@ -31029,6 +31031,9 @@ int Abc_CommandAbc9Strash( Abc_Frame_t * pAbc, int argc, char ** argv )
case 'r':
fRehashMap ^= 1;
break;
+ case 's':
+ fStrMuxes ^= 1;
+ break;
case 'h':
goto usage;
default:
@@ -31040,7 +31045,15 @@ int Abc_CommandAbc9Strash( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Strash(): There is no AIG.\n" );
return 1;
}
- if ( Gia_ManHasMapping(pAbc->pGia) && fRehashMap )
+ if ( fStrMuxes )
+ {
+ if ( Gia_ManHasMapping(pAbc->pGia) )
+ Abc_Print( 0, "Restructing the current AIG destroys the LUT mapping.\n" );
+ Vec_IntFreeP( &pAbc->pGia->vMapping );
+ pTemp = Gia_ManDupMuxRestructure( pAbc->pGia );
+ Abc_Print( 1, "Finished AIG restructing to enable efficient mapping of 4:1 MUXes into 4-LUTs.\n" );
+ }
+ else if ( Gia_ManHasMapping(pAbc->pGia) && fRehashMap )
{
pTemp = Gia_ManDupHashMapping( pAbc->pGia );
Gia_ManTransferPacking( pTemp, pAbc->pGia );