HDL & Verification
Why should the random seed be recorded in tests that use random inputs?
- AThe same seed reproduces the same input sequence, so a bug that was found can be re-examined any number of times
- BRecording the seed generates random numbers faster
- CSimulation will not start unless the seed is recorded
Show answer and explanation
Answer: A. The same seed reproduces the same input sequence, so a bug that was found can be re-examined any number of times
Simulation random numbers are pseudo-random, generated by a fixed procedure from a seed, so the same seed gives the same sequence. If a random test finds a bug but the seed is unknown, the situation cannot be recreated to investigate the cause or to confirm a fix. The standard practice is to run many tests with different seeds and record the seed of any failure.
- A. Correct. Bugs that cannot be reproduced are hard to fix.
- B. It has nothing to do with speed.
- C. Simulation starts without it.