The Linux FPGA

It was never unusual to have a CPU and an FPGA together. After all, each has different strengths and weaknesses. However, newer devices like the Xilinx Zynq have both a CPU and an FPGA in the same package. That means your design has to span hardware, FPGA configurations, and software. [Mitchell Orsucci] was using a Zynq device on a ArtyZ7-20 board and decided he wanted to use Linux to operate the ARM processor and provide user-space tools to interface with the FPGA and reconfigure it dynamically.

This sounds like a big project and it certainly isn’t trivial by any means. However, the Xilinx tools do a lot of the heavy lifting, including setting up the Linux kernel and a suitable root file system. The bulk of [Mitchell’s] work was in developing user space tools for Linux programs to interact with the FPGA hardware. You can see a short video demo below.

The design exposes an I2C interface, an SPI interface, a PWM controller, and 10 digital I/O pins to the Linux side. Both the schematics and the source code are on GitHub.

We’ve seen the Zynq do everything from synthesizing music to power astrophotography cameras. While it is a lot of work to build software and hardware together, the results are worth it and the tools will help.

14 thoughts on “The Linux FPGA

  1. Currently I am using L4/Fiasco on the zedboard (zynq) to run l4linux instances. L4 controls who has access to which parts of the hardware. For example I could have a L4 server control a device on the fpga and communicate with the l4linux controlling the network and the sd card.

  2. I thought only Lattice devices had an open toolchain for use with Linux. If you can run Vivado (or whatever) on the ARM core it’s a great improvement.
    Now just add a USB port [or hack keyboard & mouse to use PMOD connectors] and you almost have a fully functional computer.

  3. Ok, here is what he did:
    “I wrote a basic library that can be found at the linked github for using Linux device drivers (in the case of SPI, I2C, and UART) to control the relevant hardware in the FPGA. GPIOs and PWMs are controlled using the UIO device driver. However, using ArtyZ7.c and ArtyZ7.h will abstract this away and compile all the FPGA hardware into a simple, easy to use library.”

    I did not get what was special about this compared to all other Linux+Zynq projects out there.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s