一、报错内容
[Place 30-574] Poor placement for routing between an IO pin and BUFG.
If this sub optimal condition is acceptable for this design,
you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote
this message to a WARNING. However, the use of this override is highly discouraged.
These examples can be used directly in the .xdc file to override this clock rule.
clk_out_IBUF_inst (IBUF.O) is locked to IOB_X0Y185
and clk_out_IBUF_BUFG_inst (BUFG.I) is provisionally placed by clockplacer on BUFGCTRL_X0Y5
二、报错原因
简单来说,是因为代码里使用到了时钟信号clk_out
,但是该信号不是来自FPGA板子上的晶振,而是来自外部输入。这种情况下在绑定引脚的时候,如果把时钟绑定到普通IO上就会报如上错误,此时就需要做特殊处理。
1、将时钟信号clk_out绑定到支持时钟的引脚上。
我使用的是genesys2
开发板,时钟信号clk_out
由上一级电路从genesys2
的FMC
接口输入,一开始我绑定的是普通IO,后来改成绑定到FMC_CLK2_P
引脚上就不报错了。因此,只要绑定到带CLK字眼的引脚上就可以了!!! 2、将“时钟专用路由”添加到XDC中
如果I/O位置无法更改,并且本地资源上的次优路由是可接受的,则可以使用.xdc
文件中的CLOCK_DEDICATED_ROUTE
约束将此消息降级为警告。但是,强烈建议不要使用此覆盖。
具体操作是在XDC
文件中添加一句:set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets clk_out]
。