arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2605.07782cs.CLcs.PL
收藏

CktFormalizer: 自然语言到电路表示的自动形式化

CktFormalizer: Autoformalization of Natural Language into Circuit Representations

The University of Hong Kong(香港大学)

Jing Xiong, Qi Han, Chenchen Ding, He Xiao, Zunhai Su, Chaofan Tao, Xiachong Feng, Ngai Wong

AI总结:

CktFormalizer通过依赖类型HDL在Lean 4中实现LLM生成硬件描述的自动形式化,解决Verilog中的宽度不匹配、组合环和不完整案例逻辑问题,提升后端实现率和仿真通过率。

摘要:

LLMs可以生成硬件描述,但生成的Verilog常包含宽度不匹配、组合环和不完整案例逻辑等问题。CktFormalizer通过依赖类型HDL嵌入Lean 4,使硬件缺陷转化为编译时错误,引导迭代修复。Lean在三个角色中:(i)类型检查器:依赖类型编码位宽约束、案例覆盖和无环性,将硬件缺陷转化为编译时错误;(ii)正确性防火墙:编译设计结构上无导致静默后端失败的缺陷;(iii)证明助手:代理构建机器验证的等价性证明。在VerilogEval、RTLLM和ResBench上,CktFormalizer的仿真通过率与直接Verilog生成相当,但后端实现率显著更高:95-100%的编译设计完成完整合成、布线、DRC和LVS流程。闭环PPA优化阶段通过验证的架构探索实现35%的面积减少和30%的功率减少,自动定理证明确保每个优化变体与形式规范功能等价。

英文摘要:

Hardware infrastructure is a critical bottleneck for LLM-driven circuit design, limiting what agents can express, compile, and iteratively refine within an agentic loop. To address this bottleneck, we introduce CKTLEAN, a typed hardware infrastructure embedded in Lean. It supports hardware description, compilation to SystemVerilog, and interactive type-checking and proof feedback through a persistent read-eval-print loop (REPL). On this foundation, we build CKTFORMALIZER, an agent framework for hardware generation, repair, optimization, and source-level equivalence proving. We evaluate structural correctness through compilation, functional correctness through RTL and gate-level simulation, and formal correctness through proofs relative to stated specifications. Across VerilogEval, RTLLM, ResBench, and CVDP, CKTFORMALIZER with CKTLEAN achieves compilation rates of 91.1%-99.4%. Among designs that pass RTL simulation, 95.4%-100.0% jointly complete synthesis and place-and-route and pass design-rule and layout-versus-schematic checks. In a separate evaluation on 30 VerilogEval problems, interactive proof-state feedback raises kernel-accepted equivalence proof completion from 53.3% to 63.3%. Hardware evaluation feedback also guides architecture exploration and iterative power, performance, and area (PPA) optimization, with synthesis-area reductions of up to 58.6% in the optimization loop. These results suggest that typed representations and explicit proof-state feedback help structure the agentic loop: compiler diagnostics guide targeted repairs, while proof-state feedback helps agents identify what remains to be proved and determine the next proof step. Project Page: https://ckt-formalizer.github.io/

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑