1. Vivado 常用 tcl 命令 &GUI

在 Vivado 中用 tcl 命令非常强大。

例如可以把整个工程导出到.tcl文件,非常方便分发、备份。

1(a).把工程保存成.tcl文件tcl: write_project_tcl c:/vivado_project/pro.tcl

gui: File->Project->Write tcl...,然后选择tcl路径即可。

注意:最好把.tcl中列出的依赖文件(.v, .sdc, .wcfg等)拷贝到.tcl文件的目录下,然后在.tcl文件中修改这些文件的路径,这样整个工程就可以分发了,无需依赖原工程。

# The following source(s) files that were local or imported into the original project. # (Please see the '$orig_proj_dir' and '$origin_dir' variable setting below at the start of the script)

# "C:/emac_pcs_pma_udp_test-2019-02-19_final/emac_pcs_pma_udp_test/emac_pcs_pma_udp_test.srcs/sources_1/new/pxi_interface.v"

# "C:/emac_pcs_pma_udp_test-2019-02-19_final/emac_pcs_pma_udp_test/emac_pcs_pma_udp_test.srcs/sources_1/bd/PL1000basex/hdl/PL1000basex_wrapper.v"

# "C:/emac_pcs_pma_udp_test-2019-02-19_final/emac_pcs_pma_udp_test/emac_pcs_pma_udp_test.srcs/constrs_1/new/phy_cons.xdc"

# "C:/emac_pcs_pma_udp_test-2019-02-19_final/emac_pcs_pma_udp_test/emac_pcs_pma_udp_test.srcs/sim_1/new/pxi_if_tb.v"

# "C:/emac_pcs_pma_udp_test-2019-02-19_final/emac_pcs_pma_udp_test/pxi_if_tb_behav.wcfg"

1(b).用.tcl生成工程tcl命令:

cd c:/vivado_project

source ./pro.tcl

gui:Tools->Run tcl script

注:

1) vivado会在当前目录(cd命令后的目录,即c:/vivado_project)创建工程。

2) 工程中所有的.v文件、约束文件.sdc和配置文件.wcfg的路径跟原工程(导出此.tcl的工程相关)。

3)导出.tcl文件时,最好将.tcl中列出的.v, .sdc, .wcfg等文件和.tcl文件保存在同一个folder下,然后修改各个文件的路径到.tcl所在目录,这样就不用依赖原工程了。

block design的.tcl文件只能生成block design,不包含仿真文件、.xdc约束文件和配置文件等。

工程的.tcl文件包含所有的文件信息(是block design的.tcl文件的超集)。

2(a).从Block Design到.tcl文件tcl: write_bd_tcl [target_file_full_path]

write_bd_tcl c:/exports/bdtcl.tcl

GUI:File->Exprot->Export Block Design...

2(b).从.tcl文件到block design运行上面生成的bdtcl.tcl(会自动生成新的工程)。

tcl:source [file_full_path]

cd: c:/1

source C:/1/emac_final.tcl

GUI:Tools->Run Tcl Script

3(a). report ip status报告所有IP的状态(包括自定义和系统的IP)

tcl:report_ip_status -name ip_status

GUI:Reports->Report IP Status

3(b).更新IPTCL:upgrade_ip [get_ips]

GUI:Reports->Report IP Status,然后手动选择“Upgrade Selected”或"Upgrade IP" 即可。

引脚分配方法1:直接添加约束文件.xdc,在里面设置PIN的位置(PACKAGE_PIN)和电平标准(IOSTANDARD)。

方法2:选择“Open Implemented Design”,然后选择Window->IO Ports打开管脚分配的窗口进行分配。分配完毕后可以选择File->Export->Export IO Ports...

tcl命令:write_xdc C:/emac_pcs_pma_udp_test/impl_1.xdc -mode port -force

设置多线程编译Windows默认 place、root是2线程;

set_param general.maxThreads 8 //设置线程数为8

get_param general.maxThreads //获取线程数

注意:每次执行Implementation前都要设置一遍(可否只设置一次?)

导出网表文件1.Open Synthesized/Implemented Design.

2. write_verilog -force netlist.v

注意:导出网表的verilog形式文件之前,必须先打开Synthesized或Implemented Design,就可以看到基于LUT的网表文件。打开Elaborated Design后得到的是基于与/或/非门电路的文件,非LUT。

硁硁之信|高德地图如何设置车牌