跳到主要内容

Interface · Agent 与 EDA 的安全边界

Interface 提供统一的 MCP / Python / Tcl 三协议入口。类型化的 request/result schema 验证、安全沙箱隔离、速率限制与完整审计日志——Agent 不需要知道底层是哪种协议,也不需要担心越权访问。

GATEWAY D0/DRAFT C++/Python
Interface Gateway
# One tool, three protocols — same iDB, same result
[Python] client.call("iPL.place", ...)
[MCP  ] {"tool": "iPL.place", "arguments": {...}}
[Tcl  ] iPL::place -effort standard
# Typed contracts + security isolation + audit log
iMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout modeliMapsynthesisiFPfloorplaniPDNpoweriPLplacementiCTSclockiTOoptimizationiRTroutingiSTAtimingAiEDAdesign dataiPCLlayout model

核心能力

Multi-Protocol

同一工具通过 MCP / Python / Tcl 三种协议暴露。Agent 无需感知协议差异——无论你用哪种方式调用 iPL.place,底层访问的是同一个 iDB,返回的是同一份结构化结果。工程师用 Tcl、AI 平台用 MCP、数据科学家用 Python——各自用最熟悉的语言。

Typed Contracts

每个工具调用都有严格的 request/result schema 验证。在网关层就完成类型校验——传入参数类型不对、缺少必填字段、数值越界,请求被立即拒绝并返回明确的错误信息。Agent 永远收不到不完整或格式错误的工具结果。

Security Isolation

Agent 调用在沙箱中执行——不能直接访问文件系统,不能发起网络请求,不能 fork 子进程。Interface 的沙箱层确保 Agent 只能通过类型化的工具接口与设计状态交互,任何越权行为在网关层就被拦截。

Rate Limiting

防止 Agent 在优化循环中过度调用耗尽计算资源。基于 token bucket 的自适应限流——Agent 在短时间内发起大量调用时自动降速,避免资源竞争同时保持交互体验。

Audit Log

所有 Agent 调用的完整审计日志——谁在什么时候调用了什么工具、传入什么参数、得到什么结果、耗时多少。日志结构化存储,可用于性能分析、安全审计、以及 Agent 行为复现。

多协议示例

三种协议下调用同一个工具 iPL.place 的完整示例。

from ieda import AgentClient

client = AgentClient(protocol="python")
design = client.load_design("aes_core", tech="sky130")

# All validation happens inside Interface gateway
result = client.call("iPL.place",
    design=design,
    effort="standard",
    congestion_weight=0.3,
    timing_weight=0.7)

# Typed result — guaranteed by contract
print(f"HPWL: {result.hpwl:.2e}")
print(f"Max Density: {result.max_density:.2%}")
print(f"WNS: {result.wns:.4f}")

安全模型

┌─────────────────────────────────────────────────┐
│                  Agent (LLM)                     │
└────────────────┬────────────────────────────────┘
                 │ MCP / Python / Tcl
                 ▼
┌─────────────────────────────────────────────────┐
│              Interface Gateway                   │
│  ┌───────────┐  ┌──────────┐  ┌──────────────┐  │
│  │  Schema   │  │  Sandbox │  │ Rate Limiter │  │
│  │ Validator │  │  Layer   │  │ (Token Bkt)  │  │
│  └───────────┘  └──────────┘  └──────────────┘  │
│  ┌───────────────────────────────────────────┐   │
│  │           Audit Logger                    │   │
│  └───────────────────────────────────────────┘   │
└────────────────┬────────────────────────────────┘
                 │ allowed tool calls only
                 ▼
┌─────────────────────────────────────────────────┐
│                  iDB + Tools                     │
└─────────────────────────────────────────────────┘

iDB

设计状态的唯一真值——Interface 是所有 Agent 访问 iDB 的唯一路径。

iDB →

Platform 总览

了解统一底座的五大模块如何协同工作。

Platform →

External Tool Bridge

将第三方 EDA 工具的命令封装为类型化工具接口。

更多 →