bb-invoke-qrouter

SkillDev tools

Invokes QRouter 1.4 to perform detail routing on a placed DEF, producing routed.def. Trigger scenarios: (1) bba-guru-pd routes after placement is complete; (2) explicit /bb-invoke-qrouter.

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

What this skill tells your AI

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

职责

对 placed DEF + tech/cell LEF 跑详细布线,输出 routed DEF。布线失败需 bba-guru-pd 调整 floorplan utilization 后重试。

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

Input Args

argtyperequired默认说明
placed_defpathtruedesigns/<name>/pd/placed.def
tech_lefpathtrueASAP7 tech LEF
cell_lefpathtrueASAP7 standard cell LEF
design_namestringtrue
strategyenumfalsedefaultdefault | high_effort
stampstringfalse<auto>

Output Contract

field
artifact_pathdesigns/<name>/pd/routed.def
cfg_pathdesigns/<name>/pd/qrouter_<stamp>.cfg
log_pathdesigns/<name>/pd/qrouter_<stamp>.log
failed_netsint
validbool
errorstring|null

4-Phase 执行

Phase 1 — render_qrouter_cfg

scripts/render_qrouter_cfg.py 渲染:

lef <tech_lef>
lef <cell_lef>
read <placed_def>
route
writeback
write <name>_routed.def designs/<name>/pd/routed.def
quit

strategy=high_effort 追加 set rip_limit 50 等积极参数。

Phase 2 — run_qrouter

scripts/run_qrouter.py

  1. source ~/wrk/eda_opensources/eda_env.sh
  2. qrouter -v 2>&1 | grep "1.4" 否则 VERSION_MISMATCH
  3. timeout 3600 qrouter -noclockdiff -c <cfg> > <log> 2>&1
  4. log 末尾追加 exit:<rc>

Phase 3 — parse_qrouter

scripts/parse_qrouter.py

  • routed.def 存在 → valid=true
  • log 含 routing failed / Unable to route → 计数 failed_nets

qrouter_<stamp>.json

Phase 4 — return

返回 JSON。bba-guru-pd

  • failed_nets==0 → 调 bb-invoke-magic(action=drc)
  • failed_nets>0 → 增加 utilization margin(-0.05)重 floorplan,≤5 iter

收敛 / 失败

状态行动
failed_nets==0进 DRC
failed_nets>0调 floorplan 重试
VERSION_MISMATCH修 eda_env.sh
Phase 2 timeout(3600s)error="ROUTE_TIMEOUT",提高 utilization
iter > 5retreat 到 synth-needs-fix

资源索引

  • scripts/render_qrouter_cfg.pyscripts/run_qrouter.pyscripts/parse_qrouter.py
  • references/asap7_lef.md — tech/cell LEF 位置
  • Gotcha/qrouter_pitfalls.md — congestion / pitch / via stack

Signals

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