Easy FPGA and Embedded Linux on ZYBO

Introduction

In this tutorial series, I am going to share about how to build a system that consists of FPGA and Embedded Linux web application. We are going to build a hardware accelerator for calculating greatest common divisor (GCD) on the FPGA. The GCD core is connected to the CPU ARM Cortex-A9 through the AXI4-Lite bus. On top of the Linux, we are going to build an embedded web application based on Python Flask web framework. The system is illustrated in the following block diagram.

At the end of this tutorial, you will be able to build the following system. You are going to learn how to develop a system that consists of both hardware and software stack. This kind of methodology is usually called hardware/software (HW/SW) co-design. The hands-on skill that you are going to learn is applicable for your future project, such as IoT or Edge AI.

Throughout this tutorial series, you are going to learn the following technology/programming language: Zynq-7000, AXI4-Lite, Ethernet, Embedded Linux, Verilog, C, HTML, CSS, JavaScript, Python, and FlaskThe idea is that the readers can adapt this project to fulfill their needs. I hope this course will be beneficial one for beginners in Zynq FPGA and Linux. So, they can accelerate their learning curve in order to build complete embedded systems that employ FPGA, CPU, Linux OS, and embedded web applications.

Even though I use ZYBO board in this tutorial, you can use other Zynq boards as well. In general, once you understand the concept in this tutorial, you can apply that to any FPGA board. There are several Zynq boards that already come with pre-build Linux OS. So, you just need to follow the setup instructions of the boards. There are several alternative boards that you may want to check out:

  • PYNQ-Z1 or PYNQ-Z2: It comes with pre-build Linux OS and also Python framework for interacting with the PL (FPGA). It can also support interrupt and DMA (Python API). So, you can easily (no need to know about kernel) exploit the benefits of FPGA and microprocessors to build more capable and exciting embedded systems. This board is recommended for you who want to start developing machine learning/deep learning/computer vision on FPGA.
  • STEMlab Red Pitaya: It comes with high speed DAC and ADC for RF communication. It also comes with pre-installed Linux OS and also has built-in oscilloscope software. So, basically, you can use this board as a portable oscilloscope, logic analyzer, etc. This board is recommended for you who want to start developing baseband processor for RF communications on FPGA.

This tutorial is divided into several parts as follows. So, let’s get started!

Contents

Resources

More Resources

In this tutorial, I assume you already know how to use Xilinx Vivado IDE and Xilinx SDK (at least know how to build a simple project like LED blinking). If you are completely new to Xilinx Vivado IDE and Xilinx SDK, I would recommend you to check out this tutorial for the set-by-step hands-on guide on how to use the Vivado. Also, for more premium content, you may want to check out the following course (please follow this link to the course). The course also covers the AXI4-Stream protocol.

Donation

If you benefit from this page, please make a small donation. I suggest $5, but you can choose the amount. We need your help to pay for web hosting, buy new components and equipment for new tutorials, and buy a cup of coffee :). Alternately, you can make a donation by sending me Bitcoin, at address 1JN3zEw8NqCr8bn4UQa3TfZXaz7UZnb5bH