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

摘要

對領域專用架構(Domain-Specific Architecture, DSA)日益增長的需求,推動了敏捷硬體開發方法論(Agile Hardware Development Methodology, AHDM)的發展。像Chisel這樣的硬體建構語言(Hardware Construction Language, HCL)提供了高層次的抽象特性,使其成為基於HCL的AHDM的理想語言。儘管大型語言模型(Large Language Models, 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

PDF31April 29, 2025