【 Vivado 】工程模式下运用Tcl脚本示范

版权声明:本博客内容来自于个人学习过程中的总结,参考了互联网、数据手册、帮助文档、书本以及论文等上的内容,仅供学习交流使用,如有侵权,请联系,我会重写!转载请注明地址! https://blog.csdn.net/Reborn_Lee/article/details/85248572

以下是一个示例脚本,用于创建项目,添加各种源,配置设置,启动综合和实现运行,以及创建比特流。

# 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.

猜你喜欢

转载自blog.csdn.net/Reborn_Lee/article/details/85248572