PYNQ: PYTHON PRODUCTIVITY FOR ZYNQ

Need guidance on implementing neural network on PYNQ-Z2

How do I implement my own trained neural network on the PYNQ-Z2?

Do I have to create my own overlay? If yes, how do I start doing that? If no, then how do I know whether the overlays on git is suitable for my network?

(I have no prior knowledge on FPGA)

Have you looked at any of the NN projects & research here: http://www.pynq.io/community.html?

Find one that best fits your goal and modify it to suit your needs. I expect that you will need to customize the code to suit your specific needs. But that really depends on the details of your goals.

If you need help creating your own overlay, there are step-by-step instructions on the Pynq site and numerous videos on YouTube. I found this one to be a very good intro: https://www.youtube.com/watch?v=Dupyek4NUoI&t=791s

In order to recreate the hardware designs for https://github.com/Xilinx/BNN-PYNQ , it says I need a Linux machine but will a Windows 10 Home be enough?

The framework/scripts are based on Linux. You may be abel to use a Virtual Machine on your WIndows laptop.

Cathal

I am having problems with the hardware design rebuilt.

After entering ./make-hw.sh cnvW1A1 pynqZ1-Z2 a on a terminal in Ubuntu 16.04.03 LTS,

I got the following CRITICAL WARNING:

Setting up Vivado project…

****** Vivado v2018.2 (64-bit)
**** SW Build 2258646 on Thu Jun 14 20:02:38 MDT 2018
**** IP Build 2256618 on Thu Jun 14 22:10:49 MDT 2018
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

source /home/them/BNN-PYNQ/bnn/src//library/script/pynqZ1-Z2/make-vivado-proj.tcl -notrace
INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1700] Loaded user IP repository ‘/home/them/BNN-PYNQ/bnn/src/network/output/hls-syn/cnvW1A1-pynqZ1-Z2/sol1/impl/ip’.
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository ‘/opt/Xilinx/Vivado/2018.2/data/ip’.
Wrote : </home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/procsys.bd>
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_M_AXI_GP0_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_M_AXI_GP1_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_ACP_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_GP0_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_GP1_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_HP0_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_HP1_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_HP2_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [BD 41-737] Cannot set the parameter PCW_S_AXI_HP3_FREQMHZ on /ps7. It is read-only.
CRITICAL WARNING: [PSU-1] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 has negative value -0.009 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-2] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 has negative value -0.033 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-1] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 has negative value -0.009 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-2] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 has negative value -0.033 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-1] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 has negative value -0.009 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-2] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 has negative value -0.033 . PS DDR interfaces might fail when entering negative DQS skew values.
</ps7/S_AXI_HP0/HP0_DDR_LOWOCM> is being mapped into </BlackBoxJam_0/Data_m_axi_hostmem> at <0x00000000 [ 512M ]>
</BlackBoxJam_0/s_axi_control/Reg> is being mapped into </ps7/Data> at <0x43C00000 [ 64K ]>
Wrote : </home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/procsys.bd>
CRITICAL WARNING: [PSU-1] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 has negative value -0.009 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-2] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 has negative value -0.033 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-1] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_2 has negative value -0.009 . PS DDR interfaces might fail when entering negative DQS skew values.
CRITICAL WARNING: [PSU-2] Parameter : PCW_UIPARAM_DDR_DQS_TO_CLK_DELAY_3 has negative value -0.033 . PS DDR interfaces might fail when entering negative DQS skew values.
Wrote : </home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/procsys.bd>

When I opened cnvW1A1-pynqZ1-Z2.xpr,

the Tcl console output the following:

start_gui

open_project /home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.xpr
open_project /home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.xpr
Scanning sources…
Finished scanning sources
INFO: [IP_Flow 19-234] Refreshing IP repositories
INFO: [IP_Flow 19-1700] Loaded user IP repository ‘/home/them/BNN-PYNQ/bnn/src/network/output/hls-syn/cnvW1A1-pynqZ1-Z2/sol1/impl/ip’.
INFO: [IP_Flow 19-2313] Loaded Vivado IP repository ‘/opt/Xilinx/Vivado/2018.2/data/ip’.
WARNING: [IP_Flow 19-3664] IP ‘procsys_BlackBoxJam_0_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_BlackBoxJam_0_0/procsys_BlackBoxJam_0_0.dcp’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_BlackBoxJam_0_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_BlackBoxJam_0_0/procsys_BlackBoxJam_0_0_stub.v’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_BlackBoxJam_0_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_BlackBoxJam_0_0/procsys_BlackBoxJam_0_0_stub.vhdl’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_BlackBoxJam_0_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_BlackBoxJam_0_0/procsys_BlackBoxJam_0_0_sim_netlist.v’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_BlackBoxJam_0_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_BlackBoxJam_0_0/procsys_BlackBoxJam_0_0_sim_netlist.vhdl’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_auto_pc_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_auto_pc_0/procsys_auto_pc_0.dcp’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_auto_pc_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_auto_pc_0/procsys_auto_pc_0_stub.v’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_auto_pc_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_auto_pc_0/procsys_auto_pc_0_stub.vhdl’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_auto_pc_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_auto_pc_0/procsys_auto_pc_0_sim_netlist.v’. Please regenerate to continue.
WARNING: [IP_Flow 19-3664] IP ‘procsys_auto_pc_0’ generated file not found ‘/home/them/BNN-PYNQ/bnn/src/network/output/vivado/cnvW1A1-pynqZ1-Z2/cnvW1A1-pynqZ1-Z2.srcs/sources_1/bd/procsys/ip/procsys_auto_pc_0/procsys_auto_pc_0_sim_netlist.vhdl’. Please regenerate to continue.
open_project: Time (s): cpu = 00:00:14 ; elapsed = 00:00:16 . Memory (MB): peak = 6007.227 ; gain = 116.625 ; free physical = 211 ; free virtual = 2497
update_compile_order -fileset sources_1

I was wondering if you are using 2018.2 vivado to open a 2018.3 project?

Woops. The “Hardware design rebuild” section on the BNN git said the terminal commands were tested with 2018.2 so I assumed that the project was in 2018.2 so I installed the 2018.2 Vivado WebPack. Thanks for pointing it out.