A Python script to generate visual diagrams of Galois Linear Feedback Shift Registers (LFSRs) using LaTeX/TikZ.
This tool generates clear, professional-looking diagrams of Galois LFSRs, which are a specific type of Linear Feedback Shift Register where the feedback taps are XORed with the output bit before being fed into the next register. Each LFSR implementation has its own advantages:
- Galois is more parallel, Fibonacci more serial
- Galois reveals finite field operation, Fibonacci recursion in sequence
- Generate Galois LFSR diagrams in multiple formats (PDF, PNG, EPS)
- Customize tap positions and initial values
- Show/hide register values and names
- High-quality vector output using LaTeX/TikZ
- Python 3.x
- LaTeX installation with TikZ package
- ImageMagick (for PNG output)
- pdftops (for EPS output)
Basic usage with default values (4-bit LFSR with taps 1001 and initial values 1111):
python3 galdraw.pyCustomize tap positions and initial values:
python3 galdraw.py --taps 110101 --init-values 100001Generate multiple output formats:
python3 galdraw.py --format all| Option | Description |
|---|---|
--taps |
Tap sequence as a binary string (default: 1001) |
--init-values |
Initial values as a binary string (default: 1111) |
--hide-values |
Hide values inside the LFSR boxes |
--hide-names |
Hide box names under the LFSR boxes |
--format |
Output format: pdf (default), png, eps, or all |
--output-dir |
Directory to save output files (default: current directory) |
python3 galdraw.py --taps 1001 --init-values 1101python3 galdraw.py --taps 10111001 --init-values 110010118-bit Galois LFSR with hidden values and names
python3 galdraw.py --taps 10111001 --init-values 11001011 --hide-values --hide-namesThis project is a modified version of the LFSR-Automatic-Draw tool, adapted to focus on Galois LFSRs.


