Adding a random seed to control randomness in 'permute' (correction).

This commit is contained in:
Alan Mishchenko 2021-03-11 17:50:56 -10:00
parent b2ca837521
commit 66098723eb
1 changed files with 2 additions and 2 deletions

View File

@ -23730,6 +23730,8 @@ int Abc_CommandPermute( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage;
}
}
if ( Seed >= 0 )
srand( (unsigned)Seed );
if ( pNtk == NULL )
{
Abc_Print( -1, "Empty network.\n" );
@ -23759,8 +23761,6 @@ int Abc_CommandPermute( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Command \"permute\" has failed.\n" );
return 1;
}
if ( Seed >= 0 )
srand( (unsigned)Seed );
Abc_NtkPermute( pNtkRes, fInputs, fOutputs, fFlops, pFlopPermFile );
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes );
return 0;