软件部分见Acceleration of a FIR filter on the PYNQ-Z1 https://gist.github.com/shohei/e618a5befc55ba0c1ba875a284221baf
硬件加速OVERLAY搭建流程如下:
- 新建VIVADO工程,选择PYNQ_Z2
- 新建Block Design,添加ZYNQ,并点击Run Block Automation
- 添加FIR Compiler,Coefficient Vector输入:
-255,-260,-312,-288,-144,153,616,1233,1963,2739,3474,4081,4481,4620,4481,4081,3474,2739,1963,1233,616,153,-144,-288,-312,-260,-255
滤波器系数可以直接在PYTHON例子中复制
也可以用在线设计工具http://t-filter.engineerjs.com/,选择LPF,通带为0-5MHz ,阻带为 10MHz-50MHz
-
在Channel Specification中做如下设置:
-
在Implementation中做如下设置:
-
在Interface中做如下设置:
-
添加DMA IP,并对其做如下设置:
- 将DMA和FIR做如下连接:
- 双击打开ZYNQ,勾选S AXI HP0 Interface
- Run Connection Automation
- 将axi_dma_0重命名为fir_dma,将fir_compiler_0重命名为fir
- 选中fir_dma和fir,并右键点击Create Hierachy
- Create HDL Wrapper Generate Bitstream,并将生成的Bitstream重命名为fir_accel.bit
- 点击File–>Export–>Export Block Design,并将导出的TCL命名为fir_accel.tcl
- 至此fir_accel.bit和fir_accel.tcl均已生成,OVERLAY生成完毕