bb-invoke-netgen

SkillDev tools

Invoke Netgen 1.5.275 to run LVS comparison: synthesized netlist vs. Magic-extracted SPICE; it must match for signoff. Trigger scenarios: (1) LVS after bba-guru-pd extract; (2) explicit /bb-invoke-netgen.

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-netgen skill

What this skill tells your AI

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

职责

对比 schematic netlist(综合 netlist.v)与 layout netlist(Magic extracted.spice),输出 LVS 报告,必须 match。

  • 调用者:bba-guru-pd
  • 上游:bb-invoke-magic(action=extract)
  • 禁止使用:Task / Agent / Skill

Input Args

argtyperequired说明
schematic_netlistpathtruedesigns/<name>/synth/netlist.v
layout_netlistpathtruedesigns/<name>/pd/extracted.spice
tech_filepathtrueASAP7 netgen setup file(.tcl
top_modulestringtrue
design_namestringtrue
stampstringfalse<auto YYYYMMDD-HHMMSS>

Output Contract

field
artifact_pathdesigns/<name>/pd/lvs_report.txt
log_pathdesigns/<name>/pd/netgen_<stamp>.log
matchbool("Circuits match uniquely")
discrepancies[{kind, instance, schematic, layout}]
validbool
errorstring|null

4-Phase 执行

Phase 1 — render_netgen_cmd

scripts/render_netgen.py 生成 batch 命令:

netgen -batch lvs \
  "designs/<name>/pd/extracted.spice <top>" \
  "designs/<name>/synth/netlist.v <top>" \
  <tech_file> \
  designs/<name>/pd/lvs_report.txt

Phase 2 — run_netgen

scripts/run_netgen.py

  1. source ~/wrk/eda_opensources/eda_env.sh
  2. netgen -batch lvs --version 2>&1 | grep "1.5" 否则 VERSION_MISMATCH
  3. timeout 600 netgen -batch lvs <args> > <log> 2>&1
  4. log 追加 exit:<rc>

Phase 3 — parse_lvs

scripts/parse_lvs.py 扫描 lvs_report.txt

  • 末尾 Circuits match uniquely.match=true
  • Circuits differmatch=false,提取后续 Net mismatch / Device mismatch 段为 discrepancies

lvs_<stamp>.json

Phase 4 — return

返回 JSON。bba-guru-pd

  • match=true → 进入 bb-invoke-opensta(mode=post_pd)
  • match=false → 黑盒/命名冲突,开 synth-needs-fix

收敛 / 失败

状态行动
match=true进 post-PD STA
match=falsesynth-needs-fix
VERSION_MISMATCH修 eda_env.sh
Phase 2 timeout(600s)error="LVS_TIMEOUT"

资源索引

  • scripts/render_netgen.pyscripts/run_netgen.pyscripts/parse_lvs.py
  • references/asap7_netgen_setup.md — setup file 与 device map
  • Gotcha/lvs_pitfalls.md — 黑盒、port order、电源 net 命名

Signals

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