mirror of https://github.com/YosysHQ/abc.git
Adding option to &saveaig to compare AIGs by node count.
This commit is contained in:
parent
2dfadb9607
commit
b661fdeee7
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue