Added a README
This commit is contained in:
parent
62e13b6cb0
commit
b3682cdb13
1 changed files with 33 additions and 0 deletions
33
README.md
Normal file
33
README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Linear feedback shift register Plotting
|
||||
|
||||
## What is this?
|
||||
|
||||
This is a project that allows you to explore different LFSR polynomials/"taps" for, at the moment,
|
||||
16-bit LFSRs. It sort of abuses make to do this. For example, to try the polynomial
|
||||
|
||||
`x^15 + x^13 + x^8 + x^1 + 1`
|
||||
|
||||
you simply invoke the Makefile like this, remembering to use bit positions instead of the exponents direction:
|
||||
|
||||
`make TAPS='14 12 7 0' all`
|
||||
|
||||
The code will build, run your chosen taps (a full cycle if it's valid, or until it repeats/gets to 70000 values otherwise), output the values to a text file, and then run gnuplot to make a plot of the numbers. This can reveal differences between different LFSR polynomials and how "random" they are. Some polynomials have obvious groupings of digits, whereas some are more uniform and fuzzy and therefore a bit more useful as pseudo-random number generators or procedural generation seeds.
|
||||
|
||||
I'm sure there are probably other reasons to plot the outputs of LFSRs, but that's what I've been using them for.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- gcc supporting C11
|
||||
- awk
|
||||
- gnuplot with PNG support built-in
|
||||
- make
|
||||
|
||||
Currently this will only run on Linux, though it wouldn't be difficult to get it to run under mingw or similar systems for Window$.
|
||||
|
||||
## Limitations
|
||||
|
||||
At the moment it only supports 16-bit LFSRs as well as only supporting 4-term polynomials. Depending on how much time I want to spend on this, it may or may not be improved to support arbitrary LFSR widths and 2-term polynomials.
|
||||
|
||||
## License
|
||||
|
||||
Usually I license stuff under the MPL v2 but this was such a random, questionably useful effort that I decided to release it under the more permissive MIT license. Please let me know if you actually use this program for anything useful!
|
Loading…
Add table
Add a link
Reference in a new issue