一,PYNQ(Python Productivity for Zynq),即在ZYNQ全可编程ARM&FPGA融合处理架构的基础上,添加了对Python的支持。它有效降低Zynq嵌入式系统的开发门槛,并为人工智能,ADAS,机器视觉等高拓展性/高复杂度应用需求提供更好支撑。PYNQ将ARM处理器与FPGA器件的底层交互逻辑完全封装起来,顶层封装使用python,只需要import对应的模块名称即可导入对应的硬件模块,即可进行底层到上层数据的交互或者为系统提供硬件加速。
硬件和ZYNQ区别不大,PYNQ突出优点在于:可直接调用Python库和FPGA硬件库进行功能的开发,快速高效。
二,社区开源资料:
1 「PYNQ-Z1开发板试用测评」(http://www.digilent.com.cn/community/379.html)
2 「机器学习:如何在PYNQ-Z1上搭建开源二值神经网络BNN」(http://www.digilent.com.cn/community/385.html)
3 「Xilinx BNN-PYNQ框架入门」(https://github.com/Xilinx/BNN-PYNQ)
4 「论文 | 在PYNQ上实现深度递归神经网络语言模型」(http://www.digilent.com.cn/community/584.html)
三,Yocto添加数据库, FTP等应用程序要使用在文件系统加ftp, sqlite3 的方式,步骤如下:
Yocto源代码在qt的文件系统修改路径:
sources/meta-myir-imx6ulx/recipes-fsl/images/fsl-image-qt5.bbappend 中加vsftpd, ftp, sqlite3 。
参考如下:
DESCRIPTION = "Freescale Image - Adds Qt5"
LICENSE = "MIT"
inherit populate_sdk_qt5
require recipes-fsl/images/fsl-image-qt5-validation-imx.bb
IMAGE_FEATURES += "package-management ssh-server-dropbear "
IMAGE_INSTALL += " \
imx-kobs \
tslib \
tslib-calibrate \
tslib-conf \
tslib-tests \
memtester \
bzip2 \
gzip \
canutils \
dosfstools \
mtd-utils \
mtd-utils-ubifs \
ntpdate \
vlan \
tar \
net-tools \
ethtool \
evtest \
i2c-tools \
iperf3 \
iproute2 \
iputils \
udev-extraconf \
iperf \
openssl \
v4l-utils \
alsa-utils \
ppp \
ppp-quectel \
sqlite3 \
libmodbus \
libxml2 \
dbus \
openobex \
hostapd \
iptables \
vsftpd \
openobex \
myir-rc-local \
${@base_contains("MACHINE", "mys6ull14x14", "rtl8188eu-driver", "", d)} \
下面是 core-base 文件系统修改路径(代码略):
sources/meta-myir-imx6ulx/recipes-core/images/core-image-base.bbappend
添加完毕之后,再进行构建文件系统(参考开发手册),此时生成的文件系统就有这些应用程序。
四,Yocto生成ubi格式文件系统的方法:
+++ b/sources/meta-myir-imx6ulx/conf/distro/include/myir-imx-base.inc
@@ -15,7 +15,14 @@ LOCALCONF_VERSION = "1"
IMX_DEFAULT_DISTRO_FEATURES = "largefile opengl ptest multiarch bluez"
IMX_DEFAULT_EXTRA_RDEPENDS = "packagegroup-core-boot"
IMX_DEFAULT_EXTRA_RRECOMMENDS = "kernel-module-af-packet"
-IMAGE_FSTYPES = "tar.bz2 tar.xz ext4 sdcard"
+IMAGE_FSTYPES = "tar.bz2 tar.xz ext4 sdcard ubi"
+
+# Use the expected value of the ubifs filesystem's volume name in the kernel
+UBI_VOLNAME = "rootfs"
+# The biggest NANDs on current modules are 256MB.
+# This sums up to 2048 LEBs available for the ubifs (-c)
+MKUBIFS_ARGS = "-F -m 2048 -e 126976 -c 2048"
+UBINIZE_ARGS = "-m 2048 -p 128KiB -s 2048 -O 2048"