AVNET MicroZed SOM 7Z010 + Carrier Card - Review

Table of contents

RoadTest: AVNET MicroZed SOM 7Z010 + Carrier Card

Author: dimiterk

Creation date:

Evaluation Type: Development Boards & Tools

Did you receive all parts the manufacturer stated would be included in the package?: True

What other parts do you consider comparable to this product?:

What were the biggest problems encountered?: The Microzed carrier for Arduino does not have a PDF schematic so pinout needs to be decoded from the App note tables.

Detailed Review:

This review will take a look at Microzed 7010 from Avnet. This is a small board with a ZYNQ7010 Xilinx SOC.

 

In this review I'll extend the base image with some additonal peripherals as well as test the Vitis acceleration workflow.

 

 

1. Un-boxing

 

The box contained 1) the Microzed 7010 2) a JTAG programmer from Digilent and 3) The Microzed Carrier board for Arduino.

 

Below are some un-boxing photos of the 3 parts.

image

 

{gallery} My Gallery Title
image
image

 

 

 

2. OOB image testing

 

 

For this review we will use Vivado 2021.1 also known as Vivado ML.

To replicate the base design the Avnet repo will be used.

 

The embedded NOR flash comes preloaded with a basic minimial Linux version.

 

The following will build a SD image in wic format.

 

git clone https://github.com/Avnet/bdf.git
git clone https://github.com/Avnet/petalinux.git -b 2021.1
git clone https://github.com/Avnet/hdl.git -b 2021.1
git clone https://github.com/Avnet/vitis.git -b 2021.1
cd vitis/
make mz7010_som

 

Once the Vivado and Petalinux scripts are finished running the images will be copied under /tftpboot under /. Burn the rootfs.wic file on a micro SD card and install the SD card under the Microzed.

Next change the jumpers to that the Microzed can boot from the SD card.

As the default jumpers are set to boot from the on-board NOR flash.

 

image

 

As you can see from the image above there are no /i2c or /spi devices as these are not enabled under the PS side using the Avnet base design.

 

The OOB image generated from Vitis does not have any I2C , SPI or GPIOs enabled.  These peripherals can be enabled on the PS or PL side.

 

image

Figure 1. Enable the Xilinx IIC controller in the petalinux Kernel

 

The Vivado design below implements a design with some AXI SPI, UART and I2C peripehrals connected to the Arduino connector.

The  Arduino analog pins are connected to analog pins on the Microzed unlike the Minized where the are connected to PL pins.

To enable this the Petalinux kernel has to be edited.

 

image

 

Next also enable the UART and I2C from the PS side:

 

The following peripherals are included:

a) PS I2C

b) PS Uart

c) PL SPI

d) PL GPIO

 

The device tree under /meta-user/recipes-bsp/device-treefiles/system-user.dtsi has to be edited.

Here we add the device tree configurations for the AXI SPI and AXI Lite UART as well as the two  PS Uarts.

 

/include/ "system-conf.dtsi"
/ {

    aliases {
        serial0 = &uart1;
        serial1 = &uart0;        
        serial2 = &axi_uartlite_0;
        spi1 = &axi_quad_spi_0;
    };

};


&uart1 {
       status = "okay";
    current-speed = <115200>;
    port-number = <1>;
};


&uart0 {
       status = "okay";
    current-speed = <115200>;
    port-number = <0>;
};


&axi_uartlite_0 {
       status = "okay";
    current-speed = <115200>;
    port-number = <2>;
};


&axi_quad_spi_0 {
    is-decoded-cs = <0>;
    num-cs = <1>;
    status = "okay";
        spidev@0x1{
                 compatible = "spidev";
                 spi-max-frequency = <20000000>;
                 reg = <0>;
        };
};


&axi_iic_0 {
    status = "okay";


};

 

 

Next  , the kernel needs to be configured to add kernel module support for these peripherals:

 

Issue

petalinux-config -c kernel

 

and  enable :

 

a) I2C (both cadence and Xilinx ) under Drivers

b) SPI (Xilinx controller)

 

In addition also enable the camera sensor kernel drivers under Multimedia.

 

image

 

Note that the device tree needs to be edited again with the camera I2C address in order to access the device from userspace.

 

Once the Petalinux kernel modifications are complete, recompile the kernel and rootfs again and generate the boot.bin file.

petalinux-build -c avnet-image-full

petalinux-package --boot --force --fsbl ./images/linux/zynq_fsbl.elf --fpga ./images/linux/system.bit --uboot

 

The next step is to copy the boot.bin, boot.scr and uimage.bin from /images/linux directory to the first partition of the SD card.

For this part a PYNQ rootfs was used, so there is no need to update the rootfs.

 

image

Rebooting the board , and checking under /dev shows that all the peripherals are accessible from userspace.

One thing to note is that even with the internal pull-ups are not enough sometimes on the PS IIC brought out via EMIO so external pull-ups are recommended.

 

image

 

Using I2Cdetect we can query individual busses:

image

 

 

3. PYNQ Application

 

We can easily leverage the PYNQ framework on the Microzed 7010. PYNQ can be built either by following the recipes on the PYNQ website , creating from BSP or using the provided rootfs as well as matching kernel.

 

Even though this is not formally supported , using a Petalinux 2021.1 kernel works with the PYNQ 2.6 rootfs.

 

Vivado 2021.1 removes Vivado HLS and only uses Vitis HLS. There are some breaking differences between the two with respect to the AXI stream implementation

of the Vitis libraries core so code implemented on Vivado HLS won't work or generate the same IP interface on Vitis HLS due to differences in directives.

 

Since spidev is activated now we can use the SPI from userspace.

Install spidev :

pip install spidev

 

 

Next we can test the GPIO pins using the following snippet of code.

 

from pynq.lib import AxiGPIO
gp_instance = axi_gpio_design.ip_dict['leds']
tft = AxiGPIO(gp_instance).channel1

tft[0].write(0x1)

from time import sleep

tft[0].write(0x1)
sleep(1)
tft[0].write(0x0)
sleep(1)

tft[0].off()
led[0:].write(0xf)

 

Combining both , this allows to  implement a driver for a TFT  display.

In this case , I used the added serial port from PS to print data from the GPS.

 

{gallery} Microzed
image
image

 

 

 

 

 

4. Vitis acceleration

 

Last but not least the Vitis acceleration flow was also tested.

This is included on the Avnet 2021.1 Github repository scripts however it is not fully implemented.

 

One option is to create this manually.

The steps are :

a) create the Petalinux design

b) create the SDK and generet SYSROOT

c) Create a platform by providing SYSROOT, Boot.bin location and BIF

d) Create accelerated app

e) Copy generated xclbin to SD card and run

 

{gallery} Vitis Acceleration
image
image
image
image
image
image
image
image

 

The program requires copying the vaddtest host program and xclbin file under the /mnt as copying under root gives a libcrypt issue.

Pynq can also be used to load the xclbin file.

 

image

 



 

The Good

1. Microzed board is a solid board used in a variety of applications such as radar, IOT, DSP , SDR and instrumentation.

2. The Microzed board contains Ethernet as well as USB port , plenty of pins as well as multi-boot support (micro-SD, NOR).

3. Can be easily upgraded with a Microzed 7020 which contains more  FPGA resources and a dual core Cortex A9.

 

The Bad

1. The Microzed carrier for Arduino board schematics are not open so you'll have to decode the pin mappings from the application note.

Anonymous