Skip to main content
CenXiv.org
此网站处于试运行阶段,支持我们!
我们衷心感谢所有贡献者的支持。
贡献
赞助
cenxiv logo > cs > arXiv:2507.02226

帮助 | 高级搜索

计算机科学 > 编程语言

arXiv:2507.02226 (cs)
[提交于 2025年7月3日 ]

标题: DecoRTL:一种基于大语言模型的RTL代码生成运行时解码框架

标题: DecoRTL: A Run-time Decoding Framework for RTL Code Generation with LLMs

Authors:Mohammad Akyash, Kimia Azar, Hadi Kamali
摘要: 作为其众多应用之一,大型语言模型(LLMs)最近在自动化寄存器传输级(RTL)代码生成方面显示出前景。 然而,传统的LLM解码策略最初是为自然语言设计的,通常无法满足RTL的结构和语义需求,导致产生幻觉、重复或无效的代码输出。 在本文中,我们首先通过在RTL生成过程中对令牌级别的熵进行实证分析,研究这些解码失败的根本原因。 我们的研究结果表明,LLMs在结构模糊或语义复杂的区域表现出低置信度,这表明标准的解码策略无法区分需要确定性(语法关键区域)的区域和那些从创造性探索性变化中受益的区域(设计关键区域)。 然后,为了解决这个问题,我们引入了DecoRTL,一种新的运行时解码策略,该策略在RTL代码生成中既具有语法感知性又具有对比性。 DecoRTL集成了两个互补的组件:(i)自一致性采样,它生成多个候选并根据令牌级别的协议重新排序,以促进正确性同时保持多样性;以及(ii)语法感知温度适应,它根据令牌的语法和功能角色对它们进行分类,并相应地调整采样温度,对语法关键令牌施加低温度,对探索性令牌施加更高温度。 我们的方法完全在推理时运行,无需任何额外的模型微调。 通过使用VerilogEval基准在多个开源LLMs上进行评估,我们展示了在语法有效性、功能正确性和输出多样性方面的显著改进,而执行开销(性能开销)是难以察觉的。
摘要: 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 novel run-time decoding strategy, that is both syntax-aware and contrastive for RTL code generation. DecoRTL integrates two complementary components: (i) self-consistency sampling, which generates multiple candidates and re-ranks them based on token-level agreement to promote correctness while maintaining diversity; and (ii) syntax-aware temperature adaptation, which classifies tokens by their syntactical and functional roles and adjusts the sampling temperature accordingly, enforcing low temperature for syntax-critical tokens and higher temperature for exploratory ones. Our approach operates entirely at inference time without requiring any additional model fine-tuning. Through evaluations on multiple open-source LLMs using the VerilogEval benchmark, we demonstrate significant improvements in syntactic validity, functional correctness, and output diversity, while the execution overhead (performance overhead) is imperceptible.
评论: 被国际计算机辅助设计会议(ICCAD 2025)接收
主题: 编程语言 (cs.PL) ; 硬件架构 (cs.AR); 机器学习 (cs.LG)
引用方式: arXiv:2507.02226 [cs.PL]
  (或者 arXiv:2507.02226v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2507.02226
通过 DataCite 发表的 arXiv DOI(待注册)

提交历史

来自: Mohammad Akyash [查看电子邮件]
[v1] 星期四, 2025 年 7 月 3 日 01:17:44 UTC (423 KB)
全文链接:

获取论文:

    查看标题为《》的 PDF
  • 查看中文 PDF
  • 查看 PDF
  • HTML(实验性)
  • TeX 源代码
  • 其他格式
查看许可
当前浏览上下文:
cs.PL
< 上一篇   |   下一篇 >
新的 | 最近的 | 2025-07
切换浏览方式为:
cs
cs.AR
cs.LG

参考文献与引用

  • NASA ADS
  • 谷歌学术搜索
  • 语义学者
a 导出 BibTeX 引用 加载中...

BibTeX 格式的引用

×
数据由提供:

收藏

BibSonomy logo Reddit logo

文献和引用工具

文献资源探索 (什么是资源探索?)
连接的论文 (什么是连接的论文?)
Litmaps (什么是 Litmaps?)
scite 智能引用 (什么是智能引用?)

与本文相关的代码,数据和媒体

alphaXiv (什么是 alphaXiv?)
CatalyzeX 代码查找器 (什么是 CatalyzeX?)
DagsHub (什么是 DagsHub?)
Gotit.pub (什么是 GotitPub?)
Hugging Face (什么是 Huggingface?)
带有代码的论文 (什么是带有代码的论文?)
ScienceCast (什么是 ScienceCast?)

演示

复制 (什么是复制?)
Hugging Face Spaces (什么是 Spaces?)
TXYZ.AI (什么是 TXYZ.AI?)

推荐器和搜索工具

影响之花 (什么是影响之花?)
核心推荐器 (什么是核心?)
IArxiv 推荐器 (什么是 IArxiv?)
  • 作者
  • 地点
  • 机构
  • 主题

arXivLabs:与社区合作伙伴的实验项目

arXivLabs 是一个框架,允许合作伙伴直接在我们的网站上开发和分享新的 arXiv 特性。

与 arXivLabs 合作的个人和组织都接受了我们的价值观,即开放、社区、卓越和用户数据隐私。arXiv 承诺这些价值观,并且只与遵守这些价值观的合作伙伴合作。

有一个为 arXiv 社区增加价值的项目想法吗? 了解更多关于 arXivLabs 的信息.

这篇论文的哪些作者是支持者? | 禁用 MathJax (什么是 MathJax?)
  • 关于
  • 帮助
  • contact arXivClick here to contact arXiv 联系
  • 订阅 arXiv 邮件列表点击这里订阅 订阅
  • 版权
  • 隐私政策
  • 网络无障碍帮助
  • arXiv 运营状态
    通过...获取状态通知 email 或者 slack

京ICP备2025123034号