ChatPaper.aiChatPaper

ChiseLLM:释放推理大语言模型潜力,助力Chisel敏捷硬件开发

ChiseLLM: Unleashing the Power of Reasoning LLMs for Chisel Agile Hardware Development

April 27, 2025
作者: Bowei Wang, Jiaran Gao, Yelai Feng, Renzhi Chen, Shanshan Li, Lei Wang
cs.AI

摘要

随着领域专用架构(DSA)需求的日益增长,敏捷硬件开发方法学(AHDM)应运而生。诸如Chisel等硬件构造语言(HCL)凭借其高层次抽象特性,成为HCL导向型AHDM的理想选择。尽管大型语言模型(LLMs)在代码生成任务中表现卓越,但在Chisel生成方面仍面临挑战,特别是在语法正确性和设计多样性上。近期,推理模型通过测试时扩展技术显著提升了代码生成能力。然而,我们发现未经领域适应的推理模型无法为Chisel代码生成任务带来显著效益。本文提出ChiseLLM解决方案,涵盖数据处理与转换、提示引导的推理轨迹合成及领域适应模型训练。我们从公开的RTL代码资源中构建高质量数据集,并通过提示增强方法引导模型采用结构化思维模式。实验表明,我们的ChiseLLM-7B和ChiseLLM-32B模型在基础模型之上分别提升了18.85%和26.32%的语法正确性,同时相较于基线推理模型,设计多样性能力提高了47.58%。我们的数据集和模型已公开,为HCL导向型AHDM提供了高性能、成本效益高的模型,并为未来研究设立了有效基准。GitHub仓库地址:https://github.com/observerw/ChiseLLM。
English
The growing demand for Domain-Specific Architecture (DSA) has driven the development of Agile Hardware Development Methodology (AHDM). Hardware Construction Language (HCL) like Chisel offers high-level abstraction features, making it an ideal language for HCL-Based AHDM. While Large Language Models (LLMs) excel in code generation tasks, they still face challenges with Chisel generation, particularly regarding syntax correctness and design variability. Recent reasoning models have significantly enhanced code generation capabilities through test-time scaling techniques. However, we found that reasoning models without domain adaptation cannot bring substantial benefits to Chisel code generation tasks. This paper presents ChiseLLM, a solution comprising data processing and transformation, prompt-guided reasoning trace synthesis, and domain-adapted model training. We constructed high-quality datasets from public RTL code resources and guided the model to adopt structured thinking patterns through prompt enhancement methods. Experiments demonstrate that our ChiseLLM-7B and ChiseLLM-32B models improved syntax correctness by 18.85% and 26.32% respectively over base models, while increasing variability design ability by 47.58% compared to baseline reasoning models. Our datasets and models are publicly available, providing high-performance, cost-effective models for HCL-Based AHDM, and offering an effective baseline for future research. Github repository: https://github.com/observerw/ChiseLLM

Summary

AI-Generated Summary

PDF32April 29, 2025