bb-invoke-abc (DEPRECATED in v1.3)

SkillDev tools

**[DEPRECATED in v1.3 — common path uses bb-invoke-yosys' embedded ABC]** 独立调用 ABC(Berkeley Logic Synthesis)做逻辑优化,仅 `mapping_effort=high` 等高级调优场景使用。触发场景:(1) bb-invoke-yosys `chain_to_abc=true` 时;(2) 显式 /bb-invoke-abc 调试。

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-abc (DEPRECATED in v1.3) skill

What this skill tells your AI

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

在 99% 路径上 bb-invoke-yosys 内嵌的 ABC 已足够。本 skill 仅保留为:

  • high-effort 二次优化(fix L-02 / M-06)
  • ABC script 单独调试场景

职责

读 Yosys 输出的 BLIF,跑自定义 ABC script 序列,输出优化后 BLIF。通常 bb-invoke-yosys 内嵌 ABC 已足够;本 skill 用于 high-effort 路径。

  • 调用者:bba-guru-synthesis
  • 关联:bb-invoke-yosys
  • 禁止使用:Task / Agent / Skill

Input Args

argtyperequired默认说明
blif_inputpathtrueYosys 写出的 BLIF
tech_libpathtrueASAP7 Liberty
scriptstringfalse"strash; iresyn; dc2; map -a"ABC 命令序列
design_namestringtrue
stampstringfalse<auto>

Output Contract

field
artifact_pathdesigns/<name>/synth/abc_<stamp>.blif
script_pathdesigns/<name>/synth/abc_<stamp>.script
log_pathdesigns/<name>/synth/abc_<stamp>.log
and_gatesint
levelsint
validbool
errorstring|null

4-Phase 执行

Phase 1 — render_abc_script

scripts/render_abc.py 渲染:

read_blif <blif_input>
<script_commands>
map -a -B 0.33
write_blif designs/<name>/synth/abc_<stamp>.blif
print_stats

Phase 2 — run_abc

scripts/run_abc.py

  1. source ~/wrk/eda_opensources/eda_env.sh
  2. timeout 600 abc -f <script> > <log> 2>&1
  3. log 追加 exit:<rc>

Phase 3 — parse_abc

scripts/parse_abc.py 解析 print_statsnd = <int> ... lev = <int>and_gates / levels,log 含 ERRORvalid=false

abc_<stamp>.json

Phase 4 — return

返回 JSON。bba-guru-synthesis 可将优化后 BLIF 反导入 Yosys read_blif 继续技术映射。

收敛 / 失败

状态行动
valid=true反导入 Yosys 或直接交付
valid=false(log ERROR)退回默认 abc_options
Phase 2 timeout(600s)error="ABC_TIMEOUT",简化 script

独立调用属于高级优化场景。普通流程使用 bb-invoke-yosys 即可。

资源索引

  • scripts/render_abc.pyscripts/run_abc.pyscripts/parse_abc.py
  • references/abc_scripts.md — 常用 ABC 命令组合(resyn2、dch、if 等)
  • Gotcha/abc_pitfalls.md — map area vs delay 权衡

Signals

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