lfsr.py is a small Python utility for generating maximal-length (m-sequence) Galois LFSR output sequences and Gold codes. Output can be emitted as comma-separated bits or as a packed hexadecimal value.
Run the built-in help for definitive usage instructions and examples:
python3 lfsr.py --help
-
lfsr.pyCommand-line tool that generates:- LFSR sequences from
[#bits] [taps] [init] - Gold codes from
--gold/-g [codeindex] [#bits] [taps1] [taps2] [init]
- LFSR sequences from
-
lfsr_feedback_terms/Precomputed feedback tap terms (by register width) useful for selecting maximal-length polynomials. -
galois_lfsr_in_c/Minimal C reference implementation / demo of the same Galois LFSR stepping logic.