除了使用“Set up Debug”Wizard(设置调试向导)外,您也可以使用 XDC 命令来创建、连接调试核并将其插入已综合的设计网表。在 Tcl 控制台中输入 XDC 命令,并遵循以下步骤进行操作:
- 打开已综合的设计网表,此网表来自名为 synth_1 的综合运行。
open_run synth_1
重要: 仅当打开已综合的设计网表后,以下步骤中的 XDC 命令才有效。 - 创建 ILA 核的黑盒。
create_debug_core u_ila_0 ila
- 设置 ILA 核的各属性。
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]
- 将 ILA 核的 clk 端口宽度设为 1,并将其连接到目标时钟信号线。
set_property port_width 1 [get_debug_ports u_ila_0/clk] connect_debug_port u_ila_0/clk [get_nets [list clk ]]
注释: 您无需创建 ILA 核的 clk 端口,因为此端口将由create_debug_core
命令自动创建。重要: 调试核的所有调试端口名称均为小写。使用大写或混合大小写的调试端口名称将导致出错。 - 将 probe0 端口的宽度设置为您计划连接到此端口的信号线的数量。 注释: 您无需创建 ILA 核的首个探测端口 (probe0),因为此端口将由
create_debug_core
命令自动创建:set_property port_width 1 [get_debug_ports u_ila_0/probe0] - 将 probe0 端口连接到您想要连接到该端口的信号线。
connect_debug_port u_ila_0/probe0 [get_nets [list A_or_B]]
- (可选)创建更多探测端口、设置其宽度并将其连接到您要调试的信号线。
create_debug_port u_ila_0 probe set_property port_width 2 [get_debug_ports u_ila_0/probe1] connect_debug_port u_ila_0/probe1 [get_nets [list {A[0]} {A[1]}]]
如需获取有关这些 Tcl 命令以及有关其他相关 Tcl 命令的更多信息,请在 Vivado Design Suite 的 Tcl 控制台中输入 help -category ChipScope
。