DecoRTL: A Run-time Decoding Framework for RTL Code Generation with LLMs
Mohammad Akyash, Kimia Azar, Hadi Kamali

TL;DR
DecoRTL introduces a run-time decoding strategy for RTL code generation with LLMs, improving correctness and validity by being syntax-aware and contrastive, without additional training.
Contribution
The paper proposes DecoRTL, a novel inference-time decoding method that enhances RTL code generation by integrating syntax-aware temperature adaptation and self-consistency sampling.
Findings
Significant improvements in syntactic validity and correctness.
Enhanced output diversity with minimal performance overhead.
Effective across multiple open-source LLMs on the VerilogEval benchmark.
Abstract
As one of their many applications, large language models (LLMs) have recently shown promise in automating register transfer level (RTL) code generation. However, conventional LLM decoding strategies, originally designed for natural language, often fail to meet the structural and semantic demands of RTL, leading to hallucinated, repetitive, or invalid code outputs. In this paper, we first investigate the root causes of these decoding failures through an empirical analysis of token-level entropy during RTL generation. Our findings reveal that LLMs exhibit low confidence in regions of structural ambiguity or semantic complexity, showing that standard decoding strategies fail to differentiate between regions requiring determinism (syntax-critical regions) and those that benefit from creative exploratory variability (design-critical regions). Then, to overcome this, we introduce DecoRTL, a…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
