diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2020-04-07 13:12:46 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2020-04-07 13:12:46 -0700 |
commit | b661fdeee70ecc4b06fc15e90bad9e60048c8f14 (patch) | |
tree | 05eda342081cfcebb40c6e39c6a49cb138c95f06 | |
parent | 2dfadb96072d39f358fdd75e97e30acc6830edca (diff) | |
download | abc-b661fdeee70ecc4b06fc15e90bad9e60048c8f14.tar.gz abc-b661fdeee70ecc4b06fc15e90bad9e60048c8f14.tar.bz2 abc-b661fdeee70ecc4b06fc15e90bad9e60048c8f14.zip |
Adding option to &saveaig to compare AIGs by node count.
-rw-r--r-- | src/base/abci/abc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index cd0bf509..46a77748 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -30605,7 +30605,7 @@ usage: ***********************************************************************/ int Abc_CommandAbc9SaveAig( Abc_Frame_t * pAbc, int argc, char ** argv ) { - int c; + int c, fArea = 0; Extra_UtilGetoptReset(); while ( ( c = Extra_UtilGetopt( argc, argv, "ah" ) ) != EOF ) { @@ -30622,6 +30622,8 @@ int Abc_CommandAbc9SaveAig( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( -1, "Empty network.\n" ); return 1; } + if ( pAbc->pGiaSaved != NULL && Gia_ManAndNum(pAbc->pGiaSaved) <= Gia_ManAndNum(pAbc->pGia) ) + return 0; // save the design as best Gia_ManStopP( &pAbc->pGiaSaved ); pAbc->pGiaSaved = Gia_ManDupWithAttributes( pAbc->pGia ); @@ -30630,6 +30632,7 @@ int Abc_CommandAbc9SaveAig( Abc_Frame_t * pAbc, int argc, char ** argv ) usage: Abc_Print( -2, "usage: &saveaig [-ah]\n" ); Abc_Print( -2, "\t saves the current AIG into the internal storage\n" ); + Abc_Print( -2, "\t-a : toggle saving AIG with the smaller area [default = %s]\n", fArea? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); return 1; } |