As we have discussed several times in this blog, programmable logic is ideal for the development of image processing systems due to its parallel architecture.
One of the nice things about the Avnet ZUBoard 1CG is that it provides developers with three high-speed IO connectors. These high-speed IO connectors are very similar to SYZYGY, however, they are not fully compliant. Two HSIO interfaces provide access to the GTR transceivers along with either PS MIO or PL IO. The third HSIO provides a standard interface which connects to the PS MIO and PL IO. It is this third HSIO interface that we can use to connect to the Avnet dual-camera HSIO module.
The Avnet dual-camera HSIO module provides developers with dual, one-megapixel CAV10-000A monochrome image sensors coupled with a Onsemi AP1302 co-processor. The AP1302 receives and processes the images from the image sensors and then combines them into a single MIPI stream which can be received by the ZUBoard.
In this blog, we are going to look at how to get this system up and running very quickly with a base design which we are then going to be able to modify at a later time.
To do this, we are going to build both a Vivado project and a PetaLinux project which controls the image processing chain and makes the images available over Ethernet since the ZUBoard doesn’t have a display port connector. As we need to build a Petalinux image, I built this on a Linux machine using Vivado / PetaLinux 2022.2 for easier access.
Building this application is pretty straight forward. We are going to use several build scripts which are provided on Avnet’s GitHub. As such we need to clone the following repositories:
Board Definition Files – This defines the board definitions for all of the Avnet boards.
HDL – This contains hardware project build scripts for all Avnet boards.
PetaLinux – This contains PetaLinux build scripts for all Avnet boards.
We need to make sure we clone the HDL and PetaLinux repositories at 2022.2 branch. The commands to use are below.
$ git clone https://github.com/Avnet/bdf $ git clone -b 2022.2 https://github.com/Avnet/hdl $ git clone -b 2022.2 https://github.com/Avnet/petalinux
Once we have cloned the repositories, we are able to build the project. To do this, we need to change the directory into the PetaLinux directory and run the make_zub1cg_sbc_base.sh script under the scripts directory.
This script will build the Vivado project, export the XSA, and then build a PetaLinux image for the board. Depending on your machine, this might take a few minutes or longer.
While the project is building, we can prepare our development machine and ensure it has the correct application installed. So we are able to visualize the image received from the ZUBoard over Ethernet, we will be using MobaXterm which enables X11 to be used for the images.
Once the PetaLinux image (rootfs.wic) is available, we are then able to write the image to a SD Card. This can then be inserted into the ZUBoard and ensure the boot mode is set to SD, connect the Ethernet, USB UART and power, and watch the system boot. Also make sure the HSIO Vcc is set to 1v8.
Using the UART terminal allows us to access the IP address of the board so that we are able to connect with MobaXterm.
To start imaging, the next step is to run the Python application which starts the imaging application. We can find the script to run under the directory Avnet_Dualcam_Python_Examples directory. Run the script as shown below.
python3 avnet_dualcam_passthrough.py --sensor ar0144 --mode dual
When this run on the ZUBoard, you will see the X11 images open in the development machine which is connected to the ZUBoard using MobaXterm.
The images seen below are exceptionally crisp and clean.
In another upcoming blog, we will deep dive into the Vivado design and examine how we are able to add image processing features to this pipeline.
Workshops and Webinars
If you enjoyed the blog why not take a look at the free webinars, workshops and training courses we have created over the years. Highlights include
Introduction to Vivado learn how to use AMD Vivado
Ultra96, MiniZed & ZU1 three day course looking at HW, SW and Petalinux
Arty Z7-20 Class looking at HW, SW and Petalinux
Mastering MicroBlaze learn how to create MicroBlaze solutions
HLS Hero Workshop learn how to create High Level Synthesis based solutions
Perfecting Petalinux learn how to create and work with petalinux OS
Embedded System Book
Do you want to know more about designing embedded systems from scratch? Check out our book on creating embedded systems. This book will walk you through all the stages of requirements, architecture, component selection, schematics, layout, and FPGA / software design. We designed and manufactured the board at the heart of the book! The schematics and layout are available in Altium here Learn more about the board (see previous blogs on Bring up, DDR validation, USB, Sensors) and view the schematics here.