FPGAs for the average engineer

October 4, 2016

You know Raspberry Pi, Arduino, Throw them away, these are toys for children. System on Chips are for adults.

Ishtar Plasmaantenne

FPGAs to power a plasma source

I am kidding, I love the Raspberry Pi, but what the SoC offer opens a new dimension. Let’s take the example of the Red Pitaya: its two main features: A zynQ 700 which combines a FPGA with a double core CPU and 2ADC-2DCA at 125 megasamples per second which make you possible to receive and emit signal in the MHz range. For a price of around 300 euros. This means first that you have a fast digitizer available and you can play in the radio range. And second, this digitizer is connected to a FPGA so that you can do processing operations like FFT, filtering and so on at MHz speed! This is really a great tool, not only to learn but also for practical applications. I use it for instance to generate a signal, which is amplified by a 1kW amplifier and injected in a plasma to investigate the propagation of waves in it. This is super easy to code in C and python, you can use the GPIO to get trigger signals or activate other systems, you can integrate easily in a global control system. I use it as well to measure high frequency instabilities in a tokamak plasma with a realtime FFT to reduce the required amount of data to store.

In standard, it comes with a free version of Vivado (i.e. missing all high level features but fine you do not really need them). The most difficult part is to install it and to support its xxx GB of required space. The program itself is not buggy (at least, not at the level I use it) and you can really learn how to code hardware in Verilog or VHDL: this is rather exciting when you understand how it works and that you start to see gates and flip-flops through the code.

The big advantage of the Redpitaya is that it is open source. Vivid and Xilinx provide also a lot of documentation. So, when a problem occurs (which happens every two minutes at the beginning), you have resources to find the solution rather easily. I would like to give here the most interesting links where to learn about the hardware:

  • Red Pitaya Notes by P. Demin: this is the big big big reference. There is a bunch of interesting projects, with SDR, even nuclear magnetic resonance and a clean, version-controlled method to manage the FPGA code and the associated linux ecosystem.
  • Vivado’s youtube tutorial by M. Sadri: everything about Vivado from simulation to debugging. It takes time to get through them but this is no loss of time
  • Building Linux on Zynq: this basically teaches you how to install an embedded Linux and the roles of the different components from the boot to the shell.

Beyond that, you can start to have very interesting stuff: building bare metal applications which do not require an OS, you can try to use Rust to gain in security and develop your own flexible and optimized PLC that suits your needs and not the bank account of big instrumentation companies.


%d bloggers like this: