Skip to content
cccskills
FreePublished on GitHub

bb-create-floorplan

从 MAS(io_ring/pad_list/clock_plan)+ 综合网表生成 Magic floorplan TCL,交给 bb-invoke-magic 执行。

触发场景:(1) bba-guru-pd 综合后做 floorplan;(2) DRC 失败后调整 utilization 重生成;(3) 显式 /bb-create-floorplan。

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

See how to install

Files included (7)

  • SKILL.md3.0 KB
  • assets/floorplan.tcl.tmpl707 B
  • Gotcha/floorplan_pitfalls.md582 B
  • references/asap7_io_pads.md1.5 KB
  • scripts/parse_fp.py1.5 KB
  • scripts/render_fp_py.py1015 B
  • scripts/run_fp_gen.py3.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

bb-create-floorplan

职责

按 MAS IO ring + clock plan + utilization/aspect_ratio 参数渲染 Magic floorplan TCL。

  • 调用者:bba-guru-pd
  • 上游:bb-mas(MAS json)、bb-invoke-yosys(netlist)
  • 下游:bb-invoke-magic(action=place)
  • 禁止使用:Task / Agent / Skill

Input Args

argtyperequired默认说明
mas_pathpathtrue—designs/<name>/mas/mas.json
netlist_vpathtrue—designs/<name>/synth/netlist.v
tech_filepathtrue—ASAP7 Magic tech file
design_namestringtrue——
utilizationfloatfalse0.65目标利用率
aspect_ratiofloatfalse1.0宽高比
stampstringfalse<auto>—

Output Contract

field值
artifact_pathdesigns/<name>/pd/floorplan_<stamp>.magic.tcl
script_pathdesigns/<name>/pd/gen_fp_<stamp>.py
io_countint
utilizationfloat
validbool
errorstring|null

Floorplan TCL 结构

# Auto-generated by bb-create-floorplan
# design: <name>  util: <util>  aspect: <ar>
# Read LEF for technology/cell definitions
readspice <netlist_spice>
# Or if using DEF-based flow:
# def read <design>.def
tech load <tech_file>
floorplan -utilization <util> -aspectratio <ar>

# IO placement (from MAS.pad_list / io_ring)
place_io -side N -pads { vdd vss }
place_io -side E -pads { rx_data[7:0] }
# ...

# Clock buffers (from MAS.clock_plan)
add_clock_buffer -net clk -buffer BUFX4_ASAP7

4-Phase 执行

Phase 1 — render_fp_py

scripts/render_fp_py.py 渲染 Python:

import json
mas = json.load(open(mas_path))
io_ring   = mas["io_ring"]
pad_list  = mas["pad_list"]
clk_plan  = mas.get("clock_plan", {})
# 按 io_ring side 分组 pads,渲染 TCL

Phase 2 — run_fp_gen

timeout 120 uv run python <script_path> > <artifact_path> 2> <log>

Phase 3 — parse_fp

scripts/parse_fp.py:

  • 计 TCL 中 place_io 行数 → io_count
  • 与 MAS.pad_list 数量比对一致
  • 简单 tokenize check:括号配对、命令名合法

Phase 4 — return

返回 JSON。bba-guru-pd 调 bb-invoke-magic(action=place, layout_input=artifact)。

收敛 / 失败

状态行动
valid=true进 Magic place
io_count 不匹配修正参数映射重试
DRC fail(下游反馈)调 utilization/aspect_ratio 重生成

资源索引

  • scripts/render_fp_py.py、scripts/run_fp_gen.py、scripts/parse_fp.py
  • assets/floorplan.tcl.tmpl
  • references/asap7_io_pads.md — ASAP7 可用 pad 单元
  • Gotcha/floorplan_pitfalls.md

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