芯片开发学习笔记·二十——时序报告分析

DC 时序报告字段详解

适用工具:Synopsys Design Compiler / PrimeTime

报告命令:report_timing


目录

  1. 时序报告概览
  2. 报告头部信息
  3. 路径类型与场景
  4. 详细路径分析
  5. 关键字段详解
  6. [Setup/Hold 分析对比](#Setup/Hold 分析对比)
  7. 常见时序报告示例
  8. 时序问题诊断

1. 时序报告概览

生成时序报告的常用命令

tcl 复制代码
# 基本报告(显示最差的 1 条路径)
report_timing

# 显示多条路径
report_timing -max_paths 10

# 只显示违规路径(slack < 0)
report_timing -slack_lesser_than 0

# 显示特定路径类型
report_timing -from [get_pins U1/Q] -to [get_pins U2/D]

# 显示所有路径类型
report_timing -path_type full

# 显示物理路径(需要物理库)
report_timing -physical

# 显示 net 和 cell 延迟分离
report_timing -nets -capacitance -transition_time

2. 报告头部信息

2.1 基本信息

复制代码
****************************************
Report : timing
        -path_type full
        -delay_type max
        -max_paths 1
        -sort_by slack
Design : my_design
Version: S-2021.06-SP3
Date   : Mon Mar 23 20:50:00 2026
****************************************
字段 含义
Report 报告类型和参数
-delay_type max 分析类型:max = setup,min = hold
-max_paths 1 显示路径数量
-sort_by slack 按 slack 排序
Design 设计名称
Version 工具版本
Date 生成时间

3. 路径类型与场景

3.1 路径类型标识

复制代码
Startpoint: U_FF1/CK (rising edge-triggered flip-flop clocked by clk)
Endpoint  : U_FF2/D (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max
字段 说明
Startpoint 路径起点(通常是触发器 CK 端或输入端口)
Endpoint 路径终点(通常是触发器 D 端或输出端口)
Path Group 路径所属的时钟组
Path Type 分析类型:max = setup,min = hold

3.2 起点/终点类型

复制代码
# 寄存器到寄存器(Reg-to-Reg)
Startpoint: U_FF1/CK (rising edge-triggered flip-flop clocked by clk)
Endpoint  : U_FF2/D (rising edge-triggered flip-flop clocked by clk)

# 输入到寄存器(In-to-Reg)
Startpoint: data_in (input port clocked by clk)
Endpoint  : U_FF2/D (rising edge-triggered flip-flop clocked by clk)

# 寄存器到输出(Reg-to-Out)
Startpoint: U_FF1/CK (rising edge-triggered flip-flop clocked by clk)
Endpoint  : data_out (output port clocked by clk)

# 输入到输出(In-to-Out)
Startpoint: data_in (input port)
Endpoint  : data_out (output port)

4. 详细路径分析

4.1 完整路径报告示例

复制代码
Point                                    Incr       Path
-----------------------------------------------------------
clock clk (rise edge)                    0.00       0.00
clock network delay (propagated)         0.50       0.50
U_FF1/CK (DFFX1)                         0.00       0.50 r
U_FF1/Q (DFFX1)                          0.35       0.85 f
U_BUF1/Z (BUFX2)                         0.15       1.00 f
U_AND1/Z (AND2X1)                        0.25       1.25 r
U_FF2/D (DFFX1)                          0.00       1.25 r
data arrival time                                   1.25

clock clk (rise edge)                   10.00      10.00
clock network delay (propagated)         0.60      10.60
clock uncertainty                       -0.20      10.40
library setup time                      -0.10      10.30
data required time                                 10.30
-----------------------------------------------------------
data required time                                 10.30
data arrival time                                  -1.25
-----------------------------------------------------------
slack (MET)                                         9.05

5. 关键字段详解

5.1 数据到达路径(Data Arrival Path)

复制代码
Point                                    Incr       Path
-----------------------------------------------------------
clock clk (rise edge)                    0.00       0.00     ← 时钟沿时刻
clock network delay (propagated)         0.50       0.50     ← 时钟树延迟
U_FF1/CK (DFFX1)                         0.00       0.50 r   ← 起点触发器 CK 端
U_FF1/Q (DFFX1)                          0.35       0.85 f   ← CK→Q 延迟
U_BUF1/Z (BUFX2)                         0.15       1.00 f   ← 缓冲器延迟
U_AND1/Z (AND2X1)                        0.25       1.25 r   ← 与门延迟
U_FF2/D (DFFX1)                          0.00       1.25 r   ← 终点触发器 D 端
data arrival time                                   1.25     ← 数据到达时间
字段说明
字段 含义 说明
Point 路径节点 可以是端口、引脚或时钟事件
Incr 增量延迟 当前节点到上一节点的延迟
Path 累积延迟 从起点到当前节点的总延迟
r/f 信号跳变方向 r = rising(上升沿),f = falling(下降沿)
延迟类型详解
延迟类型 说明
clock network delay 时钟从根节点到触发器 CK 端的延迟
CK→Q delay 触发器时钟到输出的传播延迟
cell delay 组合逻辑单元的内部延迟
net delay 连线延迟(RC 延迟)

5.2 数据要求路径(Data Required Path)

复制代码
clock clk (rise edge)                   10.00      10.00     ← 采样时钟沿时刻
clock network delay (propagated)         0.60      10.60     ← 时钟树延迟
clock uncertainty                       -0.20      10.40     ← 时钟不确定性
library setup time                      -0.10      10.30     ← 库建立时间
data required time                                 10.30     ← 数据要求时间
字段说明
字段 含义 计算方式
clock edge 采样时钟沿 由时钟周期和波形决定
clock network delay 时钟树延迟 到终点触发器 CK 端的延迟
clock uncertainty 时钟不确定性 setup 分析时减去(保守)
library setup time 库建立时间 触发器本身需要的建立时间
data required time 数据要求时间 时钟沿 + 延迟 - uncertainty - setup

5.3 Slack 计算

复制代码
data required time                                 10.30     ← 数据必须在此时前到达
data arrival time                                  -1.25     ← 数据实际到达时间
-----------------------------------------------------------
slack (MET)                                         9.05     ← 时序裕量
概念 英文 定义
数据到达时间 Data Arrival Time 数据信号从起点(Launch Flip-Flop)出发,经过组合逻辑,实际到达终点(Capture Flip-Flop)D 端的时间
数据要求时间 Data Required Time 数据信号必须在此时刻之前(Setup)或之后(Hold)稳定,才能被正确采样的时间界限
物理意义
复制代码
类比理解:火车检票场景:火车 10:00 发车,需要提前 5 分钟停止检票

Data Arrival Time  = 你实际到达检票口的时间(比如 9:55)
Data Required Time = 停止检票的时间(9:55)

Slack = Required - Arrival = 0 分钟(刚好赶上)

如果 9:56 才到(Arrival > Required),就赶不上火车(Setup Violation)。
芯片时序场景
复制代码
时钟周期:10 ns(100 MHz)

Launch Edge(发射沿):0 ns 时,FF1 的 CK 端收到时钟上升沿,Q 端开始输出数据

数据经过组合逻辑传播:
  FF1 CK→Q 延迟:0.5 ns
  组合逻辑延迟:2.0 ns
  连线延迟:0.3 ns
  
Data Arrival Time = 0 + 0.5 + 2.0 + 0.3 = 2.8 ns

Capture Edge(采样沿):10 ns 时,FF2 的 CK 端收到时钟上升沿

Data Required Time 计算:
  Capture Edge:10.0 ns
  时钟树延迟:0.4 ns
  时钟不确定性:-0.2 ns(保守估计,提前采样)
  库建立时间:-0.1 ns(触发器本身需要)
  
Data Required Time = 10.0 + 0.4 - 0.2 - 0.1 = 10.1 ns
Slack 计算公式
复制代码
Setup Slack = Data Required Time - Data Arrival Time
            = (T_capture + T_skew - T_uncertainty - T_setup) - (T_launch + T_ck2q + T_combo)

Hold Slack  = Data Arrival Time - Data Required Time
            = (T_launch + T_ck2q + T_combo) - (T_capture + T_skew + T_uncertainty + T_hold)
Slack 状态
状态 含义 处理建议
MET Slack > 0,时序满足 无需处理
VIOLATED Slack < 0,时序违规 需要优化
MET (critical) Slack 很小(< 0.1ns) 关注,可能受 PVT 影响

6. Setup/Hold 分析对比

6.1 Setup 分析(Max Delay)

复制代码
Report : timing
        -delay_type max          ← Max delay analysis

Path Type: max

clock clk (rise edge)                    0.00       0.00     ← Launch edge (0 ns)
...
data arrival time                                   1.25

clock clk (rise edge)                   10.00      10.00     ← Capture edge (10 ns = 1 period)
...
library setup time                      -0.10      10.30
data required time                                 10.30

slack (MET)                                         9.05

Setup 分析特点:

  • 使用 -delay_type max
  • 分析最长路径(最坏情况延迟)
  • Launch edge 在第 N 个周期,Capture edge 在第 N+1 个周期
  • 数据需要在 Capture edge 之前到达

6.2 Hold 分析(Min Delay)

复制代码
Report : timing
        -delay_type min          ← Min delay analysis

Path Type: min

clock clk (rise edge)                    0.00       0.00     ← Launch edge (0 ns)
...
data arrival time                                   0.45

clock clk (rise edge)                    0.00       0.00     ← Capture edge (同周期!)
...
library hold time                        0.05       0.15
data required time                                  0.15

slack (MET)                                         0.30

Hold 分析特点:

  • 使用 -delay_type min
  • 分析最短路径(最好情况延迟)
  • Launch edge 和 Capture edge 在同一周期
  • 数据需要在 Capture edge 之后稳定(不能太快到达)

6.3 Setup vs Hold 对比表

特性 Setup 分析 Hold 分析
分析类型 -delay_type max -delay_type min
路径延迟 最长路径 最短路径
工艺角 Slow (worst case) Fast (best case)
温度 高温 低温
电压 低电压 高电压
时钟沿关系 相邻周期 同一周期
违规原因 组合逻辑太长 组合逻辑太短 / 时钟 skew 太大
修复方法 优化逻辑 / 插入流水线 添加 buffer / 调整时钟树

7. 常见时序报告示例

7.1 输入到寄存器路径(In-to-Reg)

复制代码
Startpoint: data_in (input port clocked by clk)
Endpoint  : U_FF1/D (rising edge-triggered flip-flop clocked by clk)
Path Group: clk
Path Type: max

Point                                    Incr       Path
-----------------------------------------------------------
input external delay                     3.00       3.00 f   ← input_delay
data_in (in)                             0.00       3.00 f
U_BUF1/Z (BUFX2)                         0.20       3.20 f
U_FF1/D (DFFX1)                          0.00       3.20 f
data arrival time                                   3.20

clock clk (rise edge)                   10.00      10.00
clock network delay (propagated)         0.50      10.50
clock uncertainty                       -0.20      10.30
library setup time                      -0.10      10.20
data required time                                 10.20
-----------------------------------------------------------
slack (MET)                                         7.00

关键字段:

  • input external delay:由 set_input_delay 定义的输入延迟
  • 数据从端口到触发器 D 端的延迟被计入 arrival time

7.2 寄存器到输出路径(Reg-to-Out)

复制代码
Startpoint: U_FF1/CK (rising edge-triggered flip-flop clocked by clk)
Endpoint  : data_out (output port clocked by clk)
Path Group: clk
Path Type: max

Point                                    Incr       Path
-----------------------------------------------------------
clock clk (rise edge)                    0.00       0.00
clock network delay (propagated)         0.50       0.50
U_FF1/CK (DFFX1)                         0.00       0.50 r
U_FF1/Q (DFFX1)                          0.35       0.85 f
U_BUF1/Z (BUFX4)                         0.25       1.10 f
data_out (out)                           0.00       1.10 f
data arrival time                                   1.10

clock clk (rise edge)                   10.00      10.00
clock network delay (propagated)         0.50      10.50
clock uncertainty                       -0.20      10.30
output external delay                   -3.00       7.30     ← output_delay
data required time                                  7.30
-----------------------------------------------------------
slack (MET)                                         6.20

关键字段:

  • output external delay:由 set_output_delay 定义的输出延迟(负数表示在 required time 中减去)

7.3 跨时钟域路径(CDC)

复制代码
Startpoint: U_FF1/CK (rising edge-triggered flip-flop clocked by clk_a)
Endpoint  : U_FF2/D (rising edge-triggered flip-flop clocked by clk_b)
Path Group: clk_b
Path Type: max

Point                                    Incr       Path
-----------------------------------------------------------
clock clk_a (rise edge)                  0.00       0.00
...
data arrival time                                   2.50

clock clk_b (rise edge)                  8.00       8.00     ← 不同时钟周期
...
data required time                                  7.50
-----------------------------------------------------------
slack (VIOLATED)                                   -5.00     ← 跨时钟域违规!

注意:

  • 如果 CDC 路径没有设 set_false_path,会报告时序违规
  • 正确的 CDC 路径应该被标记为 false_path,不会出现在时序报告中

7.4 带 Net 和 Capacitance 的报告

复制代码
report_timing -nets -capacitance -transition_time

Point                                    Fanout   Cap    Trans   Incr       Path
--------------------------------------------------------------------------------
clock clk (rise edge)                                          0.00       0.00
clock network delay (propagated)                               0.50       0.50
U_FF1/CK (DFFX1)                                               0.00       0.50 r
U_FF1/Q (DFFX1)                            2     0.05   0.15    0.35       0.85 f
net_1 (net)                                                      0.20       1.05
U_BUF1/A (BUFX2)                                               0.00       1.05 f
U_BUF1/Z (BUFX2)                           1     0.03   0.10    0.15       1.20 r
net_2 (net)                                                      0.05       1.25
U_FF2/D (DFFX1)                                                0.00       1.25 r

新增字段:

字段 含义
Fanout 扇出数量
Cap 负载电容(pF)
Trans 信号翻转时间(ns)

8. 时序问题诊断

8.1 常见违规类型

Setup 违规诊断
复制代码
slack (VIOLATED)                                   -0.50

诊断步骤:
1. 检查 data arrival time 是否过大
   - 组合逻辑级数过多 → 插入流水线或优化逻辑
   - 某个 cell delay 特别大 → 换用更大驱动能力的 cell

2. 检查 data required time 是否过小
   - clock uncertainty 过大 → 优化时钟树减少 skew
   - 时钟周期过紧 → 降低频率或优化设计
Hold 违规诊断
复制代码
slack (VIOLATED)                                   -0.20

诊断步骤:
1. 检查 data arrival time 是否过小
   - 组合逻辑太短 → 故意添加 buffer 增加延迟
   - 使用了 fast cell → 换用 slow cell

2. 检查 clock skew 是否过大
   - launch clock 和 capture clock 延迟差异大
   - 需要平衡时钟树

8.2 时序报告分析流程

tcl 复制代码
# 1. 查看最差路径
report_timing -max_paths 5 -slack_lesser_than 0

# 2. 按路径组查看
report_timing -group {clk1 clk2} -max_paths 10

# 3. 查看特定类型的违规
report_timing -from [all_inputs] -max_paths 10
report_timing -to [all_outputs] -max_paths 10

# 4. 查看物理信息(需要物理库)
report_timing -physical -max_paths 5

# 5. 生成详细报告用于调试
report_timing -significant_digits 6 -input_pins -nets \
    -capacitance -transition_time -max_paths 1

8.3 关键指标解读

指标 健康范围 警告范围 危险范围
WNS (Worst Negative Slack) > 0.5 ns 0 ~ 0.5 ns < 0
TNS (Total Negative Slack) = 0 < 10 ns > 10 ns
Violating Paths = 0 < 10 > 10
Max Trans/Cap 0 违规 < 5 违规 > 5 违规
tcl 复制代码
# 查看 WNS/TNS 汇总
report_constraint -all_violators

# 查看特定类型的违规
report_constraint -max_delay
report_constraint -max_transition
report_constraint -max_capacitance

附录:时序报告速查表

字段 英文全称 中文含义
Incr Incremental 增量延迟
Path Cumulative Path 累积路径延迟
r/f Rising/Falling 上升沿/下降沿
Fanout Fanout 扇出数量
Cap Capacitance 负载电容
Trans Transition Time 信号翻转时间
Slack Timing Slack 时序裕量
MET Met 满足时序
VIOLATED Violated 时序违规
WNS Worst Negative Slack 最差负裕量
TNS Total Negative Slack 总负裕量
相关推荐
凌盛羽6 小时前
使用python绘图分析电池充电曲线
开发语言·python·stm32·单片机·fpga开发·51单片机
尤老师FPGA7 小时前
LVDS系列44:Xilinx Ultrascale系 ADC LVDS接口参考方法(六)
fpga开发
化屾为海7 小时前
FPGA之PLL展频
fpga开发
GateWorld8 小时前
FPGA内部模块详解之七 FPGA的“灵魂”加载——配置模块(Configuration)深度解析
fpga开发·fpga config
星华云10 小时前
[FPGA]Spartan6 Uart可变波特率读写JY901P惯导模块
fpga开发·verilog·jy901p·spartan6·惯导
碎碎思10 小时前
基于 Gowin FPGA 的 SDR 开源方案:从硬件到射频全栈打通
fpga开发
S&Z346321 小时前
[SZ901]高级功能:远程调试
fpga开发
醇氧1 天前
【学习】冯诺依曼架构和哈弗架构
fpga开发
尤老师FPGA1 天前
HDMI数据的接收发送实验(七)
fpga开发