一、報錯內容
[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.
< set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets clk_out_IBUF] >
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]
。