Pushing FPGA config files via serial using ‘cat’

posted Nov 19th 2011 3:26pm by
filed under: Microcontrollers

[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 Responses to Pushing FPGA config files via serial using ‘cat’

  • marc says:

    Error establishing a database connection

  • jc says:

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

  • tomJones says:

    Since the site is down…
    Below is the Google Cache of main page
    http://bit.ly/uNOi1s

  • Trololololo says:

    Hackaday DDoS ;/)

  • Vostok says:

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

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

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

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

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

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

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

  • Necromant says:

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

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

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks






         




    Hacks

    Resources