arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2606.08944cs.ARcs.PL
收藏

LongRTL:基于图相似性的LLM驱动的长上下文RTL优化

LongRTL: Graph-Similarity-Guided LLM-driven Long Context RTL Optimization

CUHK(香港中文大学);National Central University(中央大学);Southeast University(东南大学)

Yuyang Ye, Che-Kuan Shen, Xiangfei Hu, Yuchen Liu, Shuo Yin, Xufeng Yao, Bei Yu, Tsung-Yi Ho

AI总结:

提出一种基于图相似性的LLM驱动RTL优化框架,通过分区、优化和重构三个智能体解决长上下文RTL代码的优化问题。

摘要:

大型语言模型(LLM)在RTL代码生成和优化中展现出巨大潜力。然而,实际RTL设计通常冗长、纠缠且模块化差,由于上下文长度限制和缺乏结构而带来重大挑战。为克服这些障碍,我们提出一种基于图相似性的可扩展LLM驱动RTL优化框架。我们的方法引入三个协作智能体:(1)分区智能体,通过AST图相似性指导,将RTL设计分解为语义上有意义的AST子树,以匹配可重用设计模板;(2)优化智能体,基于分区子树,使用多模态检索增强生成(RAG)生成RTL子模块代码,同时结合AST和RTL指导;(3)重构智能体,基于逻辑感知排序和图RAG提示重新组装优化后的子模块,确保全局功能等价性。这些组件共同实现了对长上下文RTL设计的鲁棒、结构感知优化,弥合了玩具示例与工业级硬件代码库之间的差距。

英文摘要:

Large Language Models (LLMs) show great promise in RTL code generation and optimization. However, real-world RTL designs are typically long, entangled, and poorly modularized, posing a major challenge due to context-length limitations and lack of structure. To overcome these obstacles, we propose a scalable LLM-based RTL optimization framework guided by graph similarity. Our method introduces three collaborative agents: (1) a Partition Agent that decomposes RTL designs into semantically meaningful AST subtrees, guided by AST graph similarity to reusable design templates; (2) an Optimization Agent that generates RTL submodule code based on partitioned subtrees using multi-modal Retrieval-Augmented Generation (RAG) with both AST and RTL guidance; and (3) a Reconstruction Agent that reassembles optimized submodules based on logic-aware ordering and Graph-RAG prompting, ensuring global functional equivalence. Together, these components enable robust, structure-aware optimization of long-context RTL designs, bridging the gap between toy examples and industrial-scale hardware codebases.

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

↑