Quick Start - DigitalMediaProfessionals/dv-sdk GitHub Wiki

Here we introduce how to build and run sample application on AI FPGA module (referred to as MODULE) shortly.

Environment Setup

MODULE contains environment for executing sample applications with SDK. SDK is preinstalled in a SD card for ZIA C2 or eMMC for ZIA C3.

To run the network convertor (referred to as the convertor) on your PC, see Environment setup.

Connect to MODULE

Open a terminal and connect to MODULE. One way to connect to it is described in Connecting AI FPGA Module to PC page.

After MODULE is turned on, The default username and password to login to the system is ubuntu:ubuntu.

Update SDK and driver/firmware

It is recommended to update the SDK and driver/firmware to the newest version at first. Please follow the instructions in Update SDK or Add New DMP Packages page to update it. The pre-installed version is also working, but new version provides some optimization and bug fixes.

SDK folder

In the distributed SD card images, the SDK folder named dv-sdk is already there under the home folder. The SDK sturcture is describe in this page. The following steps will assume one is currently in the home folder.

Build

The pre-installed SDK also built all demo applications already, so the following steps can be skipped.

Just type make in the SDK root folder will build the driver, the utility library and all demo applications in the SDK.

$ cd dv-sdk
$ make

To build them individually, run make in their corresponding sub-folders.
For example, to build sample applications:

$ cd dv-sdk/application
$ make

Run sample applications on AI FPGA board

The previous step will build all sample application binaries under dv-sdk/application/bin. The corresponding weight files needs to be put in the same folder (*_weights.bin files). If there are no weight files then one needs to run the convertor to generate them. Note that we recommend to do this conversion on PC or server because computation resources on MODULE is limitted.

For example, to generate the weight file for CaffeMobileNet application, run this command:

$ cd dv-sdk/tool
$ python3 convertor.py ../application/model/caffe_mobilenet.ini

Then after a monitor is connected to MODULE via HDMI port or display port, one can execute the sample applications to verify the SDK is correctly setup.

For example, to run the Caffe MobileNet sample application, run this command:

$ cd dv-sdk/application/bin
$ sudo ./CaffeMobileNet