arXiv:2507.21485cs.SEcs.AI2025-07中稿 · ICCAD 2025被引 10

用大模型自动发现并修复硬件综合代码中的逻辑错误,提升设计效率。

HLSDebugger: Identification and Correction of Logic Bugs in HLS Code with LLM Solutions

  • 构建30万条带标注的HLS错误数据集,支持端到端调试。
  • 在错误定位与修复上均超越GPT-4,修复效果提升超3倍。
  • 适合初学者或软件工程师快速上手硬件开发。

高级综合(HLS)通过将高层描述自动转换为高效硬件实现,加速了硬件设计流程。然而,对HLS代码进行调试既困难又耗时,尤其对缺乏硬件知识的新手或软件工程师而言。大语言模型(LLMs)在自动化调试方面展现出潜力,但面临三大挑战:1)高质量电路训练数据稀缺;2)硬件逻辑错误比软件错误更复杂,难以依赖已有基准测试用例识别;3)缺乏可靠测试用例,需同时完成错误定位与修正,增加多任务难度。为此,本文提出HLSDebugger解决方案。该系统首先生成并发布包含30万样本的标注数据集,专门针对HLS逻辑错误。HLSDebugger采用编码器-解码器结构,统一模型完成错误定位、类型预测与修正。实验表明,其在错误识别上显著优于GPT-4,修正性能更是提升超过3倍,推动了HLS代码自动化调试的进展。

原文摘要 · Abstract (English)

High-level synthesis (HLS) accelerates hardware design by enabling the automatic translation of high-level descriptions into efficient hardware implementations. However, debugging HLS code is a challenging and labor-intensive task, especially for novice circuit designers or software engineers without sufficient hardware domain knowledge. The recent emergence of Large Language Models (LLMs) is promising in automating the HLS debugging process. Despite the great potential, three key challenges persist when applying LLMs to HLS logic debugging: 1) High-quality circuit data for training LLMs is scarce, posing a significant challenge. 2) Debugging logic bugs in hardware is inherently more complex than identifying software bugs with existing golden test cases. 3) The absence of reliable test cases requires multi-tasking solutions, performing both bug identification and correction. complicates the multi-tasking required for effective HLS debugging. In this work, we propose a customized solution named HLSDebugger to address the challenges. HLSDebugger first generates and releases a large labeled dataset with 300K data samples, targeting HLS logic bugs. The HLSDebugger model adopts an encoder-decoder structure, performing bug location identification, bug type prediction, and bug correction with the same model. HLSDebugger significantly outperforms advanced LLMs like GPT-4 in bug identification and by more than 3x in bug correction. It makes a substantial advancement in the exploration of automated debugging of HLS code.

HLS大模型调试硬件

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。