You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-6Lines changed: 22 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,29 +10,45 @@ Needed an arbitrary width LFSR implementation. The one I've included works for 4
10
10
11
11
## Usage
12
12
13
-
### LFSR
13
+
### Linear Feedback Shift Register (LFSR / Xorshift)
14
14
15
15
1. Take files from `src/` and add them to your own project. If you use [hdlmake](https://hdlmake.readthedocs.io/en/master/), you can add this repository itself as a remote module.
16
16
1. Other helpful modules are also available in this GitHub organization.
17
17
1. Consult the testbench in `test/xorshift_tb.sv` for example usage.
18
18
1. Read through the parameter descriptions in `xorshift.sv` and tailor any instantiations to your situation.
19
19
1. Please create an issue if you run into a problem or have any questions.
20
20
21
-
###LHCA
21
+
#### Caveats
22
22
23
-
See `lhca.sv`. It's backed by a ring oscillator as a source of true randomness.
23
+
* Does not encompass all values (2 ** WIDTH-1 is missing)
24
+
* Predictable values, not suitable for any security-related application
25
+
26
+
### Ring oscillator
27
+
28
+
See `src/ring_oscillator.sv`. Because the toggle rate of a ring oscillator depends on logic delays and noise, it can act as a source for truly random n-bit word data.
29
+
30
+
#### Caveats
31
+
32
+
* This holds if and only if the sampling clock is lower than the natural oscillating frequency
33
+
* The quality of the produced random numbers is poor
34
+
* It can be improved by passing it through an LHCA, in which case, it will pass all the [DieHard tests](https://en.wikipedia.org/wiki/Diehard_tests)
35
+
36
+
### Linear Hybrid Cellular Automata (LHCA)
37
+
38
+
See `src/lhca.sv`. LFSR generalization suitable for cryptographic applications when sourced with a ring oscillator.
* Making Squares RNG arbitrary width seems non-trivial, unfortunately
46
+
* Making the Squares RNG arbitrary width seems non-trivial, unfortunately
31
47
* More upon request
32
48
33
-
34
49
## Reference Documents
35
50
36
51
*These documents are not hosted here!*
37
52
38
53
*[High Speed True Random Number Generators in Xilinx FPGAs](http://forums.xilinx.com/xlnx/attachments/xlnx/EDK/27322/1/HighSpeedTrueRandomNumberGeneratorsinXilinxFPGAs.pdf)
0 commit comments