Electronic – FPGA Configuration Flash as General Purpose Memory After Boot

configurationflashfpganon-volatile-memory

I am currently working on a system with a Spartan-6 FPGA and have a need for some low volumes of non-volatile memory to be used during system operation.

My question is, since I have a relatively large (25Mbit) flash memory already on board storing configuration data, can I effectively partition a block to be used for general purpose memory during operation? It would seem silly to add duplicate hardware for such small amounts of memory.

Memory size is not an issue as I know the configuration data does not fill the flash (leaving more than enough memory that would be required during operation < 3Mbit).

Has anyone ever done something similar to this?

Thanks!

Best Answer

If you are using the FPGA with an industry standard type of SPI Flash chip then it is possible to use the SPI Flash chip in the way that you describe. The way to do this with the most user control is to put a small MUX Chip between the FPGA and the SPI Flash chip in the path of the SPI Flash control signals. The other side of the MUX is then connected to alternate user activated pins to support an alternate SPI interface to the SPI Flash chip. You would then program your own interface into the SPI device to access as desired.

On the other hand Xilinx has a detailed App Note that shows how this can be done in a more generic way without the added MUX. See http://www.xilinx.com/support/documentation/application_notes/xapp694.pdf.

A more directed document for the Spartan 6 FPGA family is here: https://www.xilinx.com/support/documentation/user_guides/ug380.pdf