Breadboard Friendly FPGAs

Regular Hackaday readers will be familiar with all the cool things you can do with FPGAs; emulating old video game consoles, cracking encryption protocols, and DIY logic analyzers become relatively simple projects with even a modest FPGA dev board on your workbench. Many FPGA boards aren’t geared towards prototyping, though, and breadboard friendly devices are hard to come by. Here’s a pair of breadboardable FPGAs we’ve found while searching for some related hardware over the past few days

First up is the Mercury FPGA Module. Packaged in a DIP-64 format, the Mercury features a Spartan-3A FPGA with the equivalent of 200k logic gates. Elsewhere on the board is 512kB of RAM and 128kB of Flash storage. There are enough GPIO pins for nearly any project, but sadly only a 10-bit ADC – the same resolution you’d find in an AVR or PIC ‘micro.

Of course the Mercury isn’t the only breadboard-friendly FPGA dev board out there. There’s also the slightly more capable XuLA2 board powered by a Spartan-6 with 32 MB of RAM, 1MB of Flash. Unlike the Mercury, the XuLA2 can also fit in one of those ‘half-sized’ solderless breadboards.

Yes, it’s a different form factor than the commonly recommended Papilio One or the DE0. If you can suggest any other ‘beginners’ (i.e. doesn’t cost an arm and a leg) FPGA boards, leave a note in the comments and we’ll summarize them in another post.

57 thoughts on “Breadboard Friendly FPGAs

  1. I have question. How many logic gates it will take to emulate a simple AVR on the FPGA (or anything alike that can be programmid with C or such)?

    Or the quesitons is more alike how many such cores I can fit into one FPGA to enable (relatively) easily programmable parallel processing?

      1. This is worse than inches mixed with kilograms. Gate != LUT != LE != Slice.

        One of the versions of 6502 I remember takes approximately 1200 LEs on an Altera Cyclone II. If we take a low end Cyclone II with ~5000 LEs, that’s roughly 1/4 of it. I imagine NIOS II to be far more advanced than a 6502 so I’m having hard time seeing how 5-10 of those fit in a low end FPGA.

        1. Yeah I guess I should have checked the fitter reports (and proofread my units) before posting, but I only wanted to give a rough figure.

          On an Altera DE2 a full Nios II (with HW dividers and such) uses up approximately 10000 logic elements and the device has ~33000 LEs. So I guess you could fit four standard nioses, which is almost five :> Of course, then you’d have a hard time fitting anything else in there.

    1. Usually the first thing noobs ask about is what you mentioned – “how many cpus can I cram on there?”

      That’s like asking how many sheets of plywood a Ferrari can carry. Sure, you CAN do it, but you’re completely missing the entire point of programmable logic.

      FPGAs are best suited for apps where you need to move huge amounts of data around, need cycle-precise timing down to 5/10 nanoseconds, and interfacing/glue logic.

      For example, you could use a real ARM Cortex cpu physicallly on the pcb wired to the FPGA with a 32bit bus, and use the FPGA for interfacing with some SDRAM, handling i/o mapping, maybe some DSP or vector instructions.

      It takes a completely different mindset and for people that have never touched anything besides conventional CPUs it takes a few months/year to fully understand and utilize this way of doing things

      1. You make it sound as if there’s something wrong with folks asking that question.

        People will also ask “how many horsepower does that Ferrari have?” Despite horses being now largely irrelevant for transportation, and without knowing either how much an average horse can actually pull or the exact definition of a horsepower, it still manages to express the relative power of the Ferrari in something familiar.

        And so it is with FPGAs. The number of gates/LUTS/LEs/slices/whatever is totally abstract to a newcomer when it comes to the big picture. The number needed to implement a certain function is unknown, and differs even between FPGA types.

        But people know that a CPU is a complex thing, and the approximate relative difference in complexity between different CPUs. Or other logic functions, since you can look at a labelled diagram of a MCU chip die, and see how much die space a particular peripheral needs compared to the CPU core. So when someone asks how many of a particular CPU will fit on an FPGA, it’s not because they intend to pack it with CPUs, as you seem to imply. What they’re typically asking is whether the FPGA has room for one CPU, to handle lower-speed tasks in an easy and familiar way; while still having plenty of room to implement whatever high-speed functions they desire.

        1. Well put. Also worth pointing out, most non-trivial designs will include some microprocessor softcore because instruction bits are far cheaper than logic cells so you only use the latter for stuff that needs it. However, these days the metric I care the most about if the amount of block ram because you never ever have enough of that, unlike logic cells.

      2. I have to agree. The way we go about fpga is to create instinctive behavior. For example we write software in code to which then gets interpreted by the cpu which all takes time. But when you get scared or burn yourself you instinctively react. fpga are kind of like that process of reacting to input signals without running through lines of code to necessarily interpret it. Yes it can become a cpu but why redesign the wheel. So when you think that way of instinctive application of signals the designs become more efficient…

    2. As a reference point, a Spartan 6 LX9 is the largest currently avaiable spartan 6 series FPGA in a hobbist / small run friendly package.

      It has 64KB of on-chip block RAM, so can implement the memory space of one AVR micro-controller (or an entire 80’s arcade game), An AVR core needs about 200k equivielent gate count to implement, so will take about 40% of the chips logic, at a guess.

      You can however put many small 8-bit Picoblaze processors – each can use as little as 2% of that FPGA’s logic resources. These processors can run at well over 150MHz, giving 75MIPS per processor.

      The same chip also has 16 DSP slices, which can run up to 333MHz on a “-2” speed grade device, giving over 5 billion 18-bit x 18-bit multiply/accumulate operations per second.

      Depending on package used, the same device can have up to 200 user I/O pins available, of course using more than a fraction of these with a breadboard is impractical.

  2. What about the digilent boards? According to the Xula site, the price is 110$ for the Xula2, where the Basys board from digilent is only 79$, or even 49$ if you’re studying (in the US). academic version is 59$, which is still very much cheaper. I know that you dont get the breadboard-friendly size, but then youget some buttons and displays instead. Also, some break-out ports.

    1. For starters, the xula2 is a Spartan6 with 1.5M gates and the Basys a Spartan3E with up to 250k gates. The spartan6 is a great deal more capable than the spartan3 (even with the same number of gates).

    2. I’ve got a Basys2, and the a problem with it is that the oscilator is not based on a crystal. You can’t use it to genereate stable signals (e.g. VGA) without an aftermarket upgrade.

      1. The Basys2 has both a RC ring oscillator and an oscillator chip. The LTC6905 oscillator chip definitely seems like it would be able to produce a stable clock. VGA doesn’t even have rigid timing parameters – a 555 clock would be sufficient for VGA applications!

  3. $65.00 for the Mercury and $55.00 for the XuLA (+ shipping).

    You can get a cyclone II dev board for $23.66 with free shipping. Not sure if the added components are worth the extra $40.

    1. That Cyclone II board is super cheap, but it is missing a lot:

      1. A USB programming circuit (You need to spend another $20 or so for a programmer…)
      2. Any kind of protection on the I/O lines. (It has no series resistors, 5v buffers, or static protection.)
      3. Analog in support (You’d need to wire up your own ADC.)
      4. External memory (It’s neither easy nor recommended to add a high-speed external memory to DIL headers after the fact.)

      1. 1) The USBblaster is $9.90 free shipping. ByteblasterMV (parallel port) is $7. Or make your own consisting of some resistors and a single 74hc244 for almost nothing.

        2&3&4) If your project ever gets to that level, then yea high speed ram soldered close to the FPGA is good to have. But remember it’s an FPGA, so extra gates can also be used as RAM. ADC’s are useful only if your project takes analog input and it fits within the ADC specs. Series resistors, buffers, and static protection are nice to have but $40 extra for these things is steep.

      2. 1) i PREFER serial port / programming. if you can program a friggin FPGA, you can solder a frigging IC to a pata connector inside your computer and voila a new parallel port on your USBports only desktop computer

        2) no protection? good, i’ll design my circuit around those constraints.
        afterall, you ARE making your own design and not ripping off someone else’s work and calling it your own?

        3) an ADC is nothing much more then a DAC in reverse, you can use a PISO (not SIPO) plus resistors, then just clock it in.

        4) i have no rebuttal for that :( maybe piggypack/deadbug soldering could be used to kludge it up! make it look unique and hand made, shows its one of a kind and truly yours and not yet another kit you purchased online plugged in and shoed off how you can follow directions WHEN TOLD TO

        x) creativity is the essence of invention (andor modification)

  4. At about the same cost of Xula2, you can pick up a 250k LE Basys2. While not as hack friendly (It’s far from a DIP-style form-factor), it’s an excellent option for anyone interested in learning to work with Xilinx parts.

      1. I’m not arguing that the Xula2’s a rip, quite the opposite, it’s one hell of a deal. But in a “my first FPGA” context, I still find it hard to go wrong with the Basys2. You need to be pretty careful about I/O and interfacing in general with FPGAs given their fragility and Digilent provide a nice pick-up-and-go package. But you’re quite right, the Spartan-6 is a ton more capable.

    1. FPGAs are capable of performing multiple operations at the same time. If you want to run 16 independent servos, get values from a gyro, and perform some image processing, it will be done all independently in an FPGA. In a microcontroller, I would be concerned about my servos glitching, the image processing taking too long.

    2. The big difference is that microcontrollers use sequential computing (one task after another) and FPGAs use parallel processing. Therefore, with a FPGA, you can process a lot of things really fast and at the same time.
      Usually, you use a micro to drive the system, and an FPGA to do the processing.

    3. You can program the instructions that a microcontroller executes. With an FPGA, you have access to another level down in the hierarchy: you can program how individual logic gates are interconnected. That gives you increased flexibility so you can design things that don’t even resemble a microcontroller. It also gives you increased complexity when creating your design.

    4. A typical mcu consists of a simple core with GPIO pins connected it it. It’s much like a mini PC. You program it like you do any microprocessor (assembly language, C, etc). MCU’s usually run at <100mhz. A typical FPGA consists of millions of gates where you can program it to be whatever you like, be it a custom CPU, GPU, demodulator, display controller, etc. Verilog and VHDL are the languages you use to "create" this hardware. FPGA's are very fast. Even cheap ones can run up to 400mhz (depending what you've made out of it).

    5. an FPGA is a array of logic gates that you can “wire” up any way you want…. usually exclusive or gates only.. you can set up a microcontroller core + any glue logic you may need. A microcontroller is just a small CPU with its own memory on chip….an FPGA can be anything you need, a whole microcontroller or just a lot of logic gates to do what you want with… I hope this helped you.

    6. The main difference (In my mind at least) is that FPGAs can run MULTIPLE processes in parallel while microcontrollers can only run processes in sequence. For example:

      Microcontroller:
      Get your GPS location
      THEN you can check your ADC
      THEN you can compute something

      FPGA:
      Get your GPS
      Check your ADC
      Compute something
      SIMULTANEOUSLY since it’s using logic gates rather than executable commands, No interrupts needed since everything happens in parallel

  5. Breadboard friendly…. As long as you don’t go over few MHz for your communication :|
    Maybe I’m a little arrogant, but when you begin to go with FPGA the best option is to not have a breadboard… So Dev Kit, or PCB are a must have.

    As far as I know there is about 10pF capacitance between row in a breadboard…

    1. true, but if all your high frequency processing is done on the fpga (plus its host pcb) and lower speed components can interface via the breadboard, then it should be adequate. It should be noted that nothing is preventing you from making a pcb with connectors to the fpga board in case you want better signal integrity.

      1. True. And also note that these smaller boards both include an external memory chip on the PCB where the high-speed signals from the FPGA can be handled just like they are on the larger boards. The real difference is the larger boards add a bunch of low-speed stuff like LEDs and buttons that take-up room but could easily be handled externally on a breadboard.

        1. I agree, I just see one limitation, FPGA are great for dedicated processing, but it’s a pain in the #$! for interfacing, so a good board in my opinion will embed at least one uC….
          In fact it’s the way I use the “Logic sniffer” from Dangerous Prototypes ;)
          A not so bad PIC with FPGA.
          In this way there are Armadeus board but way too expensive for discovering that kind of toys.

          1. I agree on that. The XuLA boards include a PIC 18F14K50 for managing the USB interface. The PIC implements a JTAG interface over the USB that provides a lot of interesting options for talking to the FPGA internals while it is processing. That lets you do things like virtual instruments/probes on the PC that observe/change what’s going on in the FPGA.

  6. Both these boards are great starter boards. Looking at the specs on both I would tend to think the Mercury board is a better choice. Some things I like about Mercury are:
    – 5V tolerant I/O pins. This is a huge plus – a lot of the devices out there still output at 5V logic levels. Not having to deal with level shifting myself is a great time saver.
    – SRAM as opposed to SDRAM. Mercury chose an SRAM, which has a super easy interface. Setup the address, pull the CS line and the data shows up. The other board uses SDRAM. This ram requires a VERY complex state machine to drive. Not very beginner friendly.
    – On-board components. The Mercury board comes with a faster oscillator – 50 MHz. On the Xula board, you get 12 MHz. If you want to go faster, you need to figure out how to use the FPGA’s PLL. It also looks like Mercury chose much larger power regulators, which should be much better equipped to support external circuitry if need be. Mercury also has some buttons and LEDs. Not totally necessary, but nice for quick on-board debugging.
    I do like the larger FPGA on the Xula board, but it is twice the price of the Mercury board. Also – everything is extra on the Xula board – even the header pins!

    1. Seriously, using a PLL is very trivial and even *if* you wanted to run at the oscillator frequency you should always use a PLL to filter the clock. The timing analysis will take the improved timing jitter into account. External frequency is mostly irrelevant. Not to sound like an ad for Xess, but no one writes their own SDRAM controller and the XuLA comes with one that you just drop in with your design. SRAM is way too small (and slow!) for anything useful. [Not affiliated, but a happy customer]

      1. >SRAM is way too small (and slow!) for anything useful.

        I agree that SRAM is much more expensive per bit of storage – but SRAM is hands down one of the *fastest* RAM technologies

    2. Reply to Dave Vandenbout (comment nesting limit reached):

      The JTAG into FPGA was used to implement a “slow” communication channel to check results of crypto cracking in one project, letting them cram more cores in, but I could see how that would be handy to probe debug points without much additional overhead too.

    1. For once, absolutely nothing with these types of ‘low-end’ FPGAs so long as you have the right JTAG hardware, both Altera and Xilinx (Anyone know on Actel?) do fantastic free versions of their IDE complete with programming functions.

      1. At least for the mercury, even the programmer appears to be included. (what the USB port is used for). They indicate that their programming utility is currently Windows only, but with Linux support coming in January of 2013

  7. I fear comparing the XuLA and XuLA2 to Basys and other educational boards is missing the point. XuLA shines for embedding in to actual projects where you can’t (or don’t want to) use a micro controller. There add the added interfaces of your typical FPGA kit (keyboard, VGA, sound, …) is just added cost, size, space, and power. The XuLAs are cost optimized and as close to minimal as you can and you can add your own low speed IO. For many projects this is simply awesome, though there are clearly space for a version with more and potentially higher speed IO. Alas, it will come at a higher cost. I’ve been rooting for an Artix-7 version, but Dave may be right that the market for that [price] would be small.

  8. The latest ADC’s use a new standard (JEDEC) interface: 1- bit wide and over 3 GB/sec. The only device I know that can handle that, is an FPGA. Spartan-6 can do it, but not (I think) the version on the XULA.
    Maybe the next version will have high-speed ADC support.

  9. With what seems to be so much interest in hobby use of FPGAs, why is their so few good resources on the web?

    We have opencores.org, fpga4fun (which is very quiet), fpgaarcade.com, and a few projects on GitHub.

    I wonder why that is…

  10. Papilo One Pro $84 (Google it… I dont’ want to risk moderation)
    * Spartan 6 LX9 FPGA (Datasheet)
    * High efficiency LTC3419 Step Down Dual Voltage Regulator (Datasheet)
    * Dual Channel FTDI FT2232 USB 2.0 Full Speed Interface (Datasheet)
    * 64Mbit Micron MT48LC4M16 SDRAM (Datasheet)
    * 64Mbit Macronix MX25L6445 SPI Flash (Datasheet)
    * 48 I/O pins arranged in a Papilio Wing form factor
    * 32Mhz Crystal Oscillator

    1. I currently have a Papillio One, and compared to these the Papillio One Pro is definitely the best deal currently out there. The only thing I wish they’d do is provide maybe 4 LEDs and buttons for super easy testing. However, the Papillio One Pro currently appears to still be in development and you can’t buy it. For all of it’s features though, it definitely blows all of these out of the water

  11. I’ve been having quite a bit of fun working with Digilent Cmod A7 boards (links below), which are designed for breadboard projects. The first two boards they offered use Xilinx Artix-7 FPGAs, and included USB and Pmod connectors, and the breadboard I/O pins arranged in DIP-40 format. More recently they started shipping a slightly lower priced variant based on a Xilinx Spartan-7 FPGA.

    I thought I might point out these boards. [I don’t work for Digilent.] The product pages describe their LUT/FF capabilities more fully. I prefer the larger Cmod A7-35T boards since the price differential is small, and they have considerably larger Artix-7 FPGAs (Artix-7 35T series) which I typically need for compute-intensive designs. The two Cmod A7 boards have 12MHz on-board clocks, but I almost universally attach that to an MMCM clock generator on the FPGA to synthesize clocks running from 100MHz to 108MHz.

    Digilient Cmod S7 board — $69 [uses Spartan-7 FPGA (XC7S25-1CSGA225C)]
    https://store.digilentinc.com/cmod-s7-breadboardable-spartan-7-fpga-module/

    Digilent Cmod A7-15T board — $75 [uses Artix-7 FPGA (XC7A15T-1CPG236C)]
    Digilent Cmod A7-35T board — $89 [uses Artix-7 FPGA (XC7A35T-1CPG236C)]
    https://store.digilentinc.com/cmod-a7-breadboardable-artix-7-fpga-module/

Leave a 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.