TimelyHLS:基于 LLM 的时序感知且面向特定架构的 FPGA HLS 优化
TimelyHLS: LLM-Based Timing-Aware and Architecture-Specific FPGA HLS Optimization
AI总结:
提出 TimelyHLS 框架,结合 LLM、RAG 与 FPGA 架构知识库,依据综合和仿真反馈迭代优化 HLS pragma,在 10 种架构上显著减少人工调优并改善时序、延迟与面积。
摘要:
由于架构约束、资源利用之间的复杂相互作用,以及缺乏面向特定平台 pragma 的自动化支持,在面向 FPGA 的高层次综合(HLS)中实现时序收敛和针对设计的优化仍然是一项重大挑战。在本文中,我们提出 TimelyHLS,这是一种将大型语言模型(LLM)与检索增强生成(RAG)相结合的新颖框架,用于自动生成并迭代改进针对 FPGA 特定时序和性能要求而优化的 HLS 代码。TimelyHLS 由一个结构化架构知识库驱动,该库包含 FPGA 特定特性、综合指令和 pragma 模板。给定一个内核,TimelyHLS 会生成同时标注有时序关键型和设计特定型 pragma 的 HLS 代码。随后使用商业工具链评估综合后的 RTL,并通过自定义测试平台对照参考输出验证仿真正确性。当存在功能差异时,TimelyHLS 会迭代地将综合日志和性能报告纳入 LLM 引擎以进行改进。跨 10 种 FPGA 架构和多种基准测试的实验结果表明,TimelyHLS 将手动调优需求减少了多达 70%,同时实现了高达 4 倍的延迟加速(例如,矩阵乘法为 3.85 倍,Bitonic Sort 为 3.7 倍),并在某些情况下节省了超过 50% 的面积(例如,Viterbi 中 FF 减少 57%)。TimelyHLS 在各平台上始终实现时序收敛和功能正确性,凸显了 LLM 驱动、架构感知的综合在自动化 FPGA 设计中的有效性。
英文摘要:
Achieving timing closure and design-specific optimizations in FPGA-targeted High-Level Synthesis (HLS) remains a significant challenge due to the complex interaction between architectural constraints, resource utilization, and the absence of automated support for platform-specific pragmas. In this work, we propose TimelyHLS, a novel framework integrating Large Language Models (LLMs) with Retrieval-Augmented Generation (RAG) to automatically generate and iteratively refine HLS code optimized for FPGA-specific timing and performance requirements. TimelyHLS is driven by a structured architectural knowledge base containing FPGA-specific features, synthesis directives, and pragma templates. Given a kernel, TimelyHLS generates HLS code annotated with both timing-critical and design-specific pragmas. The synthesized RTL is then evaluated using commercial toolchains, and simulation correctness is verified against reference outputs via custom testbenches. TimelyHLS iteratively incorporates synthesis logs and performance reports into the LLM engine for refinement in the presence of functional discrepancies. Experimental results across 10 FPGA architectures and diverse benchmarks show that TimelyHLS reduces the need for manual tuning by up to 70%, while achieving up to 4x latency speedup (e.g., 3.85x for Matrix Multiplication, 3.7x for Bitonic Sort) and over 50% area savings in certain cases (e.g., 57% FF reduction in Viterbi). TimelyHLS consistently achieves timing closure and functional correctness across platforms, highlighting the effectiveness of LLM-driven, architecture-aware synthesis in automating FPGA design.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。