timequest 中set input delay set output delay 的使用

 set_input_delay/ set_output_delay

TimeQuest出现以后,随之 set input delay 与 set output delay 也跟着出现,该约束命令用“外包资料”的方式,不仅可以将时钟抖动也包装进去,而且也能将外部ic的寄存器特性也包裹进去

  在与时钟选项定义的时钟相关的输入port上定义data arrival time,可将输入延时定义与上升沿或下降沿相关。

  如果输入延时与简单的生成时钟相关,到生成时钟的clock arrival time要加到data arrival time上。

  输入延时可以定义与时钟网络中的port相关,到参考port的clock arrival time要加到data arrival time上。

  输入延时可以包含时钟源延时,默认条件下,相关的时钟源延时加到输入延时上;但是,当定义-source_latency_included选项时,时钟源延时不要相加,因为它并没有用作为input delay value的时序因素。

max用在时钟建立时间或恢复(recovery)校验上,min用于时钟保持时钟或移除(removal)校验上。

程序

  以上内容摘自Quartus help,基本定义edn上很多仁兄已经讲的很清楚了。

看下面简单的例子,两级触发器,来自

  http://www.altera.com.cn/support/examples/timequest/exm-timequest.html

很简单的例子,仅仅加时钟周期约束的条件下,

 

create_clock -period 10.000-name clk_in [get_ports {clk_in}]

 

 

用TimeQuest分析仅会得到一路path的分析,reg1 to reg2,时序图如下:

clock arrival time=latch edge+clock network delay to destination register                                           

11.110=10+1.110

data required time =clock arrival time -u/tsu                                                                                   

11.125=11.110-(-0.015)

data arrival time=launch edge +clock network delay source register +u/tco+register-to-register delay  

1.438=0+1.148+0.199+0.091

clock setup slack =data required time -data arrival time                                                                   

9.687 = 11.125-1.438

 

set_input_delay -clock { clk_in } -add_delay 1.200 [get_ports {data_in}]

set_output_delay
-clock { clk_in } -add_delay 2.000 [get_ports data_out]

重新运行TimeQuest,可以看到3个path分析

  1) data_in to reg1

 

2) reg1 to reg2

 

3) reg2 to data_out

  可以看到,输入路径在data arrival time上加上了input delay;输出路径在data required time上减去了output delay;分别表现为对setup和hold时间的影响。

posted @ 2014-06-13 09:51  lianjiehere  阅读(1746)  评论(0编辑  收藏  举报