Return a pseudorandom UInt generated using a FibonacciLFSR.
Return a pseudorandom UInt generated using a FibonacciLFSR. If you require a Galois LFSR, use GaloisLFSR.maxPeriod.
the width of the LFSR
when asserted, the LFSR will increment
an initial seed (this cannot be zero)
a UInt that is the output of a maximal period LFSR of the requested width
A mapping of widths to a sequence of known LFSR taps that produce a maximal period LFSR.
A mapping of widths to a sequence of known LFSR taps that produce a maximal period LFSR. These work for either a Fibonacci LFSR or a Galois LFSR. Taps are available for bit widths of 2--786, 1024, 2048, and 4096.
Users can automatically generate LFSRs using these taps with LFSR.apply for a maximum period Fibonacci XOR LFSR or with MaxPeriodGaloisLFSR/GaloisLFSR.maxPeriod or MaxPeriodFibonacciLFSR/FibonacciLFSR.maxPeriod for more configuration options.
Utilities related to psuedorandom number generation using Linear Feedback Shift Registers (LFSRs).
For example, to generate a pseudorandom 16-bit UInt that changes every cycle, you can use: