用可查询时序反馈提升智能体生成正确硬件代码的能力
SeqFeed: Improving Agentic RTL Code Generation with Sequential Behavior Feedback

- 设计可语义定位的时序查询语言与信号依赖图
- 在多个大模型上使代码生成通过率显著提升
- 适合硬件自动化与智能体系统研究者
RTL代码生成是硬件设计的关键阶段,智能体系统的兴起为自动化该过程带来新机遇。为生成正确RTL代码,智能体必须理解时序行为,包括信号在多个时钟周期中的演化与传播。然而,如何有效向智能体传递此类时间信息仍是重大挑战:RTL代码不暴露特定执行的周期级信号行为,而完整仿真波形又过于庞大嘈杂,难以用于大模型分析。我们研究了工程师如何推理时序行为,识别出有效反馈需满足三个要求:事件可定位、依赖可追踪、支持迭代查询。基于此,提出SeqFeed,包含两个互补机制:(1) SeQuery——类似SQL的波形查询语言,使智能体可锚定语义事件并采样相对时间点的信号值;(2) SeGraph——跟踪跨时钟周期信号传播的依赖图。实验结果表明,SeqFeed在多个大模型上均能显著提升代码生成通过率,且两者独立有效,协同使用效果更佳。
原文摘要 · Abstract (English)
RTL code generation is a critical stage in hardware design, and the emergence of agentic systems offers new opportunities to automate this process. To generate correct RTL code, agents must understand sequential behavior, including how signals evolve and propagate over multiple clock cycles. However, effectively conveying such temporal information to agents remains a significant challenge. RTL code does not expose cycle-level signal behavior for a specific execution, whereas full simulation waveforms are too voluminous and noisy for effective LLM analysis. To address these limitations, we study how human engineers reason about sequential behavior and identify three requirements for effective feedback: it should be event-addressable, dependency-traceable, and iteratively-queryable. Guided by these requirements, we propose \textit{SeqFeed}, which comprises two complementary mechanisms: (1) \textit{SeQuery}, an SQL-like waveform query language that enables agents to anchor queries to semantic events and sample signal values at relative time points; and (2) \textit{SeGraph}, a dependency graph that tracks signal propagation across clock cycles. Experimental results across multiple LLMs demonstrate the effectiveness of SeqFeed in improving pass rates. SeQuery and SeGraph are each effective independently and provide complementary benefits when used together.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。