vivado报错-debug hub core时钟检测不到-Xilinx-AMD论坛-FPGA CPLD-ChipDebug

vivado报错-debug hub core时钟检测不到

 

问题描述

 

在使用JTAG仿真器在vivado环境下抓信号时,报如下错误:

 

Warning: The debug hub core was not detected

Resolution:

1、Make sure the clock connected to the debug hub(dbg hub) core is free running clock and is active

2、Make sure the BSCAN_SWITCH_USER_MASK device property in Vivado hardware Manager reflects the user scan chain setting in the design and refresh the device.To determine the user scan chain setting in the design,open the implemented design and use ‘get porperty C_USER_SCAN_CHAIN [get debug cores dbg hub]’.

 

 

什么是debug hub core?

 

debug hub负责将一个或几个ILA与JTAG连接起来。JTAG指令下发以及抓取的波形数据回传到screen都要通过它,相当于是一个中间件。在vivado中打开原理图可以看到,连接到debug hub上的信号,包括clk、oport、inport。

 

从warning的提示看,可能的原因是:

 

1、这个hub的clock不正常;

 

2、两个参数不匹配(一般都是01 没问题,可以在properties查到)

 

则为什么是clk不对呢?

 

1、clock线连上了,但这个wire上却没有clock波形,因为zynq的ps端没有启动配置,所以没有任何clock到pl端;

 

2、我们设置的clock频率跟JTAG仿真器的不匹配。

 

怎么解决?

 

若debug_hub上一共挂了3个device,clock分别是40MHz、20MHz、800KHz,debug_hub会自动选择频率较低的时钟作为它的时钟。

 

在xilinx官网上,指出ILA和HUB的clock一定要比JTAG高(经本人测试,至少为JTAG速率的1.8倍)。因此,错误原因是debug_bub这个中间件的clock比JTAG仿真器的低了,应该确保JTAG是最低的!

 

解决方法

 

1、将JTAG仿真器的频率降下去

 

Program and Debug->Open hardware manager->Open Target->Open new target(先关掉之前的hardware)

其中JATAG Clock Frequency可以选择JTAG的频率。

 

2、将debug_hub的频率升上去

 

在setup debug中产生的ILA相关的XDC约束文件中最后一段,把connect _debug_port dbg_hub/clk [get_nets clk]中的clk改为想要设置的频率,如connect_debug_port dbg_hub/clk [get_nets[list inst_clk_wiz/inst/clk_out1]]

 

延伸

 

是否可以设置XDC文件中的C_CLK_INPUT_FREQ_HZ?

 

答案是不行的,这个明显是设置dbg_hub的,默认 300MHz,实际还是由connect _debug_port dbg_hub/clk [get_nets clk]决定的,还得改JTAG的Hz。

 

ILA及DEBUG模块占用FPGA的资源,也会影响用户逻辑timing。所以一般系统默认连lowest的那个clock,或者把C_ENABLE_CLK_DIVIDER true。

 

参考TCL指令

 

set_property C_USER_SCAN_CHAIN 1 [get_debug_cores dbg_bub]

 

 

请登录后发表评论

    没有回复内容