bb-invoke-opensta

SkillDev tools

Invoke OpenSTA 2.5.0 for static timing analysis (STA). Validates WNS/TNS after synthesis; performs post-route signoff during PD (multiple PVT corners + SPEF). Trigger scenarios: (1) bba-guru-synthesis checks timing after synthesis; (2) bba-guru-pd runs multi-corner signoff after routing; (3) explici

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the bb-invoke-opensta skill

What this skill tells your AI

The instructions your AI receives, as published by amoslee2026/babel in .claude/skills/bb-invoke-opensta/SKILL.md and read by ahel’s review.

职责

调用 OpenSTA 做 STA:综合阶段 verify-WNS;PD 阶段 multi-PVT-corner timing signoff(含 SPEF 反标)。

  • 调用者:bba-guru-synthesisbba-guru-pd
  • 禁止使用:Task / Agent / Skill

Input Args

argtyperequired默认说明
netlistpathtrue综合后 netlist.v 或 PD 后 routed.def
sdc_pathpathtrueconstraints/*.sdc
tech_libpathtrueASAP7 Liberty(corner ↔ Liberty 一一对应)
top_modulestringtrue顶层名
design_namestringtrue路径 designs/<name>/[synth|pd]/
spefpathfalseSPEF(PD 模式必须)
modeenumfalsesynthsynth | post_pd
cornerslistfalsesynth: ["tt_0p77v_25c"];post_pd: ["ss_0p63v_m40c","tt_0p77v_25c","ff_0p88v_125c"]PVT 列表
stampstringfalse<auto>

Output Contract

field
artifact_pathsynth: designs/<name>/synth/sta_<stamp>.json / post_pd: designs/<name>/pd/timing_signoff.json
tcl_path.../sta_<stamp>.tcl
log_path.../sta_<stamp>.log
wns_nsfloat(最差 corner)
tns_nsfloat
timing_metbool(所有 corner ≥ 0)
corners[{corner,wns_ns,tns_ns,timing_met}]
validbool
errorstring|null

4-Phase 执行

Phase 1 — render_sta_tcl

scripts/render_sta_tcl.py 每个 corner 一段:

# corner=<corner_name>
read_liberty <tech_lib_for_corner>
read_verilog <netlist>
link_design <top_module>
read_sdc <sdc_path>
# post_pd: read_spef <spef>
# set_operating_conditions -analysis_type on_chip_variation
report_checks -path_delay max -format full_clock_expanded -group_count 10
report_wns
report_tns
report_power

多 corner 合并到一个 TCL,corner 间用 puts "=== CORNER <name> ==="

Phase 2 — run_sta

scripts/run_sta.py

  1. source ~/wrk/eda_opensources/eda_env.sh
  2. sta -V2.5.0 否则 VERSION_MISMATCH
  3. timeout 900 sta -exit <tcl> > <log> 2>&1
  4. log 追加 exit:<rc>

Phase 3 — parse_sta

scripts/parse_sta.py=== CORNER <X> === 分段:

  • worst slack <float>corner.wns_ns
  • tns <float>corner.tns_ns
  • timing_met = (wns_ns ≥ 0)
  • 全局 timing_met = AND(all corners)

sta_<stamp>.json(synth)或 timing_signoff.json(post_pd)。

Phase 4 — return

返回 JSON。

  • bba-guru-synthesistiming_met=false → 调 SDC / 重综合
  • bba-guru-pdtiming_met=false → 开 synth-needs-fix issue

收敛 / 失败

状态处理
timing_met=true进入下一阶段
wns < 0 (synth)调 abc options / 修 SDC,yosys 重综合
wns < 0 (post_pd)synth-needs-fix
VERSION_MISMATCH修 eda_env.sh
Phase 2 timeout(900s)error="STA_TIMEOUT"
网表 link 失败log: Error: cannot link

资源索引

  • scripts/render_sta_tcl.py — Phase 1
  • scripts/run_sta.py — Phase 2
  • scripts/parse_sta.py — Phase 3
  • references/asap7_corners.md — corner ↔ Liberty 映射
  • references/sdc_cheatsheet.md — 常用 SDC 语法
  • Gotcha/opensta_pitfalls.md — corner / SPEF / virtual clock 陷阱

Signals

GitHub stars
42
Forks
10
Last commit
Aug 2026
Advanced
Catalog kind
skill
Gateway key
bb-invoke-opensta
Source
github.com/amoslee2026/babel