arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2504.07595cs.AR
收藏

使用 SDF-AP、Template Haskell、QuasiQuotes 和 GADTs 从层次化输入规范生成电路的高层次综合

High-Level Synthesis using SDF-AP, Template Haskell, QuasiQuotes, and GADTs to Generate Circuits from Hierarchical Input Specification

Hendrik Folmer

AI总结:

本文提出一种基于函数式编程的 FPGA 高层次综合方法,通过层次化模式、GADTs 参数化缓冲区和黄金模型,实现自动硬件生成并优于 Vitis HLS。

摘要:

FPGA 提供了高度并行和可定制的硬件解决方案,但传统上使用 VHDL 和 Verilog 等低层次硬件描述语言(HDL)进行编程。这些语言的抽象层次较低,要求工程师手动管理控制与调度。高层次综合(HLS)工具试图通过将 C/C++ 代码翻译成硬件描述来提升抽象层次,但由于依赖命令式范式,指针别名和顺序执行模型导致在推导并行性方面面临挑战。函数式编程因其固有的纯度、不可变性和并行性,为 FPGA 设计提供了更自然的抽象。现有的函数式硬件描述工具(如 Clash)能够实现高层次电路描述,但缺乏自动调度和控制机制。Folmer 的先前工作引入了一个将 SDF-AP 图集成到 Haskell 中用于自动硬件生成的框架,但该框架缺乏层次化和可复用性。本文通过引入层次化模式规范来扩展该框架,实现结构化组合和可扩展并行性。主要贡献包括:(1)自动硬件生成,其中数据路径和控制路径均从具有层次化模式的函数式规范中推导得出;(2)使用 GADTs 实现参数化缓冲区,消除了手动定义缓冲区的需要,并促进了组件复用;(3)提供一个参考“黄金模型”,可在集成环境中进行仿真以用于验证。本文的核心关注点是方法论。但我们也针对 Vitis HLS 评估了我们的方法,比较了表示法和生成的硬件架构。实验结果表明,我们的方法在资源利用和调度方面提供了更高的透明度,在调度和可预测性方面通常优于 Vitis。

英文摘要:

FPGAs provide highly parallel and customizable hardware solutions but are traditionally programmed using low-level Hardware Description Languages (HDLs) like VHDL and Verilog. These languages have a low level of abstraction and require engineers to manage control and scheduling manually. High-Level Synthesis (HLS) tools attempt to lift this level of abstraction by translating C/C++ code into hardware descriptions, but their reliance on imperative paradigms leads to challenges in deriving parallelism due to pointer aliasing and sequential execution models. Functional programming, with its inherent purity, immutability, and parallelism, presents a more natural abstraction for FPGA design. Existing functional hardware description tools such as Clash enable high-level circuit descriptions but lack automated scheduling and control mechanisms. Prior work by Folmer introduced a framework integrating SDF-AP graphs into Haskell for automatic hardware generation, but it lacked hierarchy and reusability. This paper extends that framework by introducing hierarchical pattern specification, enabling structured composition and scalable parallelism. Key contributions include: (1) automatic hardware generation, where both data and control paths are derived from functional specifications with hierarchical patterns, (2) parameterized buffers using GADTs, eliminating the need for manual buffer definitions and facilitating component reuse, and (3) provision of a reference "golden model" that can be simulated in the integrated environment for validation. The core focus of this paper is on methodology. But we also evaluate our approach against Vitis HLS, comparing both notation and resulting hardware architectures. Experimental results demonstrate that our method provides greater transparency in resource utilization and scheduling, often outperforming Vitis in both scheduling and predictability.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑