本实验是来源于一篇论文:
ZyCAP: Efficient Partial Reconfiguration Management on the Xilinx Zynq
然后该作者给出了他的GITHUB:https://github.com/archntu/zycap
在这个GIT中,有他的论文项目,我下载了,在这个和大家一起过一遍。
一、简介
ZyCAP 是为了在Xilinx Zynq片上系统实现高速有效部分重构的一个定制的ICAP(internal configuration access port,内部配置接口)控制器。它有一个硬件IP(intellectual property)核,这个IP核能够用在Xilinx XPS(Xilinx Platform Studio)环境中去和Zynq 处理系统(也就是ARM core)集成。ZyCAP驱动考虑到了低层次的重构操作,比特流的缓存以及比特流存储管理。
二、硬件集成
ZyCAP的硬件在pcore文件夹中,它可以导入至任意Xilinx XPS工程。IP的源码在Zycap/hw/pcores/zycap_v1_00_a. 我们能够通过用Create or Import Peripheral wizard将这个目录添加到我们的工程中。 ZyCAP有两个AXI接口,其中S_AXI_LITE接口连接GP口,M_AXI_M2ICAP连接HP口。icap_intr_out作为中断信号连接至处理系统。(此处关于AXI,GP,HP等信息可以查阅相关ZYNQ接口的资料进行详细了解)
三、软件集成
软件驱动的源码在Zycap/hw/pcores/zycap_v1_00_a/driver中。想要连接到ZyCAP的硬件,这些文件必须得加到DSK工程中。软件应用需要通过头文件 zycap.h 来连接ZyCAP API。表1给出了ZyCAP的 API。想要知道更详细的用法,可以参考Zycap/sw/example_app/zynq_pr.c
ZyCAP APIs |
Brief Introduction |
Init_Zycap(* intr_controller) |
Initialize the Zycap controller, memory allocate for PR bitstreams A pointer to the interrupt controller has to be passed as an argument to the API |
Config_PR_Bitstream(bitstream_name, intr_sync) |
Reprogram using a bitstream. If the intr_sync option is set, the API returns immediately after initializing the reconfiguration. The Sync_Zycap() API should be used in this case before accessing the reconfigured peripheral. |
Prefetch_PR_Bitstream(bitstream_name) |
Prefetch the PR bitstream from SD card to DRAM |
Sync_Zycap() |
Synchronize Zycap reconfiguration interrupt. |
四、示例应用
这里提供了一个验证在重构管理中ZyCAP有效性的案例。该案例可以跑在ZC702板子或者ZEDBoard上。最高等级的软件应用在Zycap/sw/example_app目录中。软件的可执行文件需要通过导入ZyCAP驱动至SDK中集成而生成。在Zycap/hw/bitstreams