<一句话说清『这个 skill 做什么 + 何时调用』。把最关键的触发场景放最前面。结尾给 2-3 个用户会说的关键词。>
日本語の概要は準備中です。原文の説明を表示しています。
从 MAS(clock_domains / io_timing / path_exceptions)派生 Synopsys SDC 时序约束文件,OpenSTA 语法校验。触发场景:(1) bba-guru-synthesis 综合前;(2) post-PD timing fail 修订约束;(3) 显式 /bb-create-sdc。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
按 MAS clock_domains / io_timing / path_exceptions + target_freq 生成 SDC,OpenSTA 解析校验。ADR-016:SDC 来源是 MAS,不从 RTL 推断。
bba-guru-synthesisbb-masbb-check-cdc、bb-invoke-yosys、bb-invoke-opensta# Skill-local scripts (this skill's own scripts/ dir), consistent with all other bb-* skills.
PROJECT_SCRIPTS = .claude/skills/bb-create-sdc/scripts
| arg | type | required | 默认 | 说明 |
|---|---|---|---|---|
| mas_path | path | true | — | designs/<name>/mas/mas.json |
| target_freq_mhz | int | true | — | 目标频率(MHz) |
| design_name | string | true | — | — |
| process_corner | string | false | tt_0p77v_25c | ASAP7 corner |
| io_delay_pct | float | false | 0.3 | IO delay 占周期比 |
| stamp | string | false | <auto> | — |
| field | 值 |
|---|---|
artifact_path | designs/<name>/constraints/<design>.sdc |
script_path | designs/<name>/synth/gen_sdc_<stamp>.py |
clocks | int |
io_constraints | int |
exceptions | int |
valid | bool |
error | string|null |
#==============================================================================
# {{ DESIGN_NAME }} Timing Constraints
# Source: spec/MAS/{{ MODULE_NAME }}/MAS.md §7
# Spec Hash: {{ sha256:xxxxxxxxxxxx }}
# Generated by bb-create-sdc @ {{ TIMESTAMP }}
# REQ Coverage: REQ-NFR-01, REQ-ARCH-01, REQ-M##-F##
#==============================================================================
# ── REQ-NFR-01: 主时钟频率 ──────────────────────────────────────────────────
# @requirement REQ-NFR-01
# @spec_ref MAS/{{ MODULE_NAME }}/MAS.md §7.1
create_clock -name clk -period <period> [get_ports clk]
# ── REQ-ARCH-01: CDC 策略 ───────────────────────────────────────────────────
# @requirement REQ-ARCH-01
# @spec_ref ARCH/clock_reset_spec.md §3
set_false_path -from [get_ports rst_n]
# ── REQ-M##-F##: IO 时序 ────────────────────────────────────────────────────
# @requirement REQ-M##-F##
# @spec_ref MAS/{{ MODULE_NAME }}/MAS.md §7.2
set_input_delay -clock clk -max <io_max> [get_ports {<in_ports>}]
set_output_delay -clock clk -max <io_max> [get_ports {<out_ports>}]
# ── REQ-M##-F##: 多周期路径 ─────────────────────────────────────────────────
# @requirement REQ-M##-F##
# @spec_ref MAS/{{ MODULE_NAME }}/MAS.md §7.3
set_multicycle_path 2 -setup -from [...] ;# from MAS.path_exceptions
| SDC 命令 | 关联 REQ 类型 | 来源 |
|---|---|---|
create_clock | REQ-NFR-## (频率) | PRD.md §3 PPA |
set_input_delay / set_output_delay | REQ-M##-F## (IO 时序) | MAS.md §7.2 |
set_false_path | REQ-ARCH-## (CDC/复位) | ARCH/clock_reset_spec.md |
set_multicycle_path | REQ-M##-F## (多周期路径) | MAS.md §7.3 |
set_clock_groups | REQ-ARCH-## (时钟域) | ARCH/clock_reset_spec.md |
traceability/requirements_matrix.arch.csv 查找关联 REQ_ID@requirement + @spec_ref 注释@spec_hash(使用 .claude/skills/bb-rtl-coder/scripts/compute_spec_hash.py,该 helper 归 bb-rtl-coder 所有)traceability/requirements_matrix.sdc.csvreq_id,req_desc,module,sdc_command,sdc_file,line_number,status
REQ-NFR-01,主时钟频率 ≥ 500MHz,SYS,create_clock,constraints/{{ DESIGN }}.sdc,12,implemented
REQ-ARCH-01,CDC 策略,SYS,set_false_path,constraints/{{ DESIGN }}.sdc,18,implemented
import json
mas = json.load(open(mas_path))
period = 1000.0 / target_freq_mhz # ns
io_max = period * io_delay_pct
# 渲染 create_clock / set_input_delay / set_output_delay / set_false_path / set_multicycle_path
timeout 120 uv run python <script_path> > <artifact_path>
sta -exit "read_sdc <artifact_path>; exit" 2>&1
$PROJECT_SCRIPTS/parse_sdc.py:
Error: → valid=false返回 JSON。
| 状态 | 行动 |
|---|---|
| valid=true | 进 bb-check-cdc → bb-invoke-yosys |
| valid=false | 重试 1 次,仍失败 error="sdc invalid" |
| post-PD timing fail | bba-guru-pd 触发本 skill 加 false_path / multicycle |
$PROJECT_SCRIPTS/render_sdc_py.py、$PROJECT_SCRIPTS/run_sdc_gen.py、$PROJECT_SCRIPTS/parse_sdc.pyassets/sdc.tcl.tmplreferences/asap7_corner_period.md — 各 corner 推荐 marginGotcha/sdc_pitfalls.md — virtual clock / clock group / generated clockまだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
<一句话说清『这个 skill 做什么 + 何时调用』。把最关键的触发场景放最前面。结尾给 2-3 个用户会说的关键词。>
日本語の概要は準備中です。原文の説明を表示しています。
从粗略 idea 设计芯片或功能模块架构,输出专业架构文档到 spec_arch 目录。Trigger: 芯片架构设计, IC架构, 电路模块设计, 硬件架构. Generate IC/Chip architecture specification from rough ideas.
日本語の概要は準備中です。原文の説明を表示しています。
基于 AST 检查 CDC/RDC 违例:对比 MAS clock_domains 找跨域信号,检查是否被 2ff-sync CBB 保护。触发场景:(1) bba-guru-synthesis 综合前;(2) 显式 /bb-check-cdc。
日本語の概要は準備中です。原文の説明を表示しています。
调用 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。
日本語の概要は準備中です。原文の説明を表示しています。
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.
日本語の概要は準備中です。原文の説明を表示しています。
对抗性代码评审:代码质量 / 可维护性 / 时序风险 / 综合友好度 / MAS 对齐度。默认 ruthless 模式,找 EVERY flaw。触发场景:(1) RTL lint 后;(2) 显式 /bb-code-review。
日本語の概要は準備中です。原文の説明を表示しています。