创建工程需要的文件:
1:工程所需要的源代码和自定义IP文件库;
2.bat文件,用于在windows下面直接调用vivado编译工程;
auto.bat文件的创建过程是,新建一个记事本,然后另存为.bat文件即可,下面为.bat文件的内容
path %psth%;D:Xilinx_2019.2Vivado2019.2bin
start "C:Windows"
@echo Produce the vivado project.set cache_floder=.Xil
cd %~dp0
if exist %~dp0%cache_floder% ( echo The floder is exist.pause
) else (vivado -source l
)
exit
注:a.当电脑中安装了几个vivado的版本时,需要用path指令指定编译的vivado版本的路径。
b.if else 语句的意思是,如果当前目录中存在.Xil文件,就暂停编译,是为了防止工程已经建立了的情况下又去创建一次。
# Script Parameters
#
#
set prj_name "prj_zc706_xrf2_eg_hw"
set board "xilinx:zynq:zc706:1.1"
set top_bd_design zynq_1# Main Script
#
## create project
create_project -force $prj_name "./$prj_name"
set_property board $board [current_project]# set up IP Repositories
set repo_paths [list ../dfe_ip ]
set_property ip_repo_paths $repo_paths [current_fileset]
update_ip_catalog -rebuild# source block design tcl script
#
# changes to the block design can be saved using write_bd_tcl command
source -notrace zynq_l# switch to global rather than out-of-context synthesis
# (this is quicker if starting a fresh design)
set_property synth_checkpoint_mode None [get_files zynq_1.bd]# additional clock constraints
set_property CONFIG.FREQ_HZ 153600000 [get_bd_pins /RFISS0/RFIF_1/dfe_jesd_io_0/phy_fabric_refclk]# add constraints
import_files [glob *.xdc]# make hdl wrapper for block design
#
#
make_wrapper -files [get_files ${top_bd_design}.bd] -top
add_files -norecurse ${prj_name}/${prj_name}.srcs/sources_1/bd/${top_bd_design}/hdl/${top_bd_design}_wrapper.vhd# stop here (if not implementing)
#error "stopping here pre-synthesis"# run synthesis
reset_run impl_1
launch_runs synth_1
wait_on_run synth_1# stop here
#error "stopping here: pre-implementation"# generate bitstream
launch_runs impl_1 -to_step write_bitstream
wait_on_run impl_1
注:a.如果工程中创建了block_diagram,那需要准备bd.tcl的文件,如果bd模块较多较复杂,可以通到vivado工具倒推bd.tcl的文件。
上面的文件都准备齐全后,双击auto.bat文件,就可以创建vivado工程啦。
本文发布于:2024-01-30 17:36:53,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170660741621703.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |