vivado有project模式和non-project模式,project模式就是我们常用的方式,在vivado里面新建工程,通过GUI界面去操作;non-project模式就是纯粹通过tcl来指定vivado的流程、参数。
相比于project模式,non-project模式的优势如下:
总结下来就是,不仅节省空间,还更加灵活。
下面我们以vivado中自带的wavegen工程为例:
image-20221015225402004
为了更加快捷的完成non-project的tcl内容,我们可以先把wavegen工程进行Synthsis和Implementation,在wavegen.runs下面会生成synth_1和impl_1的两个目录,这两个目录都有wavegen.tcl,我们可以直接将里面的有用内容copy出来,用来创建non-project的tcl,具体操作就不展开细讲了,直接把最终的tcl文件展示出来,就很很容易理解了:
#========================================================// #FileName:build.tcl #Author:ZhangHaijun #Version:v1.0 #Discription:vivado-modebatch-sourcebuild.tcl #========================================================// #!/usr/bin/tclsh set_paramgeneral.maxthreads8 set_partxcku035-fbva900-2-e #readfiles read_verilog/home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/clogb2.vh read_verilog-libraryxil_defaultlib{ /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/clk_div.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/clk_gen.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/clkx_bus.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/cmd_parse.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/dac_spi.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/debouncer.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/lb_ctl.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/meta_harden.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/out_ddr_flop.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/reset_bridge.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/resp_gen.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/rst_gen.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/samp_gen.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/samp_ram.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/to_bcd.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/uart_baud_gen.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/uart_rx.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/uart_rx_ctl.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/uart_tx.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/uart_tx_ctl.v /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/Sources/kintexu/wave_gen.v } #readip read_ip-quiet/home/henry/fpga/wavegen/wavegen.srcs/sources_1/ip/clk_core/clk_core.xci read_ip-quiet/home/henry/fpga/wavegen/wavegen.srcs/sources_1/ip/char_fifo/char_fifo.xci #readconstraints read_xdc/home/henry/fpga/wavegen/wavegen.srcs/constrs_1/imports/xcku035-fbva900-2-e/wave_gen_timing.xdc read_xdc/home/henry/fpga/wavegen/wavegen.srcs/constrs_1/imports/xcku035-fbva900-2-e/wave_gen_pins.xdc #generateips generate_targetall[get_ips] #synthesizedesign synth_design-topwave_gen-partxcku035-fbva900-2-e write_checkpoint-force-noxdefsynth.dcp #opt_design opt_design write_checkpoint-forceopt.dcp #placedesign place_design write_checkpoint-forceplaced.dcp phys_opt_design write_checkpoint-forcephysopt.dcp #routedesign route_design write_checkpoint-forcerouted.dcp report_timing_summary-max_paths10-report_unconstrained-filewave_gen_timing_summary_routed.rpt-pbwave_gen_timing_summary_routed.pb-rpxwave_gen_timing_summary_routed.rpx-warn_on_violation #writebitfile write_bitstream-force./wave_gen.bit
对于综合时间上,理论上non-project模式要比project模式快一些,因为project模式会把每一步的结果都写入到磁盘中,但non-project中,我们只需要把我们想需要的文件存下来。
在上面的脚本中,也基本上把每一步的结果都存了下来,而且本身Synthsis和Implement的时间也不到2分钟,所以跟project模式的时间并没有明显差别。
审核编辑:汤梓红
-
project
+关注
关注
0文章
35浏览量
13275 -
Vivado
+关注
关注
19文章
807浏览量
66312
原文标题:Vivado non-project模式示例
文章出处:【微信号:傅里叶的猫,微信公众号:傅里叶的猫】欢迎添加关注!文章转载请注明出处。
发布评论请先 登录
相关推荐
评论