该选项支持在器件二进制文件 (.xclbin) 中插入调试 IP 核用于进行硬件调试。该选项允许您指定要添加的调试核类型以及要通过
ChipScope™
监控的计算单元和接口。--debug.xxx
选项允许您将接口上的 AXI Protocol Checker 和 System ILA 核连接到内核或特定计算单元 (CU) 用于进行调试和性能监控:
- System Integrated Logic Analyzer (ILA) 可提供对硬件上运行的加速内核或函数的传输事务级可视性。还可使用 System ILA 核来捕获和查看感兴趣的 AXI 流量。
- AXI Protocol Checker 调试核旨在监控加速内核上的 AXI 接口。将其连接到 CU 的接口时,它会主动检查协议违例并指示发生了哪些违例。
在配置文件中的 [debug]
节头下可使用如下格式示例来指定 --debug.xxx
命令:
[debug]
protocol=all:all # Protocol analyzers on all CUs
protocol=cu2:port3 # Protocol analyzer on port3 of cu2
chipscope=cu2 # ILA on cu2
--debug
的各选项包括:
--debug.aie.chipscope
--debug.chipscope <interface_name> | <adf_graph_arg_name>
为 Versal
AI 引擎启用通过 ChipScope 进行硬件调试。<interface_name>
实参适用于非 PL 内核接口,例如,AI 引擎 PLIO 接口或 AXIS 接口。<adf_graph_arg_name>
用于指定该图形的实参。
--debug.chipscope
--debug.chipscope <cu_name>[:<interface_name>]
将 System Integrated Logic Analyzer 调试核添加到设计中的指定 CU。
重要:
--debug.chipscope
选项要求指定 <cu_name>
,并且不接受关键字 all
。(可选)您可以指定 <interface_name>
。例如,以下命令可将 ILA 核添加到 vadd_1
CU 中:
v++ --link --debug.chipscope vadd_1
--debug.list_ports
显示当前设计中的有效计算单元和端口组合列表。该选项供参考,可帮助您为 --debug
命令制作命令行或配置文件。
该选项需在链接期间指定,但不运行链接进程。命令行的必需选项如以下示例所示,此示例在将指定内核与列出的平台相链接时会返回可用端口:
v++ --platform <platform> --link --debug.list_ports <kernel.xo>
--debug.protocol
--debug.protocol all|<cu_name>[:<interface_name>]
将 AXI Protocol Checker 调试核添加到设计中。对于该选项,可为其指定关键字 all
或 <cu_name>
以及可选的 <interface_name>
,以便向指定 CU 和接口添加协议检查器。
例如:
v++ --link --debug.protocol all