【 Vivado 】工程模式下运用Tcl脚本示范
以下是一个示例脚本,用于创建项目,添加各种源,配置设置,启动综合和实现运行,以及创建比特流。
# Typical usage: vivado -mode tcl -source run_bft_project.tcl
# 创建项目和目录结构
create_project -force project_bft_batch ./project_bft_batch -part xc7k70tfbg484-2
#
# 向项目添加各种源
add_files {./Sources/hdl/FifoBuffer.v ./Sources/hdl/async_fifo.v \
./Sources/hdl/bft.vhdl}
add_files -fileset sim_1 ./Sources/hdl/bft_tb.v
add_files ./Sources/hdl/bftLib/
add_files -fileset constrs_1 ./Sources/bft_full.xdc
#
# Now import/copy the files into the project
import_files -force
#
# Set VHDL library property on some files
set_property library bftLib [get_files {*round_*.vhdl core_transform.vhdl \
bft_package.vhdl}]
#
# Update to set top and file compile order
update_compile_order -fileset sources_1
update_compile_order -fileset sim_1
#
# Launch Synthesis
launch_runs synth_1
wait_on_run synth_1
open_run synth_1 -name netlist_1
#
# Generate a timing and power reports and write to disk
# Can create custom reports as required
report_timing_summary -delay_type max -report_unconstrained -check_timing_verbose \
-max_paths 10 -input_pins -file syn_timing.rpt
report_power -file syn_power.rpt
#
# Launch Implementation
launch_runs impl_1 -to_step write_bitstream
wait_on_run impl_1
#
# Generate a timing and power reports and write to disk
# comment out the open_run for batch mode
open_run impl_1
report_timing_summary -delay_type min_max -report_unconstrained \
-check_timing_verbose -max_paths 10 -input_pins -file imp_timing.rpt
report_power -file imp_power.rpt
#
# Can open the graphical environment if visualization desired
# comment out the for batch mode
#start_gui
TIP: You can break up a line in your Tcl script using the backslash (\) character at the end of a line to indicate the line continuation. The line that follows the backslash is processed as part of the preceding line.
文章来源: reborn.blog.csdn.net,作者:李锐博恩,版权归原作者所有,如需转载,请联系作者。
原文链接:reborn.blog.csdn.net/article/details/85248572
- 点赞
- 收藏
- 关注作者
评论(0)