From 2650f945986192f78af049fc8c11e4be0b327f8b Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 31 Mar 2013 23:09:51 -0700 Subject: Shrink for 6-LUTs. --- src/base/abci/abc.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/base') diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index d972b506..b913e04e 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -26155,7 +26155,8 @@ usage: ***********************************************************************/ int Abc_CommandAbc9Shrink( Abc_Frame_t * pAbc, int argc, char ** argv ) { - Gia_Man_t * pTemp; + Gia_Man_t * pTemp = NULL; + int nLutSize; int c,fVerbose = 0; int fKeepLevel = 0; Extra_UtilGetoptReset(); @@ -26185,8 +26186,15 @@ int Abc_CommandAbc9Shrink( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Abc_CommandAbc9Shrink(): Mapping of the AIG is not defined.\n" ); return 1; } - pTemp = Gia_ManPerformMapShrink( pAbc->pGia, fKeepLevel, fVerbose ); - Abc_FrameUpdateGia( pAbc, pTemp ); + nLutSize = Gia_ManLutSizeMax( pAbc->pGia ); + if ( nLutSize <= 4 ) + pTemp = Gia_ManPerformMapShrink( pAbc->pGia, fKeepLevel, fVerbose ); + else if ( nLutSize <= 6 ) + pTemp = Gia_ManMapShrink6( pAbc->pGia, fKeepLevel, fVerbose ); + else + Abc_Print( -1, "Abc_CommandAbc9Shrink(): Works only for 4-LUTs and 6-LUTs.\n" ); + if ( pTemp ) + Abc_FrameUpdateGia( pAbc, pTemp ); return 0; usage: -- cgit v1.2.3