在非工程模式下执行调试核插入 - 2023.2 简体中文

Vivado Design Suite 用户指南: 编程和调试 (UG908)

Document ID
UG908
Release Date
2023-10-19
Version
2023.2 简体中文

调试核可在工程模式或非工程模式下插入。以下 Tcl 脚本样本演示了如何在所探测的设计中创建调试核、设置调试核属性以及将调试核探针连接到信号。在非工程模式下,调试核插入操作需在设计综合之后但在 opt_design 步骤之前执行,如下所示:

重要: 仅限 ILA 核才支持调试核插入。

以下 Tcl 脚本提供了在非工程流程中使用调试核插入命令的示例。

#read relevant design source files
read_vhdl [glob ./*.vhdl] 
read_verilog [ glob ./Sources/*.v ]
read_xdc ./target.xdc
#Synthesize Design
synth_design -top top -part xc7k325tffg900-2 
#Create the debug core 
create_debug_core u_ila_0 ila
#set debug core properties
set_property C_DATA_DEPTH 1024 [get_debug_cores u_ila_0]
set_property C_TRIGIN_EN false [get_debug_cores u_ila_0]
set_property C_TRIGOUT_EN false [get_debug_cores u_ila_0]
set_property C_ADV_TRIGGER false [get_debug_cores u_ila_0]
set_property C_INPUT_PIPE_STAGES 0 [get_debug_cores u_ila_0]
set_property C_EN_STRG_QUAL false [get_debug_cores u_ila_0]
set_property ALL_PROBE_SAME_MU true [get_debug_cores u_ila_0]
set_property ALL_PROBE_SAME_MU_CNT 1 [get_debug_cores u_ila_0]
#connect the probe ports in the debug core to the signals being probed in the design
set_property port_width 1 [get_debug_ports u_ila_0/clk]
connect_debug_port u_ila_0/clk [get_nets [list clk ]]
set_property port_width 1 [get_debug_ports u_ila_0/probe0]
connect_debug_port u_ila_0/probe0 [get_nets [list A_or_B]]
create_debug_port u_ila_0 probe
#Optionally, create more probe ports, set their width, 
#  and connect them to the nets you want to debug
#Implement design
opt_design 
place_design 
report_drc -file ./placed_drc_rpt.txt
report_timing_summary -file ./placed_timing_rpt.txt
route_design 
report_drc -file ./routed_drc_rpt.txt
report_timing_summary -file ./routed_timing_rpt.txt
write_bitstream