PT命令与知识点归类整理

一、PrimeTime 基础概念

1.1 什么是 PrimeTime?

PrimeTime 是 Synopsys 的 signoff 级静态时序分析(STA)工具,核心能力包括:

|-------------------|-------------------------------------------------|
| 能力维度 | 说明 |
| Capacity | 支持 Gate Capacity 和 Performance,Hyperscale 分布式分析 |
| Performance | 使用 SPEF 精确延迟计算,PBA、POCV、AWP 提供 signoff 精度 |
| Signal Integrity | 包含 SI 分析(Timing 和 Noise),使用 CCS 库模型 |
| Modeling | 创建 QTM 和 ETM 时序模型 |
| Delay Calculation | 精确的延迟计算器 |
| DMSA | 支持 Multi-Mode Multi-Corner 分析 |

1.2 STA 路径类型(Path Type)

STA 分析覆盖以下四种时序路径:

|----------------------|--------------------------|------------------------|
| 路径类型 | 起始点(Start Point) | 终止点(End Point) |
| Input Path(in→reg) | Input Port | 寄存器数据引脚(非时钟引脚) |
| Reg-Reg Path | 寄存器时钟引脚 | 寄存器数据引脚(非时钟引脚) |
| Output Path(reg→out) | 寄存器时钟引脚 | Output Port |
| Combo Path(in→out) | Input Port | Output Port |

ℹ️ 关键概念:Timing path start points 包括 Input Port 和寄存器 Clock Pin;end points 包括 Output Port 和寄存器所有非时钟数据输入引脚。

1.3 PrimeTime 输入与输出

****输入文件:****Gate-level netlist(Verilog)、Libraries(.db 或 .lib)、Net parasitics(SPEF 或 GPD)、Design constraints(SDC)

****输出文件:****Initial timing reports、Saved Session(用于后续恢复分析)

二、PT STA 分析流程

2.1 完整 STA 流程步骤

  1. Load Design Libraries → check loaded inputs

  2. Read Parasitics → check annotated parasitics

  3. Source Constraints → check for correctness

  4. Update Timing → check timing, generate reports

  5. Save Session → check saved session

  6. Exit

  7. Restore Session → analyze, update → signoff

2.2 Step 1:加载设计与库

读取网表

read_verilog routed.v

设置当前设计

current_design ORCA

设置搜索路径和链接路径

set search_path list /ref/libs /ref/design

set link_path list \* sc_max.db io_max.db

加载库并解析引用

link_design

检查加载的库

list_libs

printvar search_path

printvar link_path

ℹ️ 检查要点:验证 current_design 是否正确、所有 library 是否已加载、link_path 和 search_path 配置是否正确。

2.3 Step 2:读取寄生参数(Parasitics)

读取 SPEF 格式寄生参数

read_parasitics -format SPEF flat.spef

读取 GPD 格式

read_parasitics -format GPD gpd_dir

保留电容耦合信息(SI分析用)

read_parasitics -format GPD -keep_capacitive_coupling

查看寄生参数标注总结

report_annotated_parasitics -list_not_annotated

ℹ️ 常见问题:SPF 文件未完全覆盖所有路径 → 使用 -list_not_annotated 详细检查。Driverless 或 Loadless nets 通常可以忽略(由 unused pins 如 qbar 引起)。

2.4 Step 3:加载约束(Constraints)

读取 SDC 文件

read_sdc -echo $constraint_file

约束完整性检查(最重要!)

check_timing -verbose

检查项目包括:no_input_delay、no_driving_cell、unconstrained_endpoints、unexpandable_clocks、no_clock、loops、generated_clocks、pulse_width_clock_non、clock_merge、PLL configuration 等。

2.5 Step 4:更新时序与生成报告

更新时序

update_timing -full

update_timing -pba

全局概要报告

report_global_timing -pba

report_analysis_coverage

report_constraint -all_violators -pba

详细时序报告(GBA 模式)

report_timing -from <start> -to <end> -path_type full \

-clock_expanded -nets -delay min max \

-group clk -nworst 5 -max_paths 10 \

-slack_lesser_than <positive_number>

PBA 模式

report_timing -pba_mode exhaustive \

-nworst 1 -max_paths 10

2.6 Step 5:保存与恢复 Session

save_session $session_directory

restore_session $session_directory

Session 包含:版本信息、链接设计和库、时钟/异常/约束、工作条件、SDF 延迟和寄生参数、变量设置、网表编辑、分析数据、交叉耦合延迟和噪声数据。

三、PBA(Path-Based Analysis)高级分析

3.1 PBA 概念

PBA 执行路径特定的 slew 传播,计算路径特定的 cell 和 net 延迟,以及路径特定的 slew degradation,然后重新计算路径 slack。PBA 计算量极大,通常只对少量违例路径使用。

3.2 两种 PBA 模式

|---------------------------|--------------------------------------------|------------------|
| 模式 | 特点 | 适用场景 |
| pba_mode(Single Endpoint) | 基于 GBA slack 确定要报告的路径,再重新计算这些路径的 PBA slack | 快速了解 PBA 带来的改善幅度 |
| pba_mode exhaustive | 重新计算尽可能多的路径(默认每 endpoint 最多 25K 条) | 最终 signoff,精度最高 |

3.3 GBA vs PBA 对比

|------------|--------------------------|-------------------------|
| 特点 | GBA(Graph-Based) | PBA(Path-Based) |
| 速度 | 快速 | 慢 |
| 精度 | 可能不够精确 | 精确 |
| 计算成本 | 低 | 高 |
| 典型用法 | 早期筛选 | Signoff 验证 |

四、OCV / AOCV / POCV 工艺变异分析

4.1 OCV(On-Chip Variation)

PVT 描述某一工艺下电压和温度对芯片性能的影响;OCV 描述芯片内部不同管子由于工艺偏差、电压、温度变化引起的性能变化。

  • Setup:Slowest Launch + Fastest Capture(最慢发射 + 最快捕获)
  • Hold:Fastest Launch + Slowest Capture(最快发射 + 最慢捕获)
  • 单一 Process Corner,使用 Min-Max Slew 和 Min-Max Loads/Drives

4.2 AOCV(Advanced OCV)

AOCV 通过考虑 logical depth(逻辑深度)和 physical distance(物理距离)提供更真实的可变 derate。Random 变异建模为逻辑深度的函数;Systematic Vt 变异建模为相关 timing cells/nets 之间最大物理距离的函数。

AOCV Depth/Distance Derate Table 示例

|---------------|-----------|-----------|-----------|-----------|------------|
| Depth | 0 | 1 | 2 | 3 | 4+ |
| Cell Derate | 1.15 | 1.12 | 1.10 | 1.08 | 1.06 |
| Net Derate | 1.14 | 1.10 | 1.07 | 1.04 | 1.02 |

4.3 POCV(Parametric OCV)

POCV 不依赖路径深度,而是使用高斯分布模型。每个 cell 有 nominal/mean (μ) 延迟和 standard deviation (σ) 延迟,路径累积延迟通过统计叠加每个阶段的延迟分布。

POCV 运行流程

设置 link_path 包含 POCV LVF 库

set link_path "pocv_lvf/* sc_max.db io_max.db"

保留坐标数据(用于 distance-based derating)

set read_parasitics_load_locations true

读取 POCV side file 和 distance tables

read_ocvm $pocv_file

read_ocvm_distance_table $distance_file

启用 POCV 分析

set timing_pocvm_enable_analysis true

生成报告

update_timing

report_constraint -all_violators

report_analysis_coverage

4.4 AWP(Advanced Waveform Propagation)

AWP 用于处理小几何尺寸下更频繁出现的波形失真,包括 Long Tail Effect(长尾效应)和 Strong Backward Miller Effect(强反向米勒效应)。当 Vth/VDD ratio 较大时,cell 对波形失真更敏感。低 VDD 使高 Vth cell 更容易出现这些问题。

set delay_calc_waveform_analysis_mode full_design

4.5 演进路线

|------------|----------------------|------------|
| 技术 | 特点 | 精度 |
| OCV | 最简单,全局 flat derate | 最保守 |
| AOCV | 引入 depth/distance 因素 | 更真实 |
| POCV | 统计方法 | 最精确,计算复杂 |

五、关键变量设置(Variables)

5.1 通用变量

移除时钟收敛悲观(CRPR)

set timing_remove_clock_reconvergence_pessimism true

PBA exhaustive endpoint 路径上限

set pba_exhaustive_endpoint_path_limit Infinity

POCV 分析

set timing_pocvm_enable_analysis true

LVF 优先级控制

set timing_pocvm_precedence lib_cell_in_tile # side file 优先

set timing_pocvm_precedence library # LVF 优先

距离-based derating 需要保留坐标

set read_parasitics_load_locations true

5.2 SI 相关变量

启用 SI 分析

set si_enable_analysis true

CCS 波形传播(需在 link_design 之前设置)

set delay_calc_waveform_analysis_mode full_design

Double switching mode

set si_xtalk_double_switching_mode clock_network

过滤参数调优

set si_filter_accum_aggr_noise_peak_ratio 0.01

set si_filter_per_aggr_noise_ratio 0.005

set si_xtalk_composite_aggr_noise_peak_ratio 0.015

SI delay 分析模式

set si_xtalk_delay_analysis_mode all_path_edges

set si_xtalk_composite_aggr_mode statistical

5.3 POCV 相关变量

启用 transition variation(需在 link_design 之前设置)

set timing_enable_slew_variation true

启用 constraint variation

set timing_enable_constraint_variation true

Guardband 设置

set_timing_derate -cell_delay -late -clock 1.82 -pocvm_guardband

set_timing_derate -cell_delay -early -clock 0.98 -pocvm_guardband

set_timing_derate -cell_delay -late -data 1.05 -pocvm_coefficient_scale_factor

set_timing_derate -cell_delay -early -data 1.83 -pocvm_coefficient_scale_factor

Moment LVF

set timing_pocvm_extended_moments true

六、PT SI(信号完整性)分析

6.1 串扰概念(Crosstalk)

串扰是通过耦合电容(Cc)从多个开关网络(aggressor,攻击者)传递到另一个静态或开关网络(victim,受害者)的电压跳变。

  • 每个网络都可能是其相邻网络的潜在 aggressor
  • 一个 aggressor 可以影响多个 victim,每个 victim 可以有多个 aggressor
  • SI 分析是迭代进行的

6.2 时钟关系与串扰分析

|----------------------------|--------------|---------------------------|
| 时钟关系 | 时序分析 | 串扰分析 |
| Asynchronous(异步) | 无时序分析 | Infinite Window(无限窗口) |
| Logically Exclusive(逻辑互斥) | 忽略 | Overlapping Windows(重叠窗口) |
| Physically Exclusive(物理互斥) | 无时序分析 | 无串扰分析 |

异步时钟组

set_clock_groups -asynchronous -group {CLKA CLKR CLR_div2} -group {CLK_OSC}

物理互斥时钟组

set_clock_groups -physically_exclusive -group {CLK_FUNC} -group {CLK_TEST}

ℹ️ 重要:不要用 set_false_path 处理异步时钟!PT SI 会假定它们是同步的,尝试扩展时钟周期找公共基准周期,导致分析过于乐观。

6.3 串扰噪声分析(Crosstalk Noise)

噪声 Bump 的关键参数

|-----------------|------------------------------------------|
| 参数 | 说明 |
| Height | 噪声 bump 的幅度(库电压单位) |
| Width | 噪声 bump 的宽度(库时间单位) |
| Area (A₀) | 总面积 = 2 × Width × Height |
| Time-peak-ratio | time-to-peak / total width,0.5 表示对称 bump |

Noise Immunity Curve vs Noise Margin

|----------------------|---------------------------------------------|
| 方法 | 特点 |
| Noise Immunity Curve | 精确描述引起逻辑失效的噪声量,通过曲线表示 Height vs Width 的安全边界 |
| Noise Margin | 更简单、更快但更保守的方法,固定阈值 |

Noise Slack 报告方式

|--------------------|------------|----------------------------------|
| Slack Type | 说明 | 命令 |
| height(默认) | 电压差值 | report_noise -slack_type height |
| percent | 百分比差值 | report_noise -slack_type percent |
| area | 面积差值 | report_noise -slack_type area |

6.4 噪声相关命令

set_noise_parameters -enable_propagation

set_noise_parameters -include_beyond_rails

set_noise_parameters -analysis_mode report_at_endpoint

set_noise_immunity_curve

set_noise_margin

set_noise_derate

set_input_noise -height 0.1 -width 1 C3/A

set_steady_state_resistance

report_noise -verbose

report_noise_calculation from_net to_net

report_delay_calculation -crosstalk

七、PT ECO(工程变更)高级功能

7.1 Physically Aware ECO 流程

输入文件

|-------------------|---------------------------------------|------------|
| 来源 | 文件类型 | 说明 |
| IC Compiler II | Netlist (Verilog) | 设计网表 |
| StarRC Extraction | Coupled SPEF | 含耦合电容的寄生参数 |
| | Timing Constraints (SDC) | 时序约束 |
| | Power Intent (UPF) | 功耗意图(如适用) |
| PT SI | Layout (DEF) | 物理版图 |
| | Floorplan Constraints (Tcl) | 布局约束 |
| | RC Parasitics With coordinates (SPEF) | 带坐标的寄生参数 |
| Ref Library | Tech Info (LEF) | 工艺信息 |
| Foundry | Encrypted Tcl | 加密的 ECO 规则 |

输出文件:ASCII ECO file with coordinates → 交由 IC Compiler II 实现

7.2 推荐的 ECO 指导流程

|-----------------------------|---------------------------------|------------------------------------|
| 步骤 | 修复方法 | 特点 |
| 1. Power Recovery | fix_eco_power | 降级或移除高功耗 cell |
| 2. DRC Fixing | fix_eco_drc | 修复 max_transition/cap/fanout/noise |
| 3. Noise & Timing Recovery | fix_eco_drc + fix_eco_timing | 噪声修复 + Setup/Hold 修复 |
| 4. Leakage Recovery | fix_eco_power -pattern_priority | Vt swap 恢复漏电 |

7.3 各步骤修复机制

|--------------|---------------------------|-----------------------------|
| 修复类型 | 修复方法 | 特点 |
| Setup | Cell sizing | 不会引入新 DRC 违例;不影响 hold slack |
| Hold | Sizing + Buffer insertion | 不引入新 timing/DRC 违例 |
| DRC | Sizing + Buffer insertion | 遵循 DRC;修复后需确认 noise/timing |

7.4 Power Recovery(功耗优化)

功耗优化:降级或移除高功耗 cell

fix_eco_power -cell_type \ -setup_margin \ \

-attribute \ -verbose \

-training_data_directory $my_training_data_directory

排除未约束的 cell

set eco_power_exclude_unconstrained_cells true

ℹ️ 机器学习加速:指定 training_data_directory 启用 ML,可加速 10x。

7.5 DRC 和 Noise 修复

DRC 修复

fix_eco_drc -methods {size_cell insert_buffer} -buffer_list $buflist \

-type transition -verbose

fix_eco_drc -methods {size_cell insert_buffer} -buffer_list $buflist \

-type max_capacitance -verbose

fix_eco_drc -methods {size_cell insert_buffer} -buffer_list $buflist \

-type max_fanout -verbose

fix_eco_drc -type noise -verbose

显示不可修复的违例及其原因

set eco_report_unfixed_reason_max_endpoints 50

常见不可修复原因:Driver cell 不能再增大(已是最大驱动)、Sequential cell 不能被修复、违例在 clock network 上、带有 dont_touch 属性、Timing Region 限制、dont_use 库 cell。

7.6 Setup 和 Hold 修复

Setup 修复(仅使用 cell sizing)

fix_eco_timing -type setup -setup_margin 0 -methods {size_cell}

Hold 修复(使用 cell sizing + buffer insertion)

fix_eco_timing -type hold -methods {size_cell insert_buffer} \

-setup_margin 0 -buffer_list $buflist

7.7 Leakage Recovery(漏电恢复)

使用 pattern_priority 指定 Vt 优先级

fix_eco_power -pattern_priority {HVT SVT LVT}

HVT = 最优先(最省电),LVT = 最不优先

排除未约束的 cell

set eco_leakage_exclude_unconstrained_cells true

7.8 Physically Aware ECO 使用

在 ECO 命令中使用 physical_mode

fix_eco_drc -type max_tran -physical_mode -buffer_list $buflist

fix_eco_drc -type max_cap -physical_mode -buffer_list $buflist

fix_eco_drc -type noise -physical_mode

fix_eco_timing -type setup -physical_mode

fix_eco_timing -type hold -physical_mode -buffer_list $buflist

写出 ECO 变更

write_changes -format icc2tcl -output pt_eco.tcl

7.9 完整 ECO 命令流程示例

=== Phase 1: Power Recovery ===

fix_eco_power -methods {size_cell remove_buffer}

=== Phase 2: DRC Fixing ===

set buflist "bufbd1 bufbd2 bufbd4"

fix_eco_drc -type max_transition -physical_mode -buffer_list $buflist

fix_eco_drc -type max_capacitance -physical_mode -buffer_list $buflist

fix_eco_drc -type max_fanout -physical_mode -buffer_list $buflist

report_drc_violations

=== Phase 3: Noise and Timing Recovery ===

fix_eco_drc -type noise -physical_mode

report_noise

fix_eco_timing -type setup -physical_mode

report_analysis_coverage

fix_eco_timing -type hold -physical_mode -buffer_list $buflist

report_analysis_coverage

=== Phase 4: Final Leakage Recovery ===

fix_eco_power -pattern_priority {HVT SVT LVT}

report_power

=== Write and Implement ===

write_changes -format icc2tcl -output pt_eco.tcl

八、脚本模板(Scripts)

8.1 PT Setup 脚本模板

Source common setup and PT setup Tcl files

source $sdir/rm/setup/common_setup.tcl

source $sdir/rm/setup/pt_setup.tcl

Define search path and link path

set_app_var search_path list ...

set link_path "$link_path"

Read netlist and link design

read_verilog $NETLIST

current_design $DESIGN_NAME

link_design

Back annotate parasitics

read_parasitics -format GPD -keep_capacitive_coupling $parasitic_file

Read SDC constraints

read_sdc -echo $constraint_file

Read OCV/POCV data

read_ocvm $pocvm_file

Update timing and check

update_timing -full

check_timing -verbose

Extract model and write interface timing

extract_model -library -test_design -output format {lib db}

write_interface_timing -netlist interface

save_session $DESIGN_NAME

Write ETM

write_interface_timing_report

九、知识点关联图谱

以下是 PrimeTime 三大模块之间的核心关联说明:

|----------------------------|-----------------------------------------------|
| 关联方向 | 说明 |
| STA Flow → SI Analysis | SI 分析建立在 STA 之上,需要先完成基本 STA 流程,再启用 SI 相关变量 |
| STA Flow → ECO | ECO 依赖 STA 的分析结果来判断违例,所有 ECO 修复命令都在 STA 环境中运行 |
| PBA ←→ OCV/AOCV/POCV | PBA 可以与 AOCV、POCV、AWP 等 derating 模式组合使用 |
| Clock Groups → SI Analysis | 时钟关系直接影响串扰分析策略 |
| Noise → DRC Fixing | 噪声违例可通过 fix_eco_drc -type noise 修复 |
| Physical Mode → ECO | Physically Aware ECO 需要 DEF/LEF 物理信息输入 |

十、快速命令参考表

基础 STA 命令

|-----------------------------------------------------------|------------------|
| 命令 | 用途 |
| read_verilog | 读取门级网表 |
| current_design | 设置当前设计 |
| link_design | 加载库并解析引用 |
| read_parasitics | 读取寄生参数(SPEF/GPD) |
| read_sdc / source | 读取约束 |
| create_clock | 创建时钟 |
| set_clock_uncertainty | 设置时钟不确定性 |
| set_input_delay / set_output_delay | 设置输入/输出延迟 |
| set_drive / set_load | 设置驱动/负载 |
| set_max_fanout / set_max_transition / set_max_capacitance | 设置 DRC 约束 |

检查与报告命令

|----------------------------------|------------|
| 命令 | 用途 |
| check_timing -verbose | 检查约束完整性 |
| report_annotated_parasitics | 检查寄生参数标注 |
| update_timing | 更新时序 |
| report_global_timing | 全局时序概要 |
| report_analysis_coverage | 分析覆盖率 |
| report_constraint -all_violators | 所有违例报告 |
| report_timing | 详细时序路径报告 |
| report_delay_calculation | 延迟计算详情 |
| report_power | 功耗报告 |
| report_noise | 噪声报告 |
| report_qor | 设计质量报告 |

ECO 命令

|----------------------------|------------------------------------|
| 命令 | 用途 |
| fix_eco_power | 功耗优化/漏电恢复 |
| fix_eco_drc | DRC(transition/cap/fanout/noise)修复 |
| fix_eco_timing -type setup | Setup 修复 |
| fix_eco_timing -type hold | Hold 修复 |
| write_changes | 输出 ECO 变更列表 |

十一、关键概念速查

|----------------------------|--------------------------------------------|
| 概念 | 说明 |
| GBA (Graph-Based Analysis) | 基于图的时序分析,快速但可能不够精确 |
| PBA (Path-Based Analysis) | 基于路径的时序分析,精确但计算量大 |
| OCV | 片上变异,全局 flat derate |
| AOCV | 高级片上变异,考虑逻辑深度和物理距离 |
| POCV | 参数化片上变异,使用高斯统计分布 |
| AWP | 高级波形传播,处理 Long Tail 和 Miller 效应 |
| CRPR | 时钟收敛悲观移除 |
| DMSA | 多模式多角分析 |
| CCS | Composite Current Source,高级库模型 |
| SPEF | 标准寄生参数交换格式 |
| GPD | Galaxy Parasitic Database |
| QTM | Quartz Timing Model |
| ETM | External Timing Model |
| Crosstalk Delay | 串扰延迟,通过 delta delay 影响时序 |
| Crosstalk Noise | 串扰噪声,静态受害网络上的噪声 bump |
| Noise Immunity Curve | 噪声免疫曲线,精确的噪声容限 |
| Noise Margin | 噪声裕量,简化的噪声容限 |
| DRC | 设计规则检查(max_trans/max_cap/max_fanout/noise) |
| Physically Aware ECO | 物理感知 ECO,使用 DEF/LEF 信息 |

相关推荐
知识充实人生2 个月前
FPGA设计杂谈之十一:时序报告中时钟的上升沿与下降沿详解
fpga开发·时序分析·rise·fall·negedge·posedge
F_D_Z5 个月前
【Python】家庭用电数据的时序分析
python·数据分析·时序分析·序列分解
遥感-GIS10 个月前
遥感时序分析的基石:深度剖析Harmonized Landsat Sentinel-2 (HLS) 数据集的诞生、原理、特点与应用
机器学习·时序分析·hls·数据融合·landsat·sentinel-2
88号技师1 年前
【1区SCI】Fusion entropy融合熵,多尺度,复合多尺度、时移多尺度、层次 + 故障识别、诊断-matlab代码
开发语言·机器学习·matlab·时序分析·故障诊断·信息熵·特征提取
88号技师1 年前
【2024年最新IEEE Trans】模糊斜率熵Fuzzy Slope entropy及5种多尺度,应用于状态识别、故障诊断!
人工智能·算法·matlab·时序分析·故障诊断·信息熵·特征提取
Ronin-Lotus1 年前
嵌入式硬件篇---数字电子技术中的时序逻辑
单片机·嵌入式硬件·蓝桥杯·时序分析·数字电子技术
秀儿还能再秀1 年前
时间序列分析(四)——差分运算、延迟算子、AR(p)模型
学习笔记·时序分析
知识充实人生2 年前
时序约束进阶六:Set_Clock_Groups详解
fpga开发·时序分析·时序约束·时钟组·set_clock_group·exclusive
goodcitizen2 年前
内网 BitTorrent 下载环境搭建——基于 Transmission
bittorrent·pt·transmission·magnet·twc·opentracker·bencode