综合分析基础之建立时间与保持时间, start point & end point & path type
IC代码的综合过程可以说就是时序分析过程,dc会将设计打散成一个个路经,这些路经上有cell延迟和net延迟,然后dc会根据你加的约束,来映射库中符合这种延迟以及驱动的器件。从而达到综合的目的。dc的所有时序约束基础差不多就是setuptime 和 hold time。 可以用下面的图片说明:
setup time and hold time info are in .lib file.
所谓setup time即建立时间,也就说数据在时钟到来之前保持稳定所需要的时间,
This is so that the data can be stored successfully in the storage device. Setup violations can be fixed by either slowing down the clock (increase the period) or by decreasing the delay of the data path logic.
holdtime 即保持时间,也就是说在时钟到来之后数据需要保持稳定的时间。
Hold Time is the amount of time the synchronous input (D) stays long enough after the capturing edge of clock so that the data can be stored successfully in the storage device. Hold violations can be fixed by increasing the delay of the data path or by decreasing the clock uncertainty (skew) if specified in the design.
在深入建立时间和保持时间之前。先了解下dc中的路经以及startpoint ,end point。 所谓start point 就是:
1. input port(顶层设计的输入端口)
2.clock pin of sequential cell(触发器的clock pin)所谓的end point 就是:1 output port(顶层设计的输出端口)
3.datapin of sequential cell(触发器的data pin)了解 start point 和 end point,就可以方便的了解 dc是如何将设计打散成路经,一个设计中基本的路径分为4种,如下图:
path1: input port to data pin of sequential cell
path2: input port to output port
path3: clock pin to data pin of next sequential cell
path4:clock pin to output port
所有的设计也就这四种类型的路径。
另外一种就是带反馈的,也就是本身的clock pin to data pin == path 3 。
有了路径的概念之后,我们可以分析更复杂的setup time 和 hold time 。 dc中对于建立时间的分析是基于路径的最大延迟;而对于保持时间的分析是基于路径的最小延迟。
看下面一个例子:
这个是给定setup time 和hold time 的案例,要求算出最小时钟周期。同理也可以给你一个周期和setup time 和hold time,计算时间裕度。 我们假设时钟周期是20,每个触发器的cell 延迟是1,触发器的建立时间是1,保持时间是0.5,分析下列图中的建立时间和保持时间的slack。
看到设计,首先要分析路径,找出最长和最短路径,因为dc的综合都是根据约束而得到最短和最长路径来进行器件选择的。所以接下来将图中的所有路径标出。因为没有前级(input_delay)和后级电路(output_delay),我们只分析图中给出的 路径,如下图:
对于红色路径:Td=Tcell+Td4+Td5+Td6=1+4+3+1=9
对于黄色路径:Td=Tcell+Td4+Td5+Td6+Td8=1+4+3+1+2=11
对于紫色路径:Td=Tcell+Td1+Td2+Td3=1+2+3+2=8
对于绿色路径:Td=Tcell+Td7+Td2+Td3=1+2+3+2=8
所以Tlongest=11,Tshortest=8
对于setup time的slack:Tclk-Tlongest-Tsetup=20-11-1=8
对于hold time的slack : Tshortest-Thold=8-0.5=7.5
对于setup time 和 hold time 的slack的计算,可以体会下面的示意:
对照第一副示意图与此比较,建立时间看D2 ,保持时间看D1,因为同时把Tl和Ts放在一个图例中,看起来可能有些误解:)
有空会继续讨论setup time 和hold time,下次讨论将包括clock skew 和input delay,output delay在其中
浙公网安备 33010602011771号