ReChisel: Effective Automatic Chisel Code Generation by LLM with Reflection

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Niu, Juxin, Liu, Xiangfeng, Niu, Dan, Wang, Xi, Jiang, Zhe, Guan, Nan
Format: Preprint
Publié: 2025
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866913859513614336
author Niu, Juxin
Liu, Xiangfeng
Niu, Dan
Wang, Xi
Jiang, Zhe
Guan, Nan
author_facet Niu, Juxin
Liu, Xiangfeng
Niu, Dan
Wang, Xi
Jiang, Zhe
Guan, Nan
contents Coding with hardware description languages (HDLs) such as Verilog is a time-intensive and laborious task. With the rapid advancement of large language models (LLMs), there is increasing interest in applying LLMs to assist with HDL coding. Recent efforts have demonstrated the potential of LLMs in translating natural language to traditional HDL Verilog. Chisel, a next-generation HDL based on Scala, introduces higher-level abstractions, facilitating more concise, maintainable, and scalable hardware designs. However, the potential of using LLMs for Chisel code generation remains largely unexplored. This work proposes ReChisel, an LLM-based agentic system designed to enhance the effectiveness of Chisel code generation. ReChisel incorporates a reflection mechanism to iteratively refine the quality of generated code using feedback from compilation and simulation processes, and introduces an escape mechanism to break free from non-progress loops. Experiments demonstrate that ReChisel significantly improves the success rate of Chisel code generation, achieving performance comparable to state-of-the-art LLM-based agentic systems for Verilog code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2505_19734
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ReChisel: Effective Automatic Chisel Code Generation by LLM with Reflection
Niu, Juxin
Liu, Xiangfeng
Niu, Dan
Wang, Xi
Jiang, Zhe
Guan, Nan
Artificial Intelligence
Hardware Architecture
Coding with hardware description languages (HDLs) such as Verilog is a time-intensive and laborious task. With the rapid advancement of large language models (LLMs), there is increasing interest in applying LLMs to assist with HDL coding. Recent efforts have demonstrated the potential of LLMs in translating natural language to traditional HDL Verilog. Chisel, a next-generation HDL based on Scala, introduces higher-level abstractions, facilitating more concise, maintainable, and scalable hardware designs. However, the potential of using LLMs for Chisel code generation remains largely unexplored. This work proposes ReChisel, an LLM-based agentic system designed to enhance the effectiveness of Chisel code generation. ReChisel incorporates a reflection mechanism to iteratively refine the quality of generated code using feedback from compilation and simulation processes, and introduces an escape mechanism to break free from non-progress loops. Experiments demonstrate that ReChisel significantly improves the success rate of Chisel code generation, achieving performance comparable to state-of-the-art LLM-based agentic systems for Verilog code generation.
title ReChisel: Effective Automatic Chisel Code Generation by LLM with Reflection
topic Artificial Intelligence
Hardware Architecture
url https://arxiv.org/abs/2505.19734