Linear Feedback Shift Registers on FPGA’s

fpgahdlprogrammable-logic

I want to put 256 linear feedback shift registers on a FPGA and each LFSR will have just two tap positions for the XNOR feedback and each register is 63 cells . I don't care if the LFSR'S are not maximal length. The catch is I want the tap positions for all these shift registers to be easily reconfigurable. How difficult/easy is it to do this?

Best Answer

If you are using Xilinx FPGAs, the LUTs can be configured as 32-bit shift registers (SRL32), each with one adjustable tap. What I would recommend is using 6 of these 32-bit shift registers as three 63-bit registers in parallel, one fixed at 63 bits and the other two for the variable taps. With a bit of additional logic it should be possible to implement this with fewer registers, though there could be some disruption when changing the tap selection under certain conditions.

If you aren't using Xilinx FPGAs, then it might be advisable to look at the programming manuals to figure out what sort of shift register features are supported. It is possible to make variable length shift registers with large MUXes, though this could consume a lot of logic resources. Dual-port RAMs are another option, especially for longer shift registers or for multiple parallel shift registers with identical taps. Depending on the architectural features of the FPGAs and your design constraints, one option may make more sense than the others.

Another consideration is constraints on how the shift register taps are changed. If you need to change the taps on-the-fly without disturbing the contents of the shift registers, this could limit what architectures you can use and some of the optimizations you might be able to make.