Faver:通过功能抽象的可验证中间件提升基于LLM的RTL生成
Faver: Boosting LLM-based RTL Generation with Function Abstracted Verifiable Middleware
AI总结:
本文提出功能抽象的可验证中间件Faver,通过混合LLM友好的代码结构与规则模板解耦电路验证细节,使LLM专注功能,在SFT和开源模型上将RTL生成准确性提升高达14%。
摘要:
基于LLM的RTL生成是一个有趣的研究方向,因为它有潜力解放当前芯片设计中最不自动化的阶段。然而,由于高层规范与RTL之间存在巨大的语义鸿沟,加上训练数据有限,现有模型在生成准确性方面存在困难。借鉴人类经验,结合验证的设计有助于提高准确性。然而,由于RTL测试台数据更为稀缺,这对LLM并不友好。尽管LLM擅长Python/C等高级语言,但它们与RTL之间存在巨大的语义鸿沟。在实现相同功能时,Python/C代码与硬件代码在时空粒度上差异显著,这要求LLM不仅要考虑高层功能语义,还要确保低层细节与电路代码一致。这并非易事。在本文中,我们提出了一种功能抽象的可验证中间件(Faver),它简化了基于LLM的工作流程中的RTL验证。通过将LLM友好的代码结构与基于规则的模板混合,Faver解耦了电路验证的细节,使LLM能够专注于功能本身。在我们对SFT模型和开源模型的实验中,Faver将模型的生成准确性提高了多达14%。
英文摘要:
LLM-based RTL generation is an interesting research direction, as it holds the potential to liberate the least automated stage in the current chip design. However, due to the substantial semantic gap between high-level specifications and RTL, coupled with limited training data, existing models struggle with generation accuracy. Drawing on human experience, design with verification helps improving accuracy. However, as the RTL testbench data are even more scarce, it is not friendly for LLMs. Although LLMs excel at higher-level languages like Python/C, they have a huge semantic gap from RTL. When implementing the same functionality, Python/C code and hardware code differ significantly in the spatiotemporal granularity, requiring the LLM not only to consider high-level functional semantics but also to ensure the low-level details align with the circuit code. It is not an easy task. In this paper, we propose a function abstracted verifiable middleware (Faver) that streamlines RTL verification in LLM-based workflows. By mixing LLM-friendly code structures with a rule-based template, Faver decouples the details of circuit verification, allowing the LLM to focus on the functionality itself. In our experiments on the SFT model and open-source models, Faver improved the model's generation accuracy by up to 14%.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。