Skip to main content

Oxidising the FPGA

This part of my page explains and documents the usage of the Rust programming language on FPGAs.

But why?

Most FPGA vendors (Altera, Xilinx, etc.) provide some sort of soft-cores that implement processors on their FPGAs. In addition, they provide a system for plugging different peripherals to these processors in the form of modular IP cores. This system is nice, as one can spec out a microcontroller / SoC to its likings, getting everything one might want (and is able to implement) and nothing that is not needed. This can allow for fairly efficient implementations of systems inside of FPGAs.

For previous generations, these CPUs implemented custom instruction sets (e.g. NIOS for Altera chips) that required custom compilers and tooling shipped by the vendors. The recent popularization of the RISC-V architecture influenced this field, too: both of the big vendors adapted a RISC-V based soft core:

  • AMD / Xilinx: The MicroBlaze V
  • Intel / Altera: The NIOS V

This essentially blows the door wide open for generic RISC-V tooling such as compilers, linkers, etc... Conveniently, this enables the use of LLVM, as it can target RISC-V, and where you have LLVM, you can also have Rust.

So that's why: Because it is possible. Rust is becoming quite popular in the embedded space due to its bare-metal ability and robustness. Combine this with the use of the soft-processors in embedded and industrial settings, you essentially open a whole new area of interest and use for the Rust programming language.

About this series

This series will go into the details and and ways to enable and bootstrap the Rust programming language on these soft-cores. It will explain the basic building blocks of a softcore system and running a bare-metal hello world on these cores in the Rust programming language.

Disclaimer

This series has been tested and developed based on the Intel / Altera tools. The hardware / FPGA part is therefore only compatible with the Quartus tools and only tested on the following FPGAs (as that is what I have access to):

  • Cyclone IV
  • Cyclone V
  • Cyclone 10 LP