memoryhardwarefpganon-volatile

How to boot DE1-SoC from non-volatile storage on the board itself?


I have a DE1-SoC Board and would like to experiment with it. (Board description: http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=205&No=836&PartNo=1)

My wish is to incorporate non-volatile storage.

As for a start, implementing the following exercise would make me happy:

When the board is turned on, the integer stored in memory should appear in 
readable format on HEX LEDS.

So far I have implemented the "ability" to change the value of HEX LEDS using extra buttons connected to board. However, if the board is turned off, the whole "ability" is gone. I then need to reconnect the board to my PC and re-download the binary code to FPGA. In addition to that, the value stored in LEDS is also reset to default. I would like to avoid having reconnect my FPGA to computer.

How to start working on this?

Looking at board documentation for memory:

64MB (32Mx16) SDRAM on FPGA
1GB (2x256Mx16) DDR3 SDRAM on HPS
Micro SD Card Socket on HPS

Does it mean that DE1-SoC has no non-volatile storage incorporated? If it does, how to access it?

I also have all pin assignments of the board in a single file "de1soc_pin_assignments.qsf"

Can I connect external SD card to "Micro SD Card Socket" and use it as a flash? Is it possible to "boot" the binary code from SD card to FPGA (as well as the integer number to LEDS)? If yes, which pin should I use for that?

Thanks a lot for your help in advance


Solution

  • The DE1-SOC includes an EPCS128 configuration flash, which can be used to store the bitstream for your design. See page 105 of the DE1-SOC user manual ("Programming the EPCS Device") for details on how to convert a bitstream to the appropriate format and store it on the flash chip. Once you've done so, the FPGA will "boot" into that bitstream when powered on, without needing to be plugged into a computer.

    The configuration flash cannot easily be used to store other data, such as the state of your LEDs. It might be possible to store this data on an SD card, but doing so will not be an easy task, as SD cards require a complex initialization process before they can be accessed.