Program FPGA in U-boot

Jan 16, 2019


I have recently been working with the FPGA manager in Linux. There is a very useful technique that we can use to verify whether bitstream downloading works or not in U-boot (so you don't have to worry about Linux drivers at first). Let me show you.


The command that you can use is 'fatload' + 'fpga'. The basic flow is to load bitstream into memory, and then load the memory onto the FPGA. There are multiple options available for command 'fpga', as you can see:

Then you can load bitstream into memory. All the bitstreams have to be in the BOOT partition of your SD card image.

The above result suggests the bitstream is 4045675 bytes. So you want to put that number as an argument to 'fpga loadb'.

As you can see the command runs successfully. For partial bitstreams, you can do similar things with 'fpga loadbp' (rather than 'fpga loadb'). Notice the partial bitstreams are much smaller than the full bitstream.

I have verified both the full bitstream and partial bitstream have been successfully deployed on my FPGA.