RTL Studio Open IDE

LFSR, PRBS & CRC

8-Bit Galois LFSR (x⁸+x⁶+x⁵+x⁴+1)

8-bit Galois LFSR with parallel load/shift enables using polynomial x^8+x^6+x^5+x^4+1.

About this block

Simulate it in the Verilog IDE

Mediumverilogsimsyn

8-Bit Galois LFSR (x⁸+x⁶+x⁵+x⁴+1) is a Verilog reference block in the LFSR, PRBS & CRC catalog. LFSR, PRBS, CRC, and pseudo-random sequence generators. Marked Medium: more state or a wider datapath, still one workspace in the IDE.

This IP implements an 8-bit Galois Linear Feedback Shift Register (LFSR) with parallel load capability. It is designed for FPGA and ASIC synthesis, offering a robust pseudo-random number generator core with flexible initialization via parallel load. The design is fully verified using Icarus Verilog and supports synchronous reset and independent control signals for load and shift operations.

  1. Choose Open in IDE. RTL Studio loads the packaged workspace for 8-Bit Galois LFSR (x⁸+x⁶+x⁵+x⁴+1).
  2. Read the Verilog module in the editor. The catalog line for this block: 8-bit Galois LFSR with parallel load/shift enables using polynomial x^8+x^6+x^5+x^4+1.
  3. Run the packaged testbench with the in-browser Verilator simulator, then open the VCD in the waveform viewer.
  4. Run Yosys in the same IDE for a generic netlist. Sky130 liberty mapping is a separate Pro library option.

RTL Studio is the Verilog simulator and IDE around this block: Slang lint, Verilator, VCD waveforms, and Yosys, in the browser. Simulation guide · Yosys guide.

Features

  • 8-bit State Width: Standard width for byte-aligned operations.
  • Galois Configuration: Efficient hardware implementation with low logic depth using polynomial x^8 + x^6 + x^5 + x^4 + 1.
  • Parallel Load: Arbitrary state initialization via parallel_in input.
  • Synchronous Control: Independent load_en and shift_en signals with defined priority (Reset > Load > Shift).
  • Synchronous Reset: Reset to zero via rst_n on the positive clock edge.
  • High Frequency: Optimized feedback logic for high-speed operation.

Ports

Port NameDirectionWidthDescription
clkInput1Clock input
rst_nInput1Active-low synchronous reset
load_enInput1Parallel load enable (high priority)
shift_enInput1Shift enable (low priority)
parallel_inInput8Parallel data input
stateOutput8Current LFSR state

Verification

The testbench (tb/tb_lfsr_8bit_galois.v) verifies the following behaviors:

  1. Reset Behavior: Ensures state is zero after reset.
  2. Parallel Loading: Validates loading arbitrary values (0xAA, 0xFF).
  3. Shift Sequence: Confirms correct Galois LFSR progression from 0x01 to 0x71.
  4. Hold State: Ensures state remains unchanged when no enables are active.

All test cases passed successfully.

More in LFSR, PRBS & CRC

All LFSR, PRBS & CRC blocks