vivado 探针用作为数据和/或触发器、使用 XDC 命令来插入调试核

您可在 Vivado 硬件管理器中自定义探针 将其用作为数据和 / 或触发器。如果探针参与触发或采集比较值 则应将其
配置为仅限“触发器”探针。这样即可最优化 ILA 核使用 BRAM 的方式。通常 如需采集探针数据 则应将其配置为
仅限“数据”探针。如果探针同时参与触发比较值并且还需采集其数据 则应将其配置为“触发器和数据”。
您可使用“设置调试 (Set up Debug) Wizard 来将探针配置为数据和 / 或触发器 如下图所示。
对于包含配置为仅限“数据”的探针的设计 如果在运行时对其执行器件编程 则将无法使用这些探针来配置触发或采
集设置条件。相反 在“ Waveform ”波形中 将无法使用配置为仅限“触发器”的探针。
配置所用比较器数量
在综合后网表上插入 ILA 核后 即可设置用于任意位置的比较器的数量 范围为 1 16 。要在 Vivado IDE 中设置比
较器数量 请转至 ILA 核的“调试核选项 (Debug Core Options) ”选项卡 并将 ALL_PROBE_SAME_MU_CNT 属性设
置为所期望的比较器数量。
或者 也可以在 Tcl 控制台中设置 ALL_PROBE_SAME_MU_CNT 属性 如下所示
set_property ALL_PROBE_SAME_MU_CNT 10 [get_debug_cores u_ila_0]
提示 如果启用“采集控制 (Capture Control) 则可选比较器数量范围是 1 15 个。有 1 个比较器供采集控
制数据筛选机制使用。
重要提示 ILA 中无法使用插入流程来为不同探针设置不同数量的比较器。赛灵思建议您使用 HDL 例化流程
来为不同探针设置不同数量的比较器。
使用 XDC 命令来插入调试核
除了使用“设置调试 (Set up Debug) Wizard 您也可以使用 XDC 命令来创建、连接调试核并将其插入已综合的设
计网表。在 Tcl 控制台中输入 XDC 命令 并遵循以下步骤进行操作
1. 打开来自名为 synth_1 的综合运行的已综合的设计网表。
open_run synth_1
重要提示 仅当打开已综合的设计网表后 以下步骤中的 XDC 命令才有效。
2. 创建 ILA 核的黑盒。
create_debug_core u_ila_0 ila
3. 设置 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]
4. 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 命令自动创建。
重要提示 调试核的所有调试端口名称均为小写。使用大写或混合大小写调试端口名称将导致出错。
5. probe0 端口的宽度设置为您计划连接到此端口的信号线的数量。
注释 您无需创建 ILA 核的首个探测端口 (probe0) 因为此端口将由 create_debug_core 命令自动创建
set_property port_width 1 [get_debug_ports u_ila_0/probe0]
6. probe0 端口连接到您想要连接到该端口的信号线。
connect_debug_port u_ila_0/probe0 [get_nets [list A_or_B]]
7. 可选 创建更多探测端口、设置其宽度并将其连接到您要调试的信号线。
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
运行调试 XDC 命令后保存约束
使用“设置调试 (Set up Debug) Wizard 、使用 Vivado Design Suite 创建调试核或调试端口和 / 或运行以下 XDC 命令
需保存约束
create_debug_core
create_debug_port
connect_debug_port
set_property 针对任意 debug_core debug_port 对象
对应 XDC 命令将保存到含后缀 _debug.xdc 的约束文件 并在实现期间 用于插入和连接调试核。
重要提示 在工程模式下保存约束可能导致综合和实现步骤变为过期。但您无需重新综合设计 因为仅在实现期
间才使用这些调试 XDC 约束。您可通过选中“ Design Runs ”窗口、右键单击综合运行轮次 例如
synth_1 ), 然后单击“ Force up-to-date ”来强制将综合步骤更新至最新状态。
实现设计
完成插入、连接并自定义调试核后 即可着手实现设计 请参阅“对包含调试核的设计执行实现”
在非工程模式下执行调试核插入
调试核可在工程模式或非工程模式下插入。以下 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

cckkppll

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值