arXiv:2608.23630cs.SEAug 2026

Manuscript Offprint

arXiv:2608.23630

FPGAgent: An LLM-Assisted Framework for Autonomous HLS Code Generation and Verification in FPGA Environments

Tianyu Wang, Wenjie Wang, Jianguo Yao, Haibing Guan, Xijun Li

FPGA Agent: An LLM-Assisted Framework for Autonomous HLS Code Generation and Verification in FPGA Environments

Tianyu Wang

Shanghai Key Laboratory of Scalable

Computing and Systems

School of Computer Science,

Shanghai Jiao Tong University

Shanghai, China

Wenjie Wang

Shanghai Key Laboratory of Scalable

Computing and Systems

School of Computer Science,

Shanghai Jiao Tong University

Shanghai, China

Jianguo Yao

Shanghai Key Laboratory of Scalable

Computing and Systems

School of Computer Science,

Shanghai Jiao Tong University

Shanghai, China

Haibing Guan

Shanghai Key Laboratory of Scalable

Computing and Systems

School of Computer Science,

Shanghai Jiao Tong University

Shanghai, China

Xijun Li ∗^{*}

Shanghai Key Laboratory of Scalable

Computing and Systems

School of Computer Science,

Shanghai Jiao Tong University

Shanghai, China

lixijun@sjtu.edu.cn

Abstract

Large language models (LLMs) have shown substantial promise for high-level synthesis (HLS) code generation. However, most existing approaches focus primarily on validation at the simulation or synthesis stage. Due to inherent timing and place-and-route constraints in hardware environments, HLS code that passes simulation and synthesis does not necessarily translate into deployable, runnable designs on real FPGA platforms. In addition, the lack of publicly available benchmarks has led many methods to be evaluated only on small, self-curated test suites, making their effectiveness difficult to validate. To address these issues, we propose FPGA agent, a multi-agent framework tailored to real FPGA environments, which targets autonomous HLS coding with end-to-end executability validation. To the best of our knowledge, FPGA agent is the first task-specification-to-executable HLS generation framework that has been experimentally validated on a well-established benchmark. Given a natural-language task specification, FPGA agent first injects HLS-specific knowledge into the model, and employs evolutionary search to iteratively derive HLS kernel implementations with reliable performance. It then generates a C++ validation program to verify the functional correctness of the produced kernel, analyzes potential functional defects, and guides the model to apply targeted repairs. Finally, it synthesizes host code to enable compilation and board-level execution on FPGA hardware. We comprehensively evaluate FPGA agent using five well-established models on HLS-Eval, a benchmark comprising 78 tasks across multiple domains, and verify board-level executability on real FPGA platform. Compared with existing baselines, FPGA agent improves synthesizable rate by 16.9% on average, executability by 26.7%, and functional correctness by 30.6%. These results indicate that FPGA agent substantially enhances the practical usability.

of LLM-based HLS generation, demonstrating the practical utility of end-to-end LLM-assisted HLS generation.

References (12)