mirror of https://github.com/YosysHQ/abc.git
Adding a random seed to control randomness in 'permute' (correction).
This commit is contained in:
parent
b2ca837521
commit
66098723eb
|
|
@ -23730,6 +23730,8 @@ int Abc_CommandPermute( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
goto usage;
|
goto usage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ( Seed >= 0 )
|
||||||
|
srand( (unsigned)Seed );
|
||||||
if ( pNtk == NULL )
|
if ( pNtk == NULL )
|
||||||
{
|
{
|
||||||
Abc_Print( -1, "Empty network.\n" );
|
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" );
|
Abc_Print( -1, "Command \"permute\" has failed.\n" );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if ( Seed >= 0 )
|
|
||||||
srand( (unsigned)Seed );
|
|
||||||
Abc_NtkPermute( pNtkRes, fInputs, fOutputs, fFlops, pFlopPermFile );
|
Abc_NtkPermute( pNtkRes, fInputs, fOutputs, fFlops, pFlopPermFile );
|
||||||
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes );
|
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkRes );
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue