Skip to content
cccskills
FreePublished on GitHub

bb-invoke-abc

**[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 调试。

The English summary is being prepared. Showing the original description.

See how to install

Files included (6)

  • SKILL.md2.8 KB
  • Gotcha/abc_pitfalls.md2.3 KB
  • references/abc_scripts.md1.8 KB
  • scripts/parse_abc.py3.1 KB
  • scripts/render_abc.py4.0 KB
  • scripts/run_abc.py3.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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

在 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_inputpathtrue—Yosys 写出的 BLIF
tech_libpathtrue—ASAP7 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_stats 行 nd = <int> ... lev = <int> → and_gates / levels,log 含 ERROR → valid=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.py、scripts/run_abc.py、scripts/parse_abc.py
  • references/abc_scripts.md — 常用 ABC 命令组合(resyn2、dch、if 等)
  • Gotcha/abc_pitfalls.md — map area vs delay 权衡

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

<一句话说清『这个 skill 做什么 + 何时调用』。把最关键的触发场景放最前面。结尾给 2-3 个用户会说的关键词。>

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

从粗略 idea 设计芯片或功能模块架构,输出专业架构文档到 spec_arch 目录。Trigger: 芯片架构设计, IC架构, 电路模块设计, 硬件架构. Generate IC/Chip architecture specification from rough ideas.

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

基于 AST 检查 CDC/RDC 违例:对比 MAS clock_domains 找跨域信号,检查是否被 2ff-sync CBB 保护。触发场景:(1) bba-guru-synthesis 综合前;(2) 显式 /bb-check-cdc。

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

调用 babel-lsp / verible-verilog-lint 检查 SV 源码。src 必须可综合(零 syntax error),tb 允许 verification constructs。发现 src error 时自动修复重检(max 3 iter)。触发:(1) bba-guru-rtl 生成后;(2) RTL 修复重检;(3) 显式 /bb-check-lint。

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

Babel internal issue protocol — close a handoff after downstream agent picked it up or user signed off. Moves designs/<name>/.handoff/<label>.md to .handoff/closed/ (using mv per CLAUDE.md), appends to handoff_log.jsonl.

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

对抗性代码评审:代码质量 / 可维护性 / 时序风险 / 综合友好度 / MAS 对齐度。默认 ruthless 模式,找 EVERY flaw。触发场景:(1) RTL lint 后;(2) 显式 /bb-code-review。

The English summary is being prepared. Showing the original description.

amoslee2026/Babel49Updated Aug 4, 2026

See all skills by amoslee2026

Report a problem with this skill