FPGA知识之xdc约束优先级

电子说

1.2w人已加入

描述

xdc约束优先级

在xdc文件中,按约束的先后顺序依次被执行,因此,针对同一个时钟的不同约束,只有最后一条约束生效。

虽然执行顺序是从前到后,但优先级却不同;就像四则运算一样,+-x÷都是按照从左到右的顺序执行,但x÷的优先级比+-要高。

时序例外的优先级从高到低为:
① Clock Groups (set_clock_groups)
② False Path (set_false_path)
③ Maximum Delay Path (set_max_delay) and Minimum Delay Path (set_min_delay)
④ Multicycle Paths (set_multicycle_path)

set_bus_skew约束并不影响上述优先级且不与上述约束冲突。原因在于set_bus_skew并不是某条路径上的约束,而是路径与路径之间的约束。

对于同样的约束,定义的越精细,优先级越高。各对象的约束优先级从高到低为:

① ports->pins->cells
② clocks。

路径声明的优先级从高到低为:
① -from -through -to
② -from -to
③ -from -through
④ -from
⑤ -through -to
⑥ -to
⑦ -through

优先考虑对象,再考虑路径。

Example1:

set_max_delay 12 -from [get_clocks clk1] -to [get_clocks clk2]
set_max_delay 15 -from [get_clocks clk1]

该约束中,第一条约束会覆盖第二条约束。

Example2:

set_max_delay 12 -from [get_cells inst0] -to [get_cells inst1]
set_max_delay 15 -from [get_clocks clk1] -through [get_pins hier0/p0] -to
[get_cells inst1]

该约束中,第一条约束会覆盖第二条约束。

Example3:

set_max_delay 4 -through [get_pins inst0/I0]
set_max_delay 5 -through [get_pins inst0/I0] -through [get_pins inst1/I3]

这个约束中,两条都会存在,这也使得时序收敛的难度更大,因为这两条语句合并成了:

set_max_delay 4 -through [get_pins inst0/I0] -through [get_pins inst1/I3]

编辑:hfy


打开APP阅读更多精彩内容
声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉

全部0条评论

快来发表一下你的评论吧 !

×
20
完善资料,
赚取积分