本篇主要介绍一下STA分析,平时不太注意的一些基础内容。
STA 分析介绍
在STA 分析中, 常用report_timing 来产生sta 报告。需要注意的是report 中这些特殊符号的含义。比如下面的report:
其中“*” 代表的是sdf 反标的数值, 而 “r”或者“f” 代表的是在data path 的那个点有信号的transition。
latch based STA
如下图所示是一个基于latch 的path,其中PH1 控制的是L1、L3; PH2控制的是L2。 对于setup1的要求是: data必须在L2的closing edge到来之前ready。
这要分两种情况:
- 假设第一块组合逻辑的延时并不长, data在L2的open edge 之前达到, 也就是下图中的arrival a

假设data在L2的open edge 之后才到达, 那么第一条path (L1—L2)就需要向第二条path borrow time。
这种情况下, 第二条path的起点是D, 而不是L2的G
在sdc 中创建clock的时候, 可以加注释:
1
create_clock -name "CLK" -period 0.33 -comment "Main clock
有关逻辑分割(Logic partion)的原则
- 设计分区之间尽量不要出现glue logic
- 不能将组合逻辑拆分到两个分区中, 不然会影响到优化
Timing Exceptions
- false path
如果使用了set_case_analysis, 那么tool 可以检测一定类型的false path。 需要使用下面的命令:
1 | report_timing -justify |
- MAX path delay
如果sdc中有set_max_delay或者是set_min_delay,比如下面所示:
1 | set_max_delay 12.0 \ |
那么工具在STA 分析的时候就会忽略clock的关系, 两个reg之间的path如果超过了12ns 就会视为violation。 timing report 显示的require time 会显示12ns 而不是你设定的clock cycle
- Multi-cycle paths
如果有些逻辑很慢, 我么可以用multi-cycle指定timing exception。 如下图所示的一个例子:

如果F4 到F5需要2个clock cycle, 就可以添加如下的约束:
1 | set_multicycle_path -setup 2 \ |
设置multicycle 会改变tool setup check的时钟沿, 如下图所示:

默认情况下, tool会在setup edge的前一个沿来check hold timing。 如下图所示:

如果FF4 不需要在第一个时钟沿到来之后hold data, 那么需要添加 -hold 的exception 约束:
1 | set_multicycle_path -hold 1 \ |
这时, hold的check关系变成下图:

值得注意的是-setup 和-hold 的含义, 下面是user_guide中的原话:
The tool interprets the -setup and -hold values in the set_multicycle_path command differently. The integer value for the -setup argument specifies the number of clock cycles for the multicycle path. In the absence of a timing exception, the default is 1. The integer value for the -hold argument specifies the number of clock cycles to move the capture edge backward with respect to the default position, relative to the valid setup relationship; the default setting is 0.
Exception 约束的优先级
- set_false_path
- set_max_delay 和set_min_delay
- set_multi_cycle