[论文解读] LocalV: Exploiting Information Locality for IP-level Verilog Generation
LocalV 采用多代理、局部性感知的 IP 级 Verilog 生成,将长文档分解为短任务,在 RealBench(45.0% 对 21.6%)和 CVDP(cid003) 上取得比 SOTA 更高的通过率
The generation of Register-Transfer Level (RTL) code is a crucial yet labor-intensive step in digital hardware design, traditionally requiring engineers to manually translate complex specifications into thousands of lines of synthesizable Hardware Description Language (HDL) code. While Large Language Models (LLMs) have shown promise in automating this process, existing approaches-including fine-tuned domain-specific models and advanced agent-based systems-struggle to scale to industrial IP-level design tasks. We identify three key challenges: (1) handling long, highly detailed documents, where critical interface constraints become buried in unrelated submodule descriptions; (2) generating long RTL code, where both syntactic and semantic correctness degrade sharply with increasing output length; and (3) navigating the complex debugging cycles required for functional verification through simulation and waveform analysis. To overcome these challenges, we propose LocalV, a multi-agent framework that leverages information locality in modular hardware design. LocalV decomposes the long-document to long-code generation problem into a set of short-document, short-code tasks, enabling scalable generation and debugging. Specifically, LocalV integrates hierarchical document partitioning, task planning, localized code generation, interface-consistent merging, and AST-guided locality-aware debugging. Experiments on RealBench, an IP-level Verilog generation benchmark, demonstrate that LocalV substantially outperforms state-of-the-art (SOTA) LLMs and agents, achieving a pass rate of 45.0% compared to 21.6%.
研究动机与目标
- 自动化 IP 级 RTL/Verilog 生成以降低人工工程量的动机。
- 研究硬件规格是否体现信息局部性,从而实现从短文档到短代码的生成。
- 开发一个多代理框架,对文档进行分区、任务规划、代码片段生成,并与接口一致性合并。
- 实现局部性引导的调试,将错误追溯到最小的规范片段并输出有针对性的修改动作。
提出的方法
- 将 IP 级 Verilog 生成表述为从一份长自然语言文档生成一个模块化 Verilog 模块。
- 通过对每个代码单元的文档到代码相关性分布的熵来量化信息局部性。
- 开发 LocalV,包含分层文档预处理、片段化任务规划、子任务约束的 RTL 生成、带接口检查的片段合并,以及基于 AST 的局部性感知调试。
- 在规划、生成和调试阶段使用检索代理获取针对各子任务的局部化文档片段。
- 应用局部性感知调试循环,将波形/AST 错误追溯到具体文档片段并输出定向编辑动作。
- 在 RealBench 和 CVDP(cid003) 上对 LocalV 进行与 SOTA 大型模型和基于代理的系统的对比评估。

实验结果
研究问题
- RQ1IP 级 Verilog 生成是否可以有效地分解为短文档、短代码的任务而不丢失信息?
- RQ2局部性感知的预处理、规划和调试是否能提升长上下文 HDL 生成的语法和功能正确性?
- RQ3在 RealBench 和 CVDP 上,LocalV 相对于最先进的单体和基于代理的基线表现如何?
- RQ4索引、规划和调试组件对整体性能和效率有何影响?
主要发现
- LocalV 在 RealBench 上的功能通过率高于 SOTA 基线(45.0% 对 21.6%)。
- 使用 Claude 为后端的 LocalV 在表 3 的所有任务中达到 75.0% 的语法通过率与 45.0% 的功能通过率,超越多项基线。
- 索引、规划和调试至关重要;移除索引会使整体性能下降约 10 个百分点,移除调试加上索引后功能通过率降至约 20%。
- AES IP 的检索质量在 LocalV 变体中显示精确率和召回率均为 0.93,表明片段定位可靠。
- PPA 分析显示 LocalV 生成的模块在面积、时延和功耗方面分别优于 Golden RTL 的 2.37%、4.34%、4.63%。
- 信息局部性显著降低对 RTL、合并器与调试器代理所需的上下文量(如 70.8%、54.8%、61.6%)。

阅读本论文
在 Nubint 阅读器中打开原文,边读边就任意段落提问。
在 Nubint 中阅读本论文本解读由 AI 根据论文原文生成,引用前请核对原文。