
This design implements a lightweight xoroshiro64+ random number generator with ring oscillator (RO) noise injection to provide entropy.
The generator maintains two 32-bit internal states (s0 and s1). On each enabled clock cycle:
A 32-bit random word is generated using a ripple-carry adder:
random_word = s0 + s1
The xoroshiro64+ state update equations compute the next values of s0 and s1.
The RO noise input is XORed into the least significant bit of s0 to introduce true randomness.
The generated 32-bit word is loaded into a serializer.
The serializer shifts out one bit per clock on serial_out.
A pulse on valid_out indicates the start of a new 32-bit random word.
The internal state can also be seeded through an 8-bit seed-loading interface.
clk.rst_n = 1.enable = 1.ro_noise (for example, from a ring oscillator).serial_out.valid_out; it pulses high when a new 32-bit random word begins shifting out.seed_data, seed_wen, and seed_sel.ro_noise.| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | seed data | serial_out_w | seed_sel |
| 1 | seed data | valid_out_w | seed_sel |
| 2 | seed data | osc_ro_fast | seed_sel |
| 3 | seed data | osc_ro_slow | seed_wen |
| 4 | seed data | enable | |
| 5 | seed data | ro_noise | |
| 6 | seed data | ||
| 7 | seed data |