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 : zhang haijun# version : v1.0# discription : vivado -mode batch -source build.tcl# ======================================================== //#!/usr/bin/tclshset_param general.maxthreads 8set_part xcku035-fbva900-2-e# read filesread_verilog /home/henry/fpga/wavegen/wavegen.srcs/sources_1/imports/sources/clogb2.vhread_verilog -library xil_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}# read ipread_ip -quiet /home/henry/fpga/wavegen/wavegen.srcs/sources_1/ip/clk_core/clk_core.xciread_ip -quiet /home/henry/fpga/wavegen/wavegen.srcs/sources_1/ip/char_fifo/char_fifo.xci# read constraintsread_xdc /home/henry/fpga/wavegen/wavegen.srcs/constrs_1/imports/xcku035-fbva900-2-e/wave_gen_timing.xdcread_xdc /home/henry/fpga/wavegen/wavegen.srcs/constrs_1/imports/xcku035-fbva900-2-e/wave_gen_pins.xdc# generate ipsgenerate_target all [get_ips]# synthesize designsynth_design -top wave_gen -part xcku035-fbva900-2-e write_checkpoint -force -noxdef synth.dcp# opt_designopt_designwrite_checkpoint -force opt.dcp# place designplace_designwrite_checkpoint -force placed.dcpphys_opt_design write_checkpoint -force physopt.dcp# route designroute_designwrite_checkpoint -force routed.dcpreport_timing_summary -max_paths 10 -report_unconstrained -file wave_gen_timing_summary_routed.rpt -pb wave_gen_timing_summary_routed.pb -rpx wave_gen_timing_summary_routed.rpx -warn_on_violation#write bitfilewrite_bitstream -force ./wave_gen.bit
对于综合时间上,理论上non-project模式要比project模式快一些,因为project模式会把每一步的结果都写入到磁盘中,但non-project中,我们只需要把我们想需要的文件存下来。
在上面的脚本中,也基本上把每一步的结果都存了下来,而且本身synthsis和implement的时间也不到2分钟,所以跟project模式的时间并没有明显差别。
甲醛传感器模块ZE08-CH2O简介
新一代多旋翼工业级无人机迎来重大突破
便携存储器的数据传输率
正规网线厂家公布光纤跳线和尾纤的区别-科兰
七个可提高前端开发效率的工具及插件
关于Vivado non-project模式
电阻的额定功率
WT588F02B-16S单芯片集合语音播报芯片+显示驱动ic功能解决方案
小米MIX2拆解评测报告:技艳四座不是吹
Energy Micro的Cortex-M4 MCU的性能受益于台积电低漏电流工艺
CS5298 Type-C转HDMI 2.1转换方案芯片,CS5298 DP1.4转HDMI2.1转换芯片
会充电的CANoe - 欧标充电控制器EVCC HIL测试系统
利用热电偶和ADC实现高精度温度测量
SLPC*E的工作节拍和程序运行原理
科大讯飞最新推出了一款智能录音笔:讯飞AI录音笔SR 702
直流稳压电源的应用及常见故障处理实例
华为麒麟9000S处理器为8核12线程 首款支持超线程手机处理器
Esperanto实现1000多核RISC-V处理器的新产品
如何实现LED点阵显示屏的动态显示和控制
IGBT的使用与保护