The automatic generation of RTL code (e.g., Verilog) using natural language instructions and large language models (LLMs) has attracted significant research interest recently. However, most existing approaches heavily rely on commercial LLMs such as ChatGPT, while open-source LLMs tailored for this specific design generation task exhibit notably inferior performance. The absence of high-quality open-source solutions restricts the flexibility and data privacy of this emerging technique. In this study, we present a new customized LLM solution with a modest parameter count of only 7B, achieving better performance than GPT-3.5 on two representative benchmarks for RTL code generation. This remarkable balance between accuracy and efficiency is made possible by leveraging our new RTL code dataset and a customized LLM algorithm, both of which will be made fully open-source. Furthermore, we have successfully quantized our LLM to 4-bit with a total size of 4GB, enabling it to function on a single laptop with only slight performance degradation. This efficiency allows the RTL generator to serve as a local assistant for engineers, ensuring all design privacy concerns are addressed.
翻译:利用自然语言指令与大型语言模型(LLM)自动生成RTL代码(如Verilog)近期引起了广泛研究关注。然而,现有方法大多严重依赖ChatGPT等商业LLM,而专门针对此设计生成任务的开源LLM性能明显较差。高质量开源解决方案的缺乏限制了这一新兴技术的灵活性与数据隐私保护。本研究提出了一种定制化LLM方案,参数量仅为7B,在两个代表性RTL代码生成基准测试中取得了优于GPT-3.5的性能。这一精度与效率的显著平衡得益于我们新开发的RTL代码数据集与定制化LLM算法,两者均将完全开源。此外,我们成功将LLM量化至4位,总大小为4GB,使其能够在单台笔记本电脑上运行,且性能仅轻微下降。这一效率使得RTL生成器可作为工程师的本地助手,确保所有设计隐私问题得到妥善解决。