Forum Discussion
Altera_Forum
Honored Contributor
13 years agoTo try and randomize the seed a bit more you would need to have your software do something that can take a variable amount of time or give different results each time it is called, such as waiting for a network packet or user input from the terminal. Only then use the value of a counter to initialize the random seed. The time function will also probably only work if you have a system timer in your system. If you need more randomness, you could also put a fast timer (that doesn't generate interrupts) and use the value of that fast timer as seed. But you still need to depend on an external event that can take a variable amount of time.