SDK related questions - DigitalMediaProfessionals/dv-sdk GitHub Wiki
- How to login to the system (username/password)?
- Can I cross compile the drivers and applications on my host PC?
- What layout does the AI processor use for its I/O buffers?
- When I run the network convertor, it returns ModuleNotFoundError: No module named 'google'.
- How to change frequency of AI processor?
- How to get temperature measurement of AI processor?
- How to get power measurement of AI processor?
- How to render using OpenCV (or other framework)? / Can I use other drawing API? / Can I use X window?
- About TensorFlow support.
- How to build kernel image from source?
Ans: The default user account ans password is ubuntu
:ubuntu
.
Ans: It is possible, please see this section for detail.
NOTE: DMP does not support build with cross compile tools.
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.
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.
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.
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.
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:
- Edit the
/lib/systemd/system/lightdm.service
fileAdd the following line before the line$ sudo nano /lib/systemd/system/lightdm.service
ExecStart=/usr/sbin/lightdm
ExecStartPre=/bin/bash -c 'if [ -d "/dev/dri" ]; then mv /dev/dri /dev/dri.bak; fi'
- Run the following command to use GUI by default.
(To revert back to use console mode as default, run this command)
$ sudo systemctl set-default graphical.target
$ 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.
Please refer to the TensorFlow Support page.
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.
- 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/
. - (Optionally) Change kernel config before build if necessary.
$ make menuconfig
- Make the kernel image.
$ make Image.gz
- 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
.One may needs to install$ mkimage -f image.its image.ub
u-boot-tools
apt package first to get themkimage
tool. - Copy the built kernel image to
/media/card/
, then reboot the AI FPGA module to use the new kernel.