Use zynq Online Logic Analyzer

1, add debugging IP CORE ILA
for BD design documents on the map, we now have some debugging, which facilitates later used to debug problems during development and simulation.
Step1: Click "+" to add ila CORE's IP.

Step2: Double-click to open the ILA CORE
 

Step3: Double-click to open the ILA CORE, the following configuration settings finished, click OK.
General Options Set:
Select Native;
Number The Probes of:. 1
the Sample the Data Depth: 1024
Number The Comparators of:. 1
parameters to be configured three main: 1.Component Name, component name, 2.Number of Probes needs to capture a signal the number, depth 3.Sample Data depth captured signal.

Step4: ILA core made of the following Add connection:
Probe0 connected to GPIO_LED;
the CLK coupled to FCLK_CLK0;

2, add debugging IP CORE VIO

Step1: Adding vio IP.

Step2: Double-VIO core modify parameters
General Options setting:
the Input the Probe the Count:. 1
the Output the Probe the Count:. 3

PROBE_IN PORTS Setting: PROBE_IN0 bit width: 9

PROBE_OUT PORTS 设置:
PROBE_OUT0→ PROBE Width(位宽): 1;
Initial Value:默认值 0X00
PROBE_OUT1→ PROBE Width(位宽): 8;
Initial Value:默认值 0X00
PROBE_OUT2→ PROBE Width(位宽): 8;
Initial Value:默认值 0X00

Step3:VIO IP 连接
VIO IP 与 math IP 连接:
PROBE_IN -> result
PROBE_OUT0 -> sel
PROBE_OUT1 -> ain_vio
PROBE_OUT2 -> bin_vio
VIO IP 与 ZYNQ IP 连接:
CLK-> FCLK_CKL0
Step4:连接好的系统整体电路。

2.5 AXI4 添加 IP CORE ILA
Step1:右击需要观察的总线,这里选择 math_ip 的 S_AXI 接口

Step2:添加完成后,单击 Run Conection Automation

可以看到软件自动增加了一个 System ILA IP CORE(VIVADO2017.1 以上版本才有这个功能)

2.6 编译 FPGA 工程
Step1:单击 Block 文件→右键→Generate the Output Products→Global→Generate。
Step2:单击 Block 文件→右键→ Create a HDL wrapper(生成 HDL 顶层文件)→Let vivado manager wrapper and
auto-update(自动更新)。
Setp3:单击 Run Synthesis,如果有 Save 对话框弹出选择保存。
Step4:添加约束文件,产生 bit 文件。导出硬件,加载 SDK。
2.7 加载到 SDK
Step1:创建一个新的空工程。
Step2:将提供例程中 SDK 工程的 main.c 源文件复制,并粘贴到新建 SDK 工程。
Step3:右击工程,选择 Debug as ->Debug configurations
Step4:选中 system Debugger,双击创建一个系统调试,点击 Apply,点击 Debug。
注意:这里进入 debug 后不要立即运行程序,否则无法观察 AXI 总线信号的触发
2.8 加载逻辑分析仪波形窗口
Step1:回到 VIVADO 界面,单击 Open Hardware Manager →Open Target->Auto Connect
Step2:加载完成后的界面,可以看到 hw_ila_1 就是调试 GPIO 波形的, hw_ila_2 是调试 AXI4 总线的波形的, hw_vio_1
是 VIO IP 用来测试 math_ip

2.9 ILA GPIO 信号调试
Step1:打开 HW_ILA1 窗口,配置 ILA,其中触发位置选设置为 512

Step2:配置触发信号,当条件满足将会触发 ILA 波形

点击 Status-hw_ila_1 中 运行按钮,出现如下窗口。

Step3: SDK 中,点击 按钮,当程序输出 0X01 到 GPIO 的时候,触发信号触发

总结:先设置断点在触发;
 

Guess you like

Origin blog.csdn.net/weixin_40640020/article/details/91981927