(1)创建一个vivado工程
(2)open Block Design
(3)配置zynq ps端
根据自己的硬件类型配置好输入时钟频率与内存型号,并将PS端的时钟与PL端的时钟连接起来。以及配置4个EMIO GPIO
(4)右击 GPIO_0 引脚, 选择 make external 把 GPIO_0 引脚引出,并将GPIO_0 引脚修改为EMIO_0引脚
(5)生成IP的output products
(6)创建顶层封装 HDL wrapper
(7)创建约束文件,根据自己的板子上的原理图,编写.xdc文件
set_property PACKAGE_PIN AA14 [get_ports {emio_0_tri_io[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[0]}]
set_property PACKAGE_PIN W15 [get_ports {emio_0_tri_io[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[1]}]
set_property PACKAGE_PIN Y15 [get_ports {emio_0_tri_io[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[2]}]
set_property PACKAGE_PIN AB14 [get_ports {emio_0_tri_io[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[3]}]
set_property PACKAGE_PIN AB15 [get_ports {emio_0_tri_io[4]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[4]}]
set_property PACKAGE_PIN W16 [get_ports {emio_0_tri_io[5]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[5]}]
set_property PACKAGE_PIN Y16 [get_ports {emio_0_tri_io[6]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[6]}]
set_property PACKAGE_PIN U15 [get_ports {emio_0_tri_io[7]}]
set_property IOSTANDARD LVCMOS33 [get_ports {emio_0_tri_io[7]}]
(8)生成bit流文件
(9)export hardware
(10)launch SDK
(11)与前文相同,第一步创建应用,并选择非示例(empty application)
(12)由于上一步创建了新的bsp包,并自动生成了makefile,并且运行。
(13)创建main.c文件,编写驱动代码
#