Forums » Software Development »
Programming fpga from inside ARM application
Added by Steven Hill about 11 years ago
We have examples of how to program the FPGA from uboot or from the linux command prompt. I have used both methods successfully. However, for various reasons I would like to load the image file into the FPGA from a running application on the ARM. Can anyone explain how to do this?
Replies (2)
RE: Programming fpga from inside ARM application - Added by Michael Williamson about 11 years ago
Is the ARM an linux application or a bare metal application?
If it is a linux application, you will need to write a custom driver (if our driver isn't good enough to suit your needs) as you need direct access to the EMIFA bus and GPIO controls. The source for our driver is in the MDK. You could just use the "system()" call in your app to call out to a shell script or something to load up the FPGA....
If it is a bare metal application, then you can copy the code in u-Boot (also available on our git tree).
The FPGA is programmed using slave select mode (8 bits parallel) via the EMIFA and a couple of GPIO lines to drive the PROGRAM pin, etc. Check out the Spartan 6 configuration user's manual for details on slave select programming. The GPIO / Bus connections are outlined in either the linux driver or the u-boot driver.
-Mike
RE: Programming fpga from inside ARM application - Added by Steven Hill about 11 years ago
Thanks, Mike. I am running linux, and the system() call was just what I was looking for.