f-cpu/vhdl/common/random.txt
created Thu Jun 27 06:34:34 CEST 2002 by whygee@f-cpu.org from the VHDL files.

The purpose of the "random" package is to provide an early (design-time)
way to test that a circuit does not reach an unstable state when
it is powered on. It can also be used for testbenches when one is
lazy to create interesting vectors, but that's a byproduct ;-)

IDEALLY, ALL "VARIABLES" SHOULD BE INITIALIZED WITH THIS PACKAGE !

this is intended for simulation only. Run a few times, to be sure that
different values are tested.

The problem is that it is not easy to create "real" random sequences,
we would get the same sequence all the time if an internal generator is
used. The first idea here is to read the special file /dev/urandom
(cf: $ man urandom)

But there is a problem : several platforms (non-Unix) don't have this
feature. Anyway the input can come from any file, preferably a compressed
archive or any file without repetitive sequences (ie: entropy).
The value of RANDOM_NAME allows you to change the file name.

If you can't to use /dev/urandom directly, either make a dump (with the command
 $ dd if=/dev/urandom of=random bs=1024 count=20 ) or create a symlink :
 $ ln -s /dev/urandom random (in the proper directory)

Another problem comes from different simulators that do not allow
binary I/O or have a specific understanding of how it should be done.
