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.


  1. marc says:

    Error establishing a database connection

  2. jc says:

    Ha ! now THIS is had material. Can’t wait for the site to go up ! nifty kernel modules ahead !

  3. tomJones says:

    Since the site is down…
    Below is the Google Cache of main page

  4. Trololololo says:

    Hackaday DDoS ;/)

  5. Vostok says:

    Hi HAD team, could You please make this info accesible, unless, Andrew’s work was completely confidential of course. Thank You.

  6. rasz says:

    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.

  7. Anonymous says:
  8. cptfalcon says:

    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++…

  9. lior says:
  10. Jimbo says:

    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.

  11. 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.

  12. somun says:

    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.

  13. Necromant says:

    Site should be back online now, sorry guys. I sent that as a patch to lkml, so it’s avaliable there as well.

  14. Necromant says:
  15. Link works now..

  16. Necromant says:

    Oh, and DO use the lkml patch. It has some typos fixed and a little bit of documentation to help you out.

  17. Still down. All sites that are listed – even the caches.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 92,417 other followers