A2H-MAS: An Algorithm-to-HLS Multi-Agent System for Automated and Reliable FPGA Implementation
Jie Lei, Ruofan Jia, J. Andrew Zhang, Hao Zhang
TL;DR
The paper addresses the challenge of translating MATLAB-based algorithm prototypes into FPGA-ready High-Level Synthesis (HLS) implementations under strict latency and resource constraints. It introduces A2H-MAS, a modular, hierarchical multi-agent system that uses standardized interfaces, execution-based validation, and dataflow-oriented algorithm decomposition, coupled with algorithm–hardware co-design to surpass single-agent LLM limitations. The approach is validated on representative wireless workloads (5G NR SSB detection and WLAN synchronization), showing functionally correct, resource-efficient, and latency-optimized hardware designs, with substantial gains demonstrated by ablation experiments (Adaption and Refinement stages). This work offers a robust, scalable workflow for end-to-end MATLAB-to-HLS-to-FPGA deployment, with potential applicability to broader domains such as vision and signal processing and opportunities for richer feedback and benchmarks.
Abstract
Bridging the gap between algorithm development and hardware realization remains a persistent challenge, particularly in latency- and resource-constrained domains such as wireless communication. While MATLAB provides a mature environment for algorithm prototyping, translating these models into efficient FPGA implementations via High-Level Synthesis (HLS) often requires expert tuning and lengthy iterations. Recent advances in large language models (LLMs) offer new opportunities for automating this process. However, existing approaches suffer from hallucinations, forgetting, limited domain expertise, and often overlook key performance metrics. To address these limitations, we present A2H-MAS, a modular and hierarchical multi-agent system. At the system level, A2H-MAS assigns clearly defined responsibilities to specialized agents and uses standardized interfaces and execution-based validation to ensure correctness and reproducibility. At the algorithmic level, it employs dataflow-oriented modular decomposition and algorithm-hardware co-design, recognizing that the choice of algorithm often has a larger impact on hardware efficiency than pragma-level optimization. Experiments on representative wireless communication algorithms show that A2H-MAS consistently produces functionally correct, resource-efficient, and latency-optimized HLS designs, demonstrating its effectiveness and robustness for complex hardware development workflows.
