Pushing FPGA Config Files Via Serial Using ‘cat’

[Andrew] is trying to buckle down and hammer out his PhD project but was surprised by the sorry state of the configuration options for his FPGA/ARM dev board. Using JTAG was painfully slow, so he studied the datasheet to see if there was another way. It turns out the Xilinx FPGA he’s using does have a slave serial mode so he came up with a way to push configuration from the ARM to the FPGA serially.

Four of the connects he needed were already mapped to PortC pins on the AT91SAM9260 ARM System on a Chip. He ended up using the EN_GSM pin on the FPGA, since there is no GSM module on this board; connecting it to the microcontroller with a piece of wire. Now he can SSH into the ARM processor, grabbing information on the FPGA from /dev/fpga0. When it comes time to program, it’s as easy as using the cat command on the binary file and redirecting the output to the same hook.

20 thoughts on “Pushing FPGA Config Files Via Serial Using ‘cat’

    1. @vostok, if this isn’t released, take a look at the u-boot sources for something similar. The interface is pretty straight forward and it wouldn’t take much to hack it into a kernel driver if that’s what you wanted.

  1. so its a kernel driver pushing configs using PS mode transparently (to the user)? very clean and friendly solution, few hours to implement it and then you can forget about fpga for the rest of the development process.

  2. I’ve always wished for, and never knew existed, tagged structure initialization until I saw this screenshot! Very cool! Unfortunately, it’s only part of C99 and not yet part of C++…

  3. This is a great idea. I worked on a project once where something similar was done using the parallel loading mode with the parallel port on an x86 SOM-ETX board and a Virtex FPGA. We wrote a driver and used cat to copy FPGA files to /dev/fpga very quickly.

  4. Nice, also waiting the website to come up. I am planning to store configurations on SD card, and use atmega to dump it to FPGA. This way there can be multiple configurations and FPGA can ‘order’ different configuration from atmega. I am also planning to attach USB (FT232) to FPGA, so updates can normally go USB->FPGA->atmega->SD card. But in case of bad configuration, SD card can programmed directly in USB-SD card adapter.

  5. The site is still down. Curious if anyone got lucky yet. I am interested in the details to figure out how could rs-232 could actually be faster than, say a decent jtag programmer, or anything for that matter.

Leave a Reply to TrololololoCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.