为大模型生成的硬件代码提供全流程评估框架
Bench4HLS: End-to-End Evaluation of LLMs in High-Level Synthesis Code Generation
- 构建170个从开源项目提取的硬件设计案例库
- 自动验证编译成功率、功能正确性和性能指标
- 支持多工具链插件式分析,适合芯片设计研究者
近两年,大语言模型在代码生成方面展现出强大能力,包括寄存器传输级(RTL)硬件设计。尽管其在高层次综合(HLS)中的应用仍相对不成熟,但过去半年中,HLS相关研究与RTL研究的比例已从1:10上升至2:10,显示出利用大模型进行高层设计输入并依赖下游综合优化的日益增长的兴趣。这一趋势凸显了建立专门针对大模型驱动的HLS评估基准的迫切需求。为此,我们提出Bench4HLS,用于评估大模型生成的HLS设计。Bench4HLS包含170个手工撰写并验证的案例,涵盖小型核函数到复杂加速器,数据源自广泛使用的公共仓库。该框架支持对编译成功率、通过仿真验证的功能正确性以及综合可行性/优化性的全自动评估。关键在于,Bench4HLS集成了可插拔的API,支持在多种HLS工具链和架构上进行功耗、性能、面积(PPA)分析,本文以Xilinx Vitis HLS为例,并在Catapult HLS上完成验证。通过提供结构化、可扩展且即插即用的测试平台,Bench4HLS确立了大模型在HLS工作流中基准评估的基础方法。
原文摘要 · Abstract (English)
In last two years, large language models (LLMs) have shown strong capabilities in code generation, including hardware design at register-transfer level (RTL). While their use in high-level synthesis (HLS) remains comparatively less mature, the ratio of HLS- to RTL-focused studies has shifted from 1:10 to 2:10 in the past six months, indicating growing interest in leveraging LLMs for high-level design entry while relying on downstream synthesis for optimization. This growing trend highlights the need for a comprehensive benchmarking and evaluation framework dedicated to LLM-based HLS. To address this, We present Bench4HLS for evaluating LLM-generated HLS designs. Bench4HLS comprises 170 manually drafted and validated case studies, spanning small kernels to complex accelerators, curated from widely used public repositories. The framework supports fully automated assessment of compilation success, functional correctness via simulation, and synthesis feasibility/optimization. Crucially, Bench4HLS integrates a pluggable API for power, performance, and area (PPA) analysis across various HLS toolchains and architectures, demonstrated here with Xilinx Vitis HLS and validated on Catapult HLS. By providing a structured, extensible, and plug-and-play testbed, Bench4HLS establishes a foundational methodology for benchmarking LLMs in HLS workflows.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。