Vivado Tcl命令行模式小记

在Tcl Console下运行

使用vivado自带的tcl console运行Tcl脚本。在终端窗口键入:

vivado -mode tcl

即可进入Tcl模式。
先打开项目:

open_project project1.xpr

然后就可以运行tcl脚本:

source script.tcl

作为参数运行

该模式多用于CI,适合直接对一个项目运行指定的Tcl脚本。

vivado -mode tcl -source script.tcl project1.xpr

实用tcl脚本

仿真

update_compile_order -fileset sources_1
set simulations [get_fileset $env(SIMULATION)]
if { [llength simulations] != 0} {
	foreach sim $simulations {
                update_compile_order -fileset $sim
                launch_simulation -simset $sim
                # make simulation complete
                run all
	}
}

综合IP核

update_compile_order -fileset sources_1
if { [llength [get_ips]] != 0} {
    upgrade_ip [get_ips]
    foreach ip [get_ips] {
        create_ip_run [get_ips $ip]
    }
    set ip_runs [get_runs -filter {SRCSET != sources_1 && IS_SYNTHESIS && STATUS != "synth_design Complete!"}]
    if { [llength $ip_runs] != 0} {
        launch_runs -quiet -jobs 2 {*}$ip_runs
        foreach r $ip_runs {
            wait_on_run $r
        }
    }
}

生成bitstream

update_compile_order -fileset sources_1
reset_run impl_1
reset_run synth_1
launch_runs -jobs 2 impl_1 -to_step write_bitstream
wait_on_run impl_1

参考资料:
https://github.com/trivialmips/nontrivial-mips

  • 2
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值