Re: [OpenSTA-devel] Re: When is Random not random?
Brought to you by:
dansut
|
From: Mark E. <ma...@bo...> - 2006-01-06 08:15:50
|
Daniel Sutcliffe wrote: > Peter Wickersham wrote: >>So, I looked at the source and the code appears to use srand() >>everytime it calls rand() with the last result from calling rand(). >>However, this actually ends up producing more collisions more >>quickly than just calling srand() once. > > > Can you give us a source file and line number to save me a little bit > of work? I'm only just getting into the inner workings of SCL - the > previous SCL internals expert no longer has time to give to this > project. > This will be the variable handling at runtime, in both CECRangeVar.cpp and CECListVar.cpp. The seed generated at the start of the variable use should bring in a semi random element (see comments in CECVar::GetRandomSeed()). Obviously not enough :-) Can't remember if the options passed at variable contruction will allow a runtime descision as to if this is REPEATABLE RANDOM or not though. Can probably have a look later if no one else gets a chance. Mark |