Adding option to &saveaig to compare AIGs by node count.

This commit is contained in:
Alan Mishchenko 2020-04-07 13:12:46 -07:00
parent 2dfadb9607
commit b661fdeee7
1 changed files with 4 additions and 1 deletions

View File

@ -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;
}