pith. sign in

arxiv: 2504.15659 · v2 · pith:WPJYE5EQnew · submitted 2025-04-22 · 💻 cs.AR · cs.AI· cs.CL· cs.LG· cs.SE

VeriCoder: Enhancing LLM-Based RTL Code Generation through Functional Correctness Validation

classification 💻 cs.AR cs.AIcs.CLcs.LGcs.SE
keywords codedatasetgenerationtestsfunctionallanguagevericodercorrectness
0
0 comments X
read the original abstract

Recent advances in Large Language Models (LLMs) have sparked growing interest in applying them to Electronic Design Automation (EDA) tasks, particularly Register Transfer Level (RTL) code generation. While several RTL datasets have been introduced, most focus on syntactic validity rather than functional validation with tests, leading to training examples that compile but may not implement the intended behavior. We present VERICODER, a model for RTL code generation fine-tuned on a dataset validated for functional correctness. This fine-tuning dataset is constructed using a novel methodology that combines unit test generation with feedback-directed refinement. Given a natural language specification and an initial RTL design, we prompt a teacher model (GPT-4o-mini) to generate unit tests and iteratively revise the RTL design based on its simulation results using the generated tests. If necessary, the teacher model also updates the tests to ensure they comply with the natural language specification. As a result of this process, every example in our dataset is functionally validated, consisting of a natural language description, an RTL implementation, and passing tests. Fine-tuned on this dataset of 125,777 examples, VERICODER achieves state-of-the-art metrics in functional correctness on VerilogEval and RTLLM, with relative gains of up to 71.7% and 27.4%, respectively. An ablation study further shows that models trained on our functionally validated dataset outperform those trained on functionally non-validated datasets, underscoring the importance of high-quality datasets in RTL code generation. Our code, data, and models are publicly available at https://github.com/Anjiang-Wei/VeriCoder

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. EstRTL: Functional Estimation Guided RTL Code Generation

    cs.AR 2026-06 unverdicted novelty 5.0

    EstRTL improves correctness of generic-LLM RTL code generation by 3.2-9% via a Generation-Estimation-Correction loop that uses static functional scoring to decide acceptance, retry, or repair.

  2. SafeTune: Mitigating Data Poisoning in LLM Fine-Tuning for RTL Code Generation

    cs.CR 2026-04 unverdicted novelty 5.0

    SafeTune uses GNN-based structural anomaly detection and semantic prompt classification to filter poisoned data in LLM fine-tuning for RTL generation, enhancing robustness against hardware Trojan insertion without alt...

  3. Mitigating hallucinations and omissions in LLMs for invertible problems: An application to hardware logic design automation

    cs.LG 2025-11 unverdicted novelty 5.0

    Using LLMs to encode logic condition tables into HDL code and decode back to tables mitigates hallucinations in hardware design automation.

  4. StepPRM-RTL: Stepwise Process-Reward Guided LLM Fine-Tuning for Enhanced RTL Synthesis

    cs.AI 2026-06 unverdicted novelty 4.0

    StepPRM-RTL combines stepwise process-reward modeling, RAFT, and MCTS to fine-tune LLMs for RTL code, claiming over 10% gains in functional correctness on Verilog/VHDL benchmarks.