Ruurd
Ruurd

Apr 12, 2024 3 min read

Adventures with FPGAs

This is the start of a series of posts.

I’ve had a personal goal to start exploring FPGAs for a long time. As a software engineer, I was always drawn to the performance side: debugging, profiling, getting as close to the metal as possible. FPGAs are the furthest down you can go before you start designing your own chips. On the other hand, as a physical engineer, I’ve been in cleanrooms baking my own chips - with very limited levels of logic - years ago. So this area felt like the missing link in the middle.

Goal

The goal here wasn’t so much to master hardware description languages like VHDL or Verilog. Rather, I accepted some level of expertise with those could be a nice bonus from exploring my main interests: acceleration and integration use cases and trying soft CPUs with new specialized instructions implemented in FPGA logic.

First steps

My firsts steps were to read lots of blogs, watch videos (FPGA Zealot), and read a couple books - special mention for Russell Merrick’s Getting Started with FPGAs. In addition there are some excellent Reddit and Discord servers where enthusiasts share their knowledge. I then explored toolchains - design steps, GUIs (Vivado, Quartus), vendor specifics, and later toolchain automation with Migen and complete System on a chip (SoC) design with LiteX.

Hardware

If you just want to learn VHDL or Verilog and basic logic design, you don’t even need hardware: you can in principle just design and test using the toolchain. That is however quite boring, and some hardware with LEDs, switches etc. does really bring what you are doing to life.

Board selection

As it’s just hobby and exploratory for now, I didn’t want to pay too much. On the other hand - although it would make more sense - I didn’t want to start with a typical entry level/toy board as my primary interest wasn’t to go deep on VHDL/Verilog but rather on hooking up more high end integrations like DDR, PCIe, 1G+ networking in combination with Soft CPUs and experiment with different CPU instruction sets (ARM, x64, RiscV).

It turns out this is difficult in this niche space: 10+ years old devices are still going for the prices they launched at. There is some innovation with process nodes, but it’s marginal. Where for typical semiconductor tech (CPUs, RAM, etc.) you expect single unit prices to be somewhat lower than mass, here it can typically be 10x or more.

So my bet was on the 2nd hand market. Prices were typically still steep, especially for dev kits, but that makes sense as they aren’t mass produced. Since this quest for used FPGAs became quite detailed, you can find a seperate blog here where I describe which FPGAs I did find at reasonable prices.

For all selected boards, I ran through:

  • visual inspection
  • power on + check of vitals
  • connecting to the board (through JTAG or other)
  • bring on (program with a design to activate the most useful peripherals)
  • LiteX SoC bring on

The board collection I did this for so far (this will be updated):

The boards still waiting:

  • Microsoft Longs Peak (Altera Arria 10)
  • Gidel Hawkeye (Altera Arria 10)

For all of the functioning boards, I’ll write seperate blogs documenting the effort.

Actual goal - hardware acceleration

This will be updated as well once I get here. Remember it’s a hobby :)