1.基于BASYS3板子,有如下代码:

module top(
    input        clk,
    input        rst,
    output       test_clk   
    );
    
parameter DIV_CNT = 2;
    
reg clk25M;
reg [31:0] cnt = 0;
always@(posedge clk)begin
    if (cnt==DIV_CNT-1)
        begin
            clk25M <= ~clk25M;
            cnt <= 0;
        end
    else
        begin
            cnt <= cnt + 1'b1;
        end
end
assign  test_clk = rst ? 1'b0 : clk25M;

管脚配置XDC文件内容如下:

set_property PACKAGE_PIN W5 [get_ports clk]
set_property IOSTANDARD LVCMOS33 [get_ports clk]
set_property PACKAGE_PIN V17 [get_ports rst]
set_property IOSTANDARD LVCMOS33 [get_ports rst]
set_property PACKAGE_PIN L1 [get_ports test_clk]
set_property IOSTANDARD LVCMOS33 [get_ports test_clk]

2.占击左侧Run Synthesis,综合

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

3.完成之后,再点击 Open Synthesized Design,打开之后,点Tools下的Set Up Debug...

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

如下

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

4.选择Find Nets to Add...

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

5.点OK

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

6.选中想要观察的信号,点OK

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

7.出现红色,在红色地方右键。

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

8.选择Select Clock Domain


 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

9.选择ALL_CLOCK,然后选择clk_IBUF或clk_IBUF_BUFG

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

10.选择合适的采集深度,1024通常够用

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

11.Finish

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

12.点击左侧的Generate Bitstream

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

13.完成后,点Open Hardware Manager

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

14.将板子连接到电脑上,然后Open Target -> Auto Connect

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

15.在xc7a35t上面,右键->Program Device...

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

16.Program

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

17.点击Trigger

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

18.会自动弹出波形

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

19.此时,只有test_clk信号,没有rst信号。在Debug Probes区域中,rst_IBUF上右键

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

20.Add Probes to Wave Form

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

21.即可看到rst也在波形中了,添加其它信号类似

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

22.鼠标点住rst_IBUF,拖拽到图中区域放开鼠标

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

23.rst_IBUF信号会出现在框中

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

24.点开Compare Value下拉菜单,设置如下,点击OK

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

25.把BASYS3板子上的SW0,拔到上面。点击Run Trigger按钮

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

26.注意到这里应该显示Wait...

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

27.此时,在板子上,把SW0拔下来。注意到,这里会一闪而过Full,然后又显示Idle。如果没观察到,可以从25步骤再重来

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

28.再打开波形,如下图

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture

29.回到这个界面,将Trigger Position 设置为500。再重复24-28步骤。然后再观察波形中,第500个周期,波形前后数据的变化

 
Vivado Turtorial 01 —— 使用vivado中debug功能(类似ISE中ChipScope)
Picture


作者:Craftor
链接:https://www.jianshu.com/p/aaae0524877e
來源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
 

相关文章:

  • 2021-12-16
  • 2021-08-27
  • 2022-01-12
  • 2021-08-27
  • 2022-12-23
  • 2021-11-12
  • 2021-10-03
  • 2021-04-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案