Let’s get started with Zynq AP SoC
1. Motivation
The first goal of this project is to learn;
- Hardware designing using HDL (Hardware Description Language)
- Device driver (firmware) development
- User application programming on Linux
For this purpose, Programmable SoC (System on Chip) is perfect fit since it has both configurable hardware, and processor(s) inside.
2. What is SoC (System on Chip)
System on Chip is a silicon chip with Processor(s) and built-in Peripherals inside. Therefore, you can build the system without having much peripherals on PCB (Printed Circuit Board). The advantage of SoC is, the physical size of the device, however, SoC tends to be used in specific application since it’s not really customizable. In some cases, SoC is also called ASIC (Application Specific Integrated Circuit), and in that case, the peripherals embedded inside tend to be application specific devices like accelerator, DSP (Digital Signal Processor), or GPU (Graphic Processing Unit).
There are some different types of SoCs, but in this series, “SoC” means Programmable SoC, which has processor(s), peripherals, and configurable hardware (FPGA) in one chip.
3. Equipment
Avnet Zedboard … This board is equipped with Xilinx Zynq All Programmable SoC (System on Chip). Zynq has 2 key components which suit for this purpose;
- Processor (dual-core ARM cortex-A9) which is capable of running Linux
- FPGA (Field Programmable Gate Array)
FPGA is a programmable device. We can build our own hardware module in it using HDL (Hardware Description Language). This FPGA block in Zynq is called PL (Programmable Logic), and is directly connected to the ARM cortex-A9 processor via AXI bus. Detailed diagram can be found here;
The block which includes ARM cortex-A9 processor is called PS (Processing System), which also provides the capability of running Linux. Lastly, Zynq has MIO (Multiplexed I/O), and which interfaces cortex-A9 processor with UART, SD Card, QSPI flash, and so on.
Zedboard is neither the cheapest, nor the highest-end. There are multiple alternatives like Zybo, Zynqberry and so on. Refer to the link below to look for the best option for your original project.
FPGA Deveopper: Comparison of Zynq boards
4. Development (On going)
The scope of this project is huge. It involves hardware designing, booting Linux on ARM device, firmware development (device driver), and user application programming. So the whole project is divided into multiple small milestones. Click the links below to jump to the detailed explanation.
First step: Get Basic System working
- Basic standalone hardware designing
- Connecting device to processor
- Basic bare-metal user application
- Bootloader: Booting device from SD
Second step: Building System with Linux
- Second-Stage Bootloader (U-Boot)
- Booting Linux with ramdisk
- Booting full-blown Linux
- Further customizations for U-Boot
- Basic device driver development
- User application programming on Linux
Third step: Little advanced system development
- Interrupt handling
- DMA handling
Forth step: Developing USB slave device
- Device side USB-OTG device driver
- Host side USB device driver