4
\$\begingroup\$

We always like to reset registers in a synchronous digital circuit just after power up so they are in a known state before device operation begins.

Pseudo random number sequences make use of a seed value. The rest of the sequence generated by the generator then relies on this seed value in a predictable way.

Is it a good idea (say in FPGA or some other device) to use the initial state of group of registers (that are never reset) as the seed value in pseudo random number sequence?

\$\endgroup\$
  • 5
    \$\begingroup\$ Not if you have any real need for randomness. \$\endgroup\$ – Chris Stratton Jul 27 at 22:55
11
\$\begingroup\$

Though the imbalance of transistor conductivity, and the imbalance of metal_metal capacitance and metal_active capacitance, and imbalance of load capacitance, are what determine the powerup "state", these imbalances are very consistent. You will not get much randomness.

That is bad.

If you want to explore randomness, then design a clocked Comparator that initially resides in Metastability, and disrupt the Metastability with random noise from a broadband amplifier, and then CLOCK the Comparator from Track mode into Hold mode.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ I see, I now understand why I did not see this being used anywhere yet. \$\endgroup\$ – Quantum0xE7 Jul 27 at 23:05
  • 3
    \$\begingroup\$ please don't gratuitously toss around concepts like metastability when they aren't needed, it confuses people. \$\endgroup\$ – Neil_UK Jul 28 at 5:04
  • 2
    \$\begingroup\$ @Neil_UK Au contraire, this gives me a fresh cue for research :) \$\endgroup\$ – orithena Jul 28 at 9:30
6
\$\begingroup\$

It depends what you want to use the random numbers for.

If you want numbers that are not certain to be the same each run, then use the power-up state of registers. You will find that many runs will in fact be the same, but without the certainty that a power-on reset gives you.

If you want numbers that are very likely to be different each time, then you need to go another way. Even though registers are designed to be nominally symmetrical, and you can't predict before testing any particular chip which way each of its registers is going to power up, the accidental asymmetries of line size, capacitance to ground, transistor width, resistance etc etc that they are manufactured with, will mean that you are likely to get the same power-up state essentially every time.

There are various other ways to get good randomness.

| improve this answer | |
\$\endgroup\$
  • 1
    \$\begingroup\$ I use LabView to create very long random numbers, but hexadecimal is more dense, and base64 is more dense per 'n' characters. Base85 is most dense but LabView, Python and javascript do not treat it the same way. Normally I use base64. \$\endgroup\$ – user105652 Jul 28 at 7:15
  • 1
    \$\begingroup\$ @VTNCaGNtdDVNalUy Decimal, hexadecimal, base64...none of this matters. The flip flops are always binary. \$\endgroup\$ – Elliot Alderson Jul 28 at 23:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.