SDK related questions - DigitalMediaProfessionals/dv-sdk GitHub Wiki

FAQ lists

  1. How to login to the system (username/password)?
  2. Can I cross compile the drivers and applications on my host PC?
  3. What layout does the AI processor use for its I/O buffers?
  4. When I run the network convertor, it returns ModuleNotFoundError: No module named 'google'.
  5. How to change frequency of AI processor?
  6. How to get temperature measurement of AI processor?
  7. How to get power measurement of AI processor?
  8. How to render using OpenCV (or other framework)? / Can I use other drawing API? / Can I use X window?
  9. About TensorFlow support.
  10. How to build kernel image from source?

How to login to the system (username/password)?

Ans: The default user account ans password is ubuntu:ubuntu.

Can I cross compile the drivers and applications on my host PC?

Ans: It is possible, please see this section for detail.
NOTE: DMP does not support build with cross compile tools.

What layout does the AI processor use for its I/O buffers?

Ans: For convolution block it uses DWHC layout. For fully connected block it uses 1D array. Please see Network input output layout for detailed description.

When I run the network convertor, it returns ModuleNotFoundError: No module named 'google'.

Ans: Some packages required by the network convertor is not installed. If the board is connected to internet, one can run the following command to install required packages:

$ sudo apt install python3-protobuf python3-h5py python3-jinja2

If the board is not connected to the internet, please follow the instructions on this page to update to latest SDK image.

How to change frequency of AI processor?

Ans: When using zia-firmware-c3-emmc/zia-firmware-c3-sd of version 7.1.20190410 or later, set_ai_freq.sh script in dv-sdk changes the frequency (please replace <freq> with the desired frequency(MHz).):

$ cd dv-sdk/utils/scripts
$ bash set_ai_freq.sh <freq>

NOTE please attach FAN to AI FPGA Module if <freq> is over 100. For how to attach, see ZIAC3_HowToAttach_FAN.pdf.

How to get temperature measurement of AI processor?

Ans: On ZIA C3, please build and install this temperature measurement kernel module by make && sudo insmod zia_c3_temp_mon.ko, then run the temperature measurement script. Please refer to Xilinx Documentation ug1085 - Zynq UltraScale+ Device Technical Reference Manual for documentation of each power domain.

On ZIA C2, please build and install this temperature measurement kernel module by make && sudo insmod zia_c2_temp_mon.ko, then run this command: cat /sys/class/hwmon/hwmon1/temp1_input to get the temperature.

How to get power measurement of AI processor?

Please use lm-sensors.

How to render using OpenCV (or other framework)? / Can I use other drawing API? / Can I use X window?

Ans: To reduce overhead, demo applications in DV SDK directly renders to framebuffer using AGG library. But one can still render with other frameworks like OpenCV or Qt, GTK, etc. First one needs to install X window as most these frameworks connects to an X server. Use the following commands to install X window and the lightdm window manager:

$ sudo apt-get update
$ sudo apt-get install lightdm
$ sudo apt-get install xubuntu-desktop

Then use the following commands to enter graphical interface:

$ sudo mv /dev/dri /dev/dri.bak
$ sudo service lightdm start

The first commands is to workaround a Xilinx DRI driver issue and these commands should be executed every time one wants to enter graphical interface.

If one wants to enter GUI automatically after boot, use the following steps:

  1. Edit the /lib/systemd/system/lightdm.service file
    $ sudo nano /lib/systemd/system/lightdm.service
    Add the following line before the line ExecStart=/usr/sbin/lightdm
    ExecStartPre=/bin/bash -c 'if [ -d "/dev/dri" ]; then mv /dev/dri /dev/dri.bak; fi'
  2. Run the following command to use GUI by default.
    $ sudo systemctl set-default graphical.target
    (To revert back to use console mode as default, run this command)
    $ sudo systemctl set-default multi-user.target

Afet the X window graphical interface is correctly installed and started, one can then install any rendering frameworks one likes to use to do rendering.

About TensorFlow support.

Please refer to the TensorFlow Support page.

How to build kernel image from source?

The following instructions are only for building the kernel image on the AI FPGA module. Cross compiling from PC is possible, but the detail will not be discussed here.

  1. Install the zia-kernel-source-c3 package following instructions on the Update SDK or Add New DMP Packages page. Change current directory to the root of kernel source ~/kernel/source/.
  2. (Optionally) Change kernel config before build if necessary.
    $ make menuconfig
  3. Make the kernel image.
    $ make Image.gz
  4. Download this image.its file and put it to the root directory of kernel source. Then run the following command to build the boot image image.ub.
    $ mkimage -f image.its image.ub
    One may needs to install u-boot-tools apt package first to get the mkimage tool.
  5. Copy the built kernel image to /media/card/, then reboot the AI FPGA module to use the new kernel.
⚠️ **GitHub.com Fallback** ⚠️