June 2014 – Partial Reconfiguration

Partial Reconfiguration – or Self Surgery

This month’s article introduced you to difference-based partial reconfiguration. It’s a practical way of changing parameters that are otherwise fixed on-the-fly. You can adjust DCM attributes, IO drive strength, and even LUT equations using this method.

As usual the full article is in Circuit Cellar magazine, this page just includes the additional information I couldn’t fit in the article! If you have a digital subscription access it online at www.gotomycc.com otherwise see www.circuitcellar.com .

Some Useful References

References from the Article

The main references I mention in the magazine:

Using the FPGA Editor

Spartan 6 Partial Reconfiguration

There’s a number of *extremely useful* papers talking about PR on the Spartan6. I don’t have a ‘free’ (author-posted) link for the first paper, you can access it if you’re on a university-run network normally however (e.g. from their library).

Partial Reconfiguration from Other Devices

Bitstream Decoding Script

My bitstream decoding script is available from GitHub, see https://github.com/colinoflynn/s6-reconfig-examples/tree/master/dumpinfo

To use the Script you have to run it in Python. It assumes you’ve got a file called diffbits.rbt (generated with the -b option to bitgen).

Recreating the Example Project

This description will rely heavily on the YouTube video here:

You can get the example project files from here: https://github.com/colinoflynn/s6-reconfig-examples/tree/master/exampleproj

Some Common Errors & Warnings

9K Block RAMs have an issue with partial reconfiguration.

You’ll get the following error when you try using Bitgen:

ERROR:Bitgen:339 - This design is using one or more 9K Block RAMs (RAMB8BWER).
9K Block RAM initialization data, both user defined and default, is not compatible with partial bitstreams. For more information, please reference Xilinx Answer Record 39999.
ERROR:Bitgen:157 - Bitgen will terminate because of the above errors.

The fix is simple: don’t use them. How? You’ve got to add an option to “Other MAP Command-Line Arguments” that says “-convert_bram8”

Impact Doesn’t Work on Spartan 6

When I use Impact or ChipScope to load a partial reconfiguration bitstream, it doesn’t work on the Spartan 6. It seems to wipe the FPGA first, so the entire design stops working. I never found a work-around.

The Bitstream Doesn’ t Work (doesn’t change the FPGA)

This one sucks. It’s very difficult to track down, but assuming the transfer etc is all working, the issue is probably that the .bit file you’ve programmed into the FPGA differs from the one you’ve created the difference against. You must program the EXACT bitstream you generated the difference files against. If you generated the bitstream on a different computer for example it may fail – I’ve seen this when I regenerated a bitstream on a Linux & Windows computer, both with ISE 14.4. I had used the Linux computer to generate difference files, but programmed the FPGA from the Windows computer. The partial bitstreams did not work, I had to copy the Linux original bitstream over & program that in.

If in doubt regenerate the .bit file.


Posted in Monthly Support pages Tagged with: ,

Leave a Reply

Your email address will not be published. Required fields are marked *