跳到主要内容
Agent Platform · D1 · Wave 1

Design Observer · 设计的可解释镜头

让 Agent 理解"设计现在长什么样"和"刚才的改动影响了什么"。summarize、diff、explain、root cause——四项观察原语覆盖 Agent 对设计状态的全部信息需求。

Agent Platform D1 Wave 1
observer — explain
# Agent observes design state change
$ observer diff snap_a snap_b
[diff   ] 12 cells moved, 3 nets rerouted
[timing ] critical path +42ps on clk_core
$ observer explain --change cell_resize_u7
[explain] u7.resize(X2→X4) → fanout cap ↑
[explain] → clk_core path delay +42ps
→ root cause: u7 driving 8 loads, X4 still weak
iMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout modeliMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout model

核心能力

1. Summarize

对任意 snapshot 生成结构化摘要。包括 cell/net 统计、关键路径延迟分布、拥塞热点坐标、功耗分布热区、时钟树深度与 skew。Agent 无需解析原始数据库即可快速获取设计的高层概览。摘要输出为结构化 JSON,可直接喂入 LLM context 或作为 Model Router 的输入特征。

2. Diff

比较两个 snapshot 的结构化差异。输出三类变化集:哪些 cells 变了(位置、尺寸、类型)、哪些 nets 重布了(拓扑变化、层变化)、timing 如何变化(关键路径的 slack delta、新增违例、消失违例)。Diff 结果可直接传给 Agent Planner 作为 "what changed" 信号。

3. Explain

解释某次变更的因果链。例如:为什么 resize 这个 cell 导致那条 path 变慢?Observer 追踪电容变化 → 驱动能力 → 过渡时间 → 单元延迟的因果链条,输出可读的因果步骤。每一步附带量化数据——不只是"变慢了",而是"+42ps,因为 fanout cap 从 0.08pF 增到 0.15pF"。

4. Root Cause

从违例追溯到根因。输入一个 DRC violation 或 timing violation,Observer 回答三个问题:哪个改动引入的(改动追溯)、哪个 Agent proposal 导致的(决策追溯)、有哪些可能的修复路径(修复建议)。链路:violation → diff → change → candidate → agent intention。

Agent 调用方式

Observer 提供四项原语的统一调用接口,Agent 通过一个 observe_type 参数切换不同的观察模式。

Python
MCP
Tcl

Python SDK

from ieda.observer import DesignObserver

obs = DesignObserver("http://localhost:9110")

# Summarize: get design overview
summary = obs.observe(
    design_ref="snap_b",
    observe_type="summarize",
)
print(summary.cell_count)     # 45231
print(summary.critical_paths) # [{"name":"clk_core","slack":-0.12},...]

# Diff: compare two snapshots
diff = obs.observe(
    design_ref="snap_b",
    observe_type="diff",
    reference_ref="snap_a",
)

# Root cause: trace violation to agent proposal
rc = obs.observe(
    design_ref="snap_b",
    observe_type="root_cause",
    violation_ref="DRC_M1_SPACING_x1245_y330",
)
print(rc.introducing_change)  # "cell_move_u_alu_0"
print(rc.agent_proposal)      # "candidate_c42_a"

输入/输出契约

ObserveRequest

字段类型必需说明
design_refstring目标设计快照引用
observe_type"summarize" | "diff" | "explain" | "root_cause"观察原语类型
reference_refstringdiff 时必需基准快照引用——用于 diff 的对比基准
violation_refstringroot_cause 时必需违例引用标识

ObserveResult

字段类型说明
summaryDesignSummary | nullsummarize 模式的结构化摘要
diffDesignDiff | nulldiff 模式的结构化差异(cell_changes, net_changes, timing_delta)
explanationCausalChain | nullexplain 模式的因果链——每步附量化数据
root_causeRootCauseAnalysis | nullroot_cause 模式:introducing_change, agent_proposal, fix_suggestions

每一项观察原语都是 Agent 理解设计的眼睛

从 summarize 到 root cause——Observer 让 Agent 对设计状态有完整的感知能力。