Close

Does this project spark your interest?

Become a member to follow this project and don't miss any updates

Arduino-Compatible FPGA Shield

Spartan 6 FPGA Shield includes SPI Configuration Flash, Breakout Headers, SRAM, programmable from Arduino or SPI Programmer

26 174 137
Enjoy this project?
Share on twitter   Share on Facebook

This project was created on 01/21/2014 and last updated a month ago.

Description

Motivated by an interest in teaching folks how to use FPGAs and espouse the virtues of FPGA-coolness (& like many, frustrated a bit by a number of limitations of the Arduino incl. IO, peripherals, etc) I’ve endeavored to create the first (that I know of) FPGA-based Arduino shield.


This board - which I'm documenting here as I go along - includes heaps of additional IO, memory resources, etc. and is SPI programmable via SPI flash (including programming from the Arduino)...And is just an all-round cool way to introduce programmable device technology (beyond simple logic) to the uninitiated.

Likewise, it will have more than enough grunt for the old-pro to hack together some totally awesome, totally re-configurable systems.  

Details

Intending to keep this as compact as possible I'm looking at BGA packages for SRAM and std package for the SPI Flash.  The several that I've chosen will enable me to keep costs below $30 for the whole board (target = $25) and still have head room to do some really impressive stuff with it.  Likewise, this makes a sizeable "prototype area" available to fill with either additional connectors or PTH pads.

Programming of the SPI flash from Arduino is done via the ICSP header which carries thru to the "daughter" card.  Likewise, I've included a second chipselect (GPIO) to enable the ICSP to connect to the FPGA via SPI (were you to use an SPI slave core in the FPGA to drive FPGA functions...more on this in my next project ;)

Flash is meant to be large enough to be used by an FPGA processor in case someone wanted to use one, and also hold multiple images of the FPGA configuration if someone intends to make this harder to "brick".

Power is still undefined but relatively trivial.  Power supply will offer a few different rails and LEDs and line drivers will be used to provide some visual feedback of programming state and activity.

Git project -- https://github.com/sfgit/FPGA_Arduino_Shield.git

Components
  • 1 × XC6SLX9-2TQG144C Xilinx Spartan 6 LX9 FPGA - Device Playground
  • 1 × S25FL216K0PMFI041 Spansion 16K flash - to hold FPGA configuration
  • 1 × SN74CBTLV3257DBQR SPI Multiplexer - manages access to flash from multiple SPI sources
  • 1 × KC5032A20.0000CM0E00 Kyocera 20MHz CMOS Oscillator - FPGA clock source
  • 1 × IS61WV12816DBLL-10BLI ISSI SRAM - 128Kx16 Asynchronous

Project logs
  • Ding ding...Round 2 - New board look purty

    a month ago • 0 comments

    Got the new boards back from Advanced Circuits (they rock BTW...attention to detail like few others) and they look awesome.  Went with black soldermask this time around and it makes things look so much cooler (much more Hackaday-chic).  These boards have a few new details including dipswitches (bloody small!), LEDs, a few extra test points, tented vias (BGA Soldering loves tented vias!) and a few other cosmetic tweaks esp. to the silkscreen.  The first batch worked fine so hoping this works without issue as well.  

  • Parts arrive for first 50p run!

    a month ago • 0 comments

    Got enough parts to build 50 boards today.  Updated stencils arrived, woo hoo!  Retreating into soldering dungeon to spin up one or two to verify all's well with the world.  

  • Board goes 3D - like *really* 3D

    a month ago • 0 comments

    Added step models to all of the interesting parts of the board to make things look and feel more authentic and to size up enclosures and such that I will release that you can easily 3D print.  Have a look at the pic below in the project overview.

View all 29 project logs

Build instructions
  • 1

    Step 6 - Wire up JTAG connections for JTAG programming.

  • 2

    Step 1 - Don't panic.

  • 3

    Step 3 - Build major footprints:  Costing the available board area requires building the major footprints and placing them on the PCB.  Built early footprints and placed to determine what additional space is avail.  Files in git.

See all instructions

Discussions

dan wrote 2 days ago null point

Hi! Sorry for a bit stupid question, but can you tell me is it possible to use FPGA as a lines swithcher/connector for electronic components? What I mean - I thinking on implementation more convenient breadboard for prototypes. This mean, that it has pinholes but all connectors hided inside it and switched automatically. Each pin can be connected to each another pin. You can attach to this board all needed electronic component one by one in any order and than "just" set switches to make needed connections. I was thinking a lot on mechanical implementation, but may be FPGA solution also may serve well enough for this purpouse?

Can you please tell me - is it possible to use FPGA as completely "transparent" (without any modifications of incoming signal) programmable electrical switcher so it can connect different pins in any order? And if it's possible what max electrical parameters of these signals?

Thanks a lot.

Are you sure? [yes] / [no]

Eric Han wrote 17 days ago null point

Hello there. This is Eric from ISSI. Please email me at ehan@issi.com if you need any help with design, etc. We also provide mixed signal, led, audio amplifiers, serial flash, as well as a broad range of high performance SRAM/DRAMs. Great work on this, it's truly inspirational to see one person come up with something like this. I am currently working on integrating our newly aquired SPI Flash department. Let me know if you need any help! = )

Are you sure? [yes] / [no]

Mark Dean wrote a month ago null point

I am interested in purchasing a couple of boards. Are they available for purchase? Do you also have a BOM and a source for the parts (a single source would be convenient.) Finally, I think this would be a good board to use in university level class projects (EE/CS majors, junior/senior/graduate level). How long would it take to fill a larger order (e.g. 25-50)? Thanks...Great project.

Are you sure? [yes] / [no]

i.abdalkader wrote 2 months ago null point

Nice work, post pics of the board when it's ready :) btw, if you need more ram, there's a $5 64Mb PSRAM from ISSI (IS66WVE4M16BLL)

Are you sure? [yes] / [no]

technolomaniac wrote 2 months ago -1 point

Thanks! This was actually a reason to pick the BGA I did was that there are so many drop-in replacements for this. You'll see in the schematics that I also brought out extra pads for mem that aren't used by this device. I did that so where additional memory resources are required, the ADDR lines would be available to those folks dropping in a new SRAM. Just need to remember to tent the bloody vias! Rev B has tented vias on the BGA pads. :| Makes hot-air soldering much, much easier.

Are you sure? [yes] / [no]

tobias.kornmayer wrote 3 months ago null point

Cool project! You may want to have a look at Papilio Due, which is currently on Kickstarter. What I like about your design is the lower cost, even if you used less RAM.

Are you sure? [yes] / [no]

technolomaniac wrote 2 months ago null point

Thanks! I saw this and I like it quite a bit! I like that they've tried to simplify the design-entry piece as well. This is something we did when I was with Altium and something I'm working on with HDL netlisters for KiCAD and Eagle. I'll convert the Xilinx standard primitive libraries to libs in KiCAD and Eagle (in time) to make it easy to just "draw" logic using a decent schematic front end. Some complexities with configurable parts are hard to implement but this should be a nice, simplified entry point for people that are afraid of the Xilinx SW. Still, expect a few videos on how to use the Xilinx tools to come out here very soon! I'm a big believer that once the concepts are understood, this actually *isn't* that hard to get something working. It's more getting over that conceptual / workflow hurdle and build confidence like you do making your first few LEDs blink with arduino or what-not. And this is all fairly easily but not well explained. I'm going to put some energy into explaining this.

Are you sure? [yes] / [no]

surubarescu wrote 3 months ago null point

Marvelous project ! I've been waiting for long to see an affordable FPGA board, but this being an Arduino shield (but not only) it's fantastic.

I got some questions (as a complete newbie in FPGA domain):
Is it possible to use this or other FPGA to drive a 3D printer or a CNC - in respect with the computation power and speed?
Is it possible to reconfigure the FPGA (or parts of it) while it's running?
Is it possible to configure the FPGA other way than using the manufacturer's software?

Are you sure? [yes] / [no]

Jarrett wrote 3 months ago null point

The manufacturer software is free, but yes, many companies have software that can create the appropriate .bit file (Altera, Xilinx, even Altium and probably open source solutions, too)

Are you sure? [yes] / [no]

technolomaniac wrote 2 months ago null point

Hi there! The FPGA could be used to drive motors pretty easily and I've used them to drive a variety of them in the past. So this isn't a major headache. Regarding programming while the system is running, this isn't possible if you mean a wholesale reprogram of the FPGA while it's still running however you can create logic in the FPGA system that responds to events that can trigger complex changes in system behaviour. Things like crosspoint switches are a simple example of modifying the FPGA system in response to some event. I'll do some videos on these sorts of things now that the board is populated and everything is running like clockwork.

However to completely reprogram the FPGA, you'll need to trigger a reboot of the device. Programming the FPGA is like changing the motor on the car. Can't do it while the motor is running :). However, the rest of the system *can* continue to run. So think of it much like a micro. You can't do a complete reprogram of the CPU while it's running but you can create applications and logic that run on the FPGA fabric that *can* be modified in-system.

On your last question, you'll need the manufacturer tools to program the device *however* they are free for this device! This is one of the reasons I chose this part. The tools will be something I take everyone thru in the follow-on videos about to come out! (Sorry I've slacked in the video output!) I have also been playing with a cool KiCAD front-end that allows you to place logic in KiCAD schematic and generate a netlist that can be pushed to the mfg. tools. More on this soon! (This is largely the reason for the delays on the video side was trying to solve the design-entry "problem" for non-FPGA gurus...Should be doing something for Eagle relatively soon also).

Are you sure? [yes] / [no]

surubarescu wrote 2 months ago null point

technomaniac -> i was thinking of reprogramming parts of the FPGA like loading a library in software in overlay mode, i.e. you build an automatic pilot, and you'll need three different "programs" for take off, level flying and landing and you need only one of them at a time, but you cannot have all of them in the FPGA at the same time due to limited space, while some part of the FPGA stays in control.
I would like to have one board to learn more about FPGAs, how can i contact you directly to talk about that (i couldn't find a way to send you a direct message/email)?

Are you sure? [yes] / [no]

technolomaniac wrote 2 months ago null point

@Surubarescu -- heads up, my direct email is just my username @gmail.com. Trying to avoid the spam crawlers a bit. :) I have a new round of boards in the pipeline and coming back very soon. Once I have them, happy to ship you one at my cost. I think with shipping and parts and such, this is still well-under $50. Not sure where I'll take these yet but it seems from posts that Hackaday will launch a store soon. If that's the case, I'll definitely put these in there. Also, just wrapped up and am editing a video on how to use the Xilinx tools. Alongside that, I'm doing one on VHDL / Verilog basics (with a focus on the patterns that professionals use) and how to break up a design into combinatorial and sequential patterns that map easily to hardware. Should be released soon.

Are you sure? [yes] / [no]

Adam Vadala-Roth wrote 4 months ago null point

Finally this is finished, I'm eager to take cues from your schematic on a BGA256 Spartan 6 board I've been planning. +1 for Altium its my favorite tool!

Are you sure? [yes] / [no]

technolomaniac wrote 4 months ago null point

Thanks Adam! Just made some simple little tweaks today. Nothing earth shattering but things I knew were necessary but not req'd when testing prototypes. got stencils today so I can solder this up and do some testing of the current prototypes. :)

Are you sure? [yes] / [no]

phreaknik wrote 4 months ago null point

What PCB design software is this using? Great project BTW!

Are you sure? [yes] / [no]

phreaknik wrote 4 months ago null point

NVM, I see you are using Altium. You just have a newer version than me! :)

Are you sure? [yes] / [no]

technolomaniac wrote 4 months ago null point

Altium Designer versions 13 and 14.1. Been slow to do it, but I've been migrating the whole project to KiCad. Going to try and contribute a bit on that project. Seems pretty awesome and I've got some background in that space (building tools).

Are you sure? [yes] / [no]

hackhead79 wrote 5 months ago null point

I am still in the beginning stages of being a maker (just made my dive into the Arduino world with an Arduino Mega 2560 ) but reading about FPGAs seriously tickles my maker bone. I would love to learn how to use FPGAs (including learning VHDL). Especially after buying a 5" display for my Pi for about 5€ and realising it needs an FPGA/CPLD controller to work.
So by the time your board is ready, I would be very glad to use your board as my first FPGA/VHDL -learning platform!

Are you sure? [yes] / [no]

technolomaniac wrote 5 months ago null point

Awesome to hear. And I'm preparing a series of videos on FPGA basics. The concepts, like anything, take a little effort, but after you nail the basics it's relatively straight-forward. I'll have some boards for cost once this is all said and done (design is actually further than what I've documented so far) so if you'd like one, drop me a line and I can give you a BOM cost and assembly and such and share a "kit" or a completed board. The only real beasts to solder are the super small QFN packages. With solder paste and an oven or hot air, it's all within reach.

Are you sure? [yes] / [no]

hackhead79 wrote 5 months ago null point

That sounds awesome! Yeah, it would be cool if you could send me the BOM for a kit or similar!
I read a 65-page VHDL primer a few days ago of which I understood a pretty good deal (I have some light to moderate previous programming experience) and it really seems manageable, very logical and much clearer than C[++] and the likes. I really like that processes can be timed very accurately and that multiple processes can run in a truly parallel fashion.

From what I've seen on Youtube, small pitch SMD soldering does not look like rocket science but I might be wrong ;). I'll try my hand a these small footprints in a few days on a DIY CPLD board when the components arrive. (I'll start a project here on hackaday projects about it in a few minutes - the board is built with a Xilinx XC9536XL but has only about a tenth the amount of logic units your board will bring, i.e. 800 logic gates, 36 Macrocells compared to 9152 the Spartan 6 XL9 has!).

Sooner or later I want to upgrade to FPGA anyhow, so it would be really cool to assemble and bring to use one of your FPGA boards so BOM / cost for a kit or similar sounds great. And I am looking forward to your video series to learn more about FPGA programming!

Are you sure? [yes] / [no]

mkr506 wrote 5 months ago null point

Thanks, this .. is.. Great! i'm a second year student at uni (york UK ... Woo!) and this is a perfect project since its holiday time, i've now been introduced to vhdl (and the joy that is Xilinx software) -and i'm also totally skint!!! Thanks for all the future stuff

Are you sure? [yes] / [no]

technolomaniac wrote 5 months ago null point

Awesome! I'll keep posting updates however if you're keen to test a prototype, pm me on twitter @technolomaniac and after I spin them up, I'd be happy to try and ship you one.

Are you sure? [yes] / [no]

DubStation Freeside wrote 5 months ago null point

KUDOS. This could be a really awesome thing. I know we'll be playing with them asap.
Considering the fact that stuxnet is still probably floating around, I predict much dark humor surrounding said shields.

Are you sure? [yes] / [no]

technolomaniac wrote 5 months ago null point

Ha! Indeed. This certainly has "dark potential". Was thinking it'd make a fun way to introduce people to bitcoin mining as well. There's heaps of those cores out there and they are a good lesson in the virtues of FPGAs and how their resources differ from an OTS CPU.

Are you sure? [yes] / [no]

Eric Evenchick wrote 6 months ago 1 point

Seems like a great, cheap way to get into FPGAs and HDL. I can imagine a ton of ways to use the Arduino and available shields for communication, and use the FPGA for heavy lifting.

Are you sure? [yes] / [no]

technolomaniac wrote 7 months ago null point

Added some content to new git repo for this project. Nothing too fancy yet, just costing the board area versus component sizes. See here: https://github.com/sfgit/FPGA_Arduino_Shield/

Are you sure? [yes] / [no]