This is one backend designed to be used with f4graph and Halide-HLS.
- hw: Scripts to build a hardware system which contains an accelerator, cameras, and DisplayPort output
- ubuntu: scripts to build a root filesystem from Ubuntu base. This is a convenient base system for development, since it makes it easy to install lots of development packages and other utilities without recompiling the whole rootfs in Petalinux.
- drivers: Kernel drivers for pushing images through accelerators created with Halide-HLS.
- hwutils: tcl scripts and other utilities that we've created for debugging and testing FPGA designs.
- petalinux: petalinux project for building all the boot collateral.
- realtime: Real-time code for controlling cameras and hardware accelerators, which interfaces with the f4graph runtime.
- doc: various bits of documentation and notes.
At the moment, this supports the UltraZed-EG with either the IO carrier card or the PCIe carrier card.
Currently supported version of Vivado is 2017.2.
- (Optional) Create one or more hardware accelerators with Halide, and ensure that HLS has packaged them as IP cores.
- Copy
hwconfig.exampletohwconfig.userand edit it to specify the design you want. - Run
python extractparams.pyto extract the parameters from the IP cores and place them in the configuration file. - In the
hwdirectory, runpython ../parameterize.py ../hwconfig.all mkproject.tcl.mako:mkproject.tclto generate a Tcl script that will create the design. - Open Vivado and in the Tcl console run
source mkproject.tcl. Or runvivado -mode batch -source mkproject.tclto avoid running the GUI.
The design will be created, and Vivado should produce a bitstream. From here you can use the petalinux build script to create the boot collateral.
- In the
petalinuxdirectory, run./build_petalinux.sh VIVADO_EXPORT_DIR PROJECT_DIR, whereVIVADO_EXPORT_DIRpoints to the SDK export, andPROJECT_DIRis the project directory name. Based on your vivado version, you may need to manually launch Vivado SDK to set up SDK files after generating bitstream. Currently the script will createPROJECT_DIRfor you. - Once the build finishes, copy
images/linux/BOOT.BINandimages/linux/image.ubto the device's boot partition
It will setup a Ubuntu file system, including its package repositories.
-
Modify
build_rootfs.shso thatTARGETis pointing to the device's root partition -
Run
build_rootfs.shwith root privilege. Because it useschroot, during the execution anything like CTRL + C will have unexpected results. You can use a virtual machine if that's the concern. -
Copy libraries to the Ubuntu root filesystem. The easiest way to do this is to extract the PetaLinux-built root filesystem and copy the entire
/lib/modules/directory.