ARCLSep 19, 2024

CraftRTL: High-quality Synthetic Data Generation for Verilog Code Models with Correct-by-Construction Non-Textual Representations and Targeted Code Repair

arXiv:2409.12993v250 citationsh-index: 11Has Code
Originality Incremental advance
AI Analysis

This addresses hardware design automation for engineers by improving code generation accuracy, though it is incremental as it builds on existing methods.

The paper tackled challenges in generating Verilog code with LLMs by enhancing synthetic data curation for non-textual representations and creating targeted code repair data, resulting in fine-tuned models outperforming prior state-of-the-art by up to 10.9% on benchmarks.

Despite the significant progress made in code generation with large language models, challenges persist, especially with hardware description languages such as Verilog. This paper first presents an analysis of fine-tuned LLMs on Verilog coding, with synthetic data from prior methods. We identify two main issues: difficulties in handling non-textual representations (Karnaugh maps, state-transition diagrams and waveforms) and significant variability during training with models randomly making "minor" mistakes. To address these limitations, we enhance data curation by creating correct-by-construction data targeting non-textual representations. Additionally, we introduce an automated framework that generates error reports from various model checkpoints and injects these errors into open-source code to create targeted code repair data. Our fine-tuned Starcoder2-15B outperforms prior state-of-the-art results by 3.8%, 10.9%, 6.6% for pass@1 on VerilogEval-Machine, VerilogEval-Human, and RTLLM.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes