atlas

Research map / Large language models / Agents, code and math

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

ICLR 2025 · Large language models › Agents, code and math · approach: Code generation benchmarks · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Builds correct-by-construction Verilog data for Karnaugh maps, FSMs and waveforms plus error-report-driven targeted code repair data, and fine-tunes Starcoder2-15B to reach SOTA on VerilogEval and RTLLM.

Problem

LLM-generated synthetic Verilog data is noisy: models struggle with non-textual representations (Karnaugh maps, state diagrams, waveforms) and show unstable pass rates across training checkpoints due to minor errors that cannot be verified without testbenches.

Approach

Generate non-textual Verilog problems and solutions correct-by-construction from templates (with simulated VCD waveforms as testbench outputs), and create targeted repair data by having an LLM write error reports from failing completions, validating them, and injecting similar errors into open-source code.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
adding CC (correct-by-construction non-textual) data to SDG (ablation)Starcoder2-15B · VerilogEval-Humanpass@1 (%): 47.4 to 58.5 at temp 0.8; 54.7 to 62.0 at temp 0.2Helped
adding targeted code repair data on top of SDG-CC (ablation)Starcoder2-15B · VerilogEval-Machine and Human, RTLLMpass@1 / pass@5: Machine 73.9 to 81.9; Human 62.0 to 68.0; RTLLM Func pass@5 62.8 to 65.8Helped
removing self-consistency check from error report validation (ablation)Repair data pipeline · VerilogEval-Humanpass@1 (%): 68.0 to 63.3Hurt
removing error report (random LLM-injected errors instead) (ablation)Repair data pipeline · VerilogEval-Humanpass@1 (%): 68.0 to 59.6Hurt
scaling Repair data from 1.4k to 7.8k samples (ablation)Starcoder2-15B SDG-CC-Repair · VerilogEval-Humanpass@1 (%): 68.0 to 67.4 (Machine 81.9 to 82.2)No clear effect
second iteration of code repair data generation (ablation)Starcoder2-15B SDG-CC-Repair · VerilogEval-Humanpass@1 (%): 68.0 to 68.1 (Machine 81.9 to 81.3)No clear effect
adding CC then Repair data (full SDG-CC-Repair) vs SDG-onlyStarcoder2-15B · VerilogEval-Humanpass@1 (%): 54.7 to 68.0Helped
CC data (KMap, FSM, waveforms) effect on NonText problemsStarcoder2-15B · VerilogEval-NonTextpass@1 (%): NonText 22.2 (SDG) to higher with CC data; near-perfect on KMap and FSM, weaker on WaveformsHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Stack v2 (Verilog/SystemVerilog subset) Wikipedia textbooks VerilogEval-Human non-textual problems as templates

Benchmarks: VerilogEval-Machine VerilogEval-Human RTLLM v1.1 VerilogEval-NonText

Metrics: pass@1 pass@5 pass@10 syntax pass rate functional pass rate BLEU Jaccard TSED

Baselines: CodeV OriGen BetterV RTLCoder GPT-4o Llama-3.1 DeepSeek-Coder-V2 Starcoder2

Builds on: Self-Instruct OSS-Instruct VerilogEval RTLCoder CodeV

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy