Concepts

What is an FPGA?

An FPGA (field-programmable gate array) is a programmable logic device: an array of interconnected logic cells that you can configure to implement almost any digital function. It’s a blank slate for your own hardware designs, whether that’s a custom CPU, a digital signal processor or a robot vision system.

How is it different from a microcontroller?

A microcontroller has fixed hardware: a CPU with a defined instruction set. You program it by telling it what to do. With an FPGA, you tell it what to become.

That gives you a lot of power and flexibility. An FPGA can implement special-purpose processors that are orders of magnitude faster than a microcontroller at one task, like signal processing or encryption. It’s also flexible about I/O. A microcontroller might have four hardware timer channels on specific pins; an FPGA could put one on every I/O pin.

Using your board

How do I write code for an FPGA?

You describe hardware, usually in a hardware description language such as VHDL or Verilog. They look like procedural languages (Ada and C, respectively), but you’re describing a structure, not a process. A for loop in C runs code several times; a for loop in VHDL creates several copies of a circuit. It takes some getting used to, and it’s very powerful once it clicks.

How do I compile my code?

Your design is synthesized into a bitstream that configures the FPGA. For Mercury 2, use AMD Vivado, which is free for the Artix-7 parts on the board and includes simulation and timing analysis tools. The original Mercury uses Xilinx ISE. See Resources for install guides.

How do I load my design onto the board?

The FPGA’s configuration memory is RAM-based, so it starts blank at every power-on. Once your design is in the board’s flash, the FPGA loads it from there in about 200 ms every time it powers up. How you program it depends on the board:

  • Mercury 2: write the bit file to flash over USB with the Mercury 2 Programmer, our free Windows app. Flashing takes 2 to 30 seconds. Download it from Resources.
  • Mercury 2 Plus: use AMD’s Vivado Hardware Manager over USB; there’s nothing extra to install or set up. Load the bit file directly over JTAG for a one-time run, or write it to flash for repeated or production use.
  • Mercury 2 Core: it has no USB port, so connect a JTAG programmer to its JTAG header.

How do I insert and remove the board from a breadboard?

Hold the board by all four corners and keep it level, pushing or pulling straight up or down. Tilting it can bend or break pins.

Support

Do your products come with a warranty?

Yes. We guarantee our products against manufacturing defects for 90 days from purchase. We test every board before it ships, but if you think yours has a defect, contact us and an engineer will help diagnose it.

My question isn’t here

Try Resources for manuals and tutorials, or contact us.