Loading FPGA from u-boot
Making uboot configure the FPGA before linux starts

21 Jun 2013 - 16:29 | Version 3 |
(This document is incomplete, but may be some one with more experience can fill the gaps. This is the recipe that I tried with the SOCkit)

In order to load an FPGA sof file, we need to generate an rbf file first (note this can be done from the GUI):

quartus_cpf -c <input file>.sof <output file>.rbf

Copy the .rbf file to the FAT partition of the SD card

Then, from u-boot:

set fpgaload "fatload mmc 0:1 0x2000000 fpga.rbf;fpga load 0 $""{fpgadata} $""{filesize}"
set bootcmd "run mmcload;run fpgaload;run mmcboot"

run bootcmd

You may automate this by doing an:

env save

If there is no message your fpga should be programmed, check the config LED.

If it fails with a -4 return code it has failed, most probably due to the data format.

Check the MSEL switch settings and make sure they match the rbf format (up-up-down-up-up-up = uncompressed rbf)

Enjoy!

Give us your feedback

© 1999-2018 RocketBoards.org by the contributing authors. All material on this collaboration platform is the property of the contributing authors. Privacy.