diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2017-07-21 12:38:18 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2017-07-21 12:38:18 +0700 |
commit | 9ff1776d06fdf83cd7deffda858a57dba0a4d0f9 (patch) | |
tree | 19d668c9e8158062290b7d0e2a1d39ef2faff453 /src/aig | |
parent | c19d2289f2c9996679180d21b8f14de0bbde968a (diff) | |
download | abc-9ff1776d06fdf83cd7deffda858a57dba0a4d0f9.tar.gz abc-9ff1776d06fdf83cd7deffda858a57dba0a4d0f9.tar.bz2 abc-9ff1776d06fdf83cd7deffda858a57dba0a4d0f9.zip |
Experiments with logic optimization.
Diffstat (limited to 'src/aig')
-rw-r--r-- | src/aig/gia/giaScript.c | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/src/aig/gia/giaScript.c b/src/aig/gia/giaScript.c index 56733167..fcf97511 100644 --- a/src/aig/gia/giaScript.c +++ b/src/aig/gia/giaScript.c @@ -719,6 +719,60 @@ void Gia_ManPerformFlow2( int fIsMapped, int nAnds, int nLevels, int nLutSize, i } +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +void Gia_ManPerformFlow3( int nLutSize, int nCutNum, int fBalance, int fMinAve, int fUseMfs, int fUseLutLib, int fVerbose ) +{ + char Comm1[200], Comm2[200], Comm3[200]; + if ( fUseLutLib ) + sprintf( Comm1, "&st; &if -C %d; &save; &st; &syn2; &if -C %d; &save; &load", nCutNum, nCutNum ); + else + sprintf( Comm1, "&st; &if -C %d -K %d; &save; &st; &syn2; &if -C %d -K %d; &save; &load", nCutNum, nLutSize, nCutNum, nLutSize ); + if ( fUseLutLib ) + sprintf( Comm2, "&st; &if -%s -K 6; &dch -f; &if -C %d; %s&save; &load", Abc_NtkRecIsRunning3() ? "y" : "g", nCutNum, fUseMfs ? "&mfs; ":"" ); + else + sprintf( Comm2, "&st; &if -%s -K 6; &dch -f; &if -C %d -K %d; %s&save; &load", Abc_NtkRecIsRunning3() ? "y" : "g", nCutNum, nLutSize, fUseMfs ? "&mfs; ":"" ); + if ( fUseLutLib ) + sprintf( Comm3, "&st; &if -%s -K 6; &synch2; &if -C %d; %s&save; &load", Abc_NtkRecIsRunning3() ? "y" : "g", nCutNum, fUseMfs ? "&mfs; ":"" ); + else + sprintf( Comm3, "&st; &if -%s -K 6; &synch2; &if -C %d -K %d; %s&save; &load", Abc_NtkRecIsRunning3() ? "y" : "g", nCutNum, nLutSize, fUseMfs ? "&mfs; ":"" ); + + if ( fVerbose ) printf( "Trying simple synthesis with %s...\n", Abc_NtkRecIsRunning3() ? "LMS" : "SOP balancing" ); + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Comm1 ); + if ( fVerbose ) + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); + + if ( Gia_ManAndNum( Abc_FrameReadGia(Abc_FrameGetGlobalFrame()) ) < 200000 ) + { + if ( fVerbose ) printf( "Trying medium synthesis...\n" ); + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Comm2 ); + if ( fVerbose ) + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); + } + + if ( Gia_ManAndNum( Abc_FrameReadGia(Abc_FrameGetGlobalFrame()) ) < 10000 ) + { + if ( fVerbose ) printf( "Trying harder synthesis...\n" ); + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Comm3 ); + if ( fVerbose ) + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); + } + + if ( fVerbose ) printf( "Final result...\n" ); + if ( fVerbose ) + Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); +} + + //////////////////////////////////////////////////////////////////////// /// END OF FILE /// |