paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Generating circuits with generators

用生成器生成电路
ICFP 6(ICFP)2022匹配度 1/10 · 论文属于函数式硬件描述语言与编译器,关注用生成器抽象表示时钟级时序并编译到 Mealy 机,与用户的 PL→AI/AI→PL、静态分析、浮点程序分析、贝叶斯程序分析等核心方向无直接关联。引用 3 inbox
Marek Materzok
crossref: 2026-09-10

AI 速览

一句话:提出 YieldFSM 硬件描述语言,用生成器抽象表示时钟级时序,并编译为 Mealy 机,在 RTL 与 HLS 之间提供折中。

数字硬件设计主要采用 RTL 与 HLS 两类方法:RTL 需逐一指定每个组件,控制力强但细节繁琐;HLS 抽象掉硬件细节,却因同时抽象掉时钟而无法覆盖一类设计问题。本文提出硬件描述语言 YieldFSM,用生成器抽象表示电路中的时钟级时序,在 RTL 与 HLS 之间提供折中:抽象层次高于 RTL,又因显式保留时钟级时序而适用于传统 RTL 场景。其编译器借助函数式编程社区的方法,包括 CPS 变换与去函数化,将 YieldFSM 程序转换为 Mealy 机,并用 Template Haskell 与 Clash 实现。作者表明该方法可写出简短且概念简单的硬件描述。

问题
RTL 需指定每个组件而繁琐,HLS 抽象掉时钟,无法处理需要显式时钟级时序的一类硬件设计问题。
方法
提出 YieldFSM HDL,以生成器抽象表示时钟级时序,并用 CPS 变换、去函数化等函数式方法将程序编译为 Mealy 机,基于 Template Haskell 与 Clash 实现。
评估
通过实现与展示说明该方法能产生简短且概念简单的硬件描述;摘要未给出量化基准或对比实验。
原文摘要(Abstract)

The most widely used languages and methods used for designing digital hardware fall into two rough categories. One of them, register transfer level (RTL), requires specifying each and every component in the designed circuit. This gives the designer full control, but burdens the designer with many trivial details. The other, the high-level synthesis (HLS) method, allows the designer to abstract the details of hardware away and focus on the problem being solved. This method however cannot be used for a class of hardware design problems because the circuit's clock is also abstracted away. We present YieldFSM, a hardware description language that uses the generator abstraction to represent clock-level timing in a digital circuit. It represents a middle ground between the RTL and HLS approaches: the abstraction level is higher than in RTL, but thanks to explicit information about clock-level timing, it can be used in applications where RTL is traditionally used. We also present the YieldFSM compiler, which uses methods developed by the functional programming community -- including continuation-passsing style translation and defunctionalization -- to translate YieldFSM programs to Mealy machines. It is implemented using Template Haskell and the Clash functional hardware description language. We show that this approach leads to short and conceptually simple hardware descriptions.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@article{paperbot1484,
  title = {Generating circuits with generators},
  author = {Marek Materzok},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {6},
  number = {ICFP},
  year = {2022},
  doi = {10.1145/3549821}
}