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.
i think i have one of these laying around from years back, or am i thinking of something else?
You might be thinking of the Parallella, it had a Zynq plus their Epiphany multicore chip.
no it had a white soldermask i got it from sparkfun
Of course FPGAs with integrated CPUs aren’t new; Xilinx has integrated PowerPC into their Virtex line of FPGAs since 2004. But Zynq has made such things much more accessible.
What were we supposed to be seeing in the video?
Capacitive version of Hello world and blinky
Microsemi has one of these too. With a FLASH-based FPGA. Unfortunately the CPU has no MMU, so you have to run uCLinux.
I don’t know about Xilinx but Altera has a well developed Linux ecosystem for their Nios 2 soft processors. I imagine the same goes for their chips with hard processors.
Yes, they do. I’m doing some Linux software development for an Arria 10 right now.
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.
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.
Vivado doesn’t run on the ARM it only runs on a PC
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.
If you’re interested in ARM+FPGA SoC’s, Xilinx Zynq isn’t the only game in town. Also check out the Altera Cyclone chips, such as those on boards by Terasic:
http://www.terasic.com.tw/cgi-bin/page/archive.pl?Language=English&CategoryNo=204#Category205
PYNQ provides a Python based software infrastructure for interfacing to the FPGA part of the Zynq which can run on this board. PYNQ is available as a bootable SD card image. You can connect to the board and program in Python in a web browser using Jupiter Notebooks http://www.pynq.io and http://www.github.com/xilinx/pynq