It is possible for the kernels
to hang due to bad AXI transactions between the kernels and the memory controller. To
debug these issues, it is required to instrument the kernels.
- The Vitis core development
kit provides two options for instrumentation to be applied during
v++
linking (--link
). Both of these options add hardware to your implementation, and based on resource utilization it might be necessary to limit instrumentation.- Add Lightweight AXI Protocol Checkers (
lapc
). These protocol checkers are added using the-–debug.protocol
option, as explained in --debug Options. The following syntax is used:--debug.protocol <compute_unit_name>:<interface_name>
In general, the<interface_name>
is optional. If not specified, all ports on the CU are expected to be analyzed. The--debug.protocol
option is used to define the protocol checkers to be inserted. This option can accept a special keyword,all
, for<compute_unit_name>
and/or<interface_name>
.Note: Multiple--debug.xxx
options can be specified in a single command line, or configuration file. - Adding Performance Monitors (
am, aim, asm
) enables the listing of detailed communication statistics (counters). Although this is most useful for performance analysis, it provides insight during debugging on pending port activities. The Performance Monitors are added using the--profile
option as described in --profile Options. The basic syntax for the--profile
option is:
Three fields are required to determine the specific interface to attach the performance monitor to. However, if resource consumption is not an issue, the keyword--profile.data <krnl_name>|all:<cu_name>|all:<intrfc_name>|all:<counters>|all
all
lets you apply the monitoring to all existing kernels, compute units, and interfaces with a single option. Otherwise, you can specify thekernel_name
,cu_name
, andinterface_name
explicitly to limit instrumentation.The last option,<counters>|all
, allows you to restrict the information gathering to justcounters
for large designs, whileall
(default) includes the collection of actual trace information.Note: Multiple--profile
options can be specified in a single command line, or configuration file.[profile] dataernel1:cu1:m_axi_gmem0 dataernel1:cu1:m_axi_gmem1 dataernel2:cu2:m_axi_gmem
- Add Lightweight AXI Protocol Checkers (
- When the application is rebuilt, rerun the host application
using the
xclbin
with the added AIM IP and LAPC IP. - When the application hangs, you can use
xbutil examine
to check for any errors or anomalies. - Check the AIM output:
- Run the following command a couple of times to check if
any counters are moving. If they are moving then the kernels are active.
xbutil examine -d <bdf> -r debug-ip-status -e aim
Tip: Testing AIM output is also supported through GDB debugging using the command extensionxstatus aim
. - If the counters are stagnant, the outstanding counts greater than zero might mean some AXI transactions are hung.
- Run the following command a couple of times to check if
any counters are moving. If they are moving then the kernels are active.
- Check the LAPC output:
- Run the following command to check if there are any AXI
violations.
xbutil examine -d <bdf> -r debug-ip-status -e lapc
Tip: Testing LAPC output is also supported through GDB debugging using the command extensionxstatus lapc
. - If there are any AXI violations, it implies that there are issues in the kernel implementation.
- Run the following command to check if there are any AXI
violations.