arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2503.19447cs.ARcs.PL
收藏

Anvil:一种通用时序安全硬件描述语言

Anvil: A General-Purpose Timing-Safe Hardware Description Language

National University of Singapore(新加坡国立大学)

Jason Zhijingcheng Yu, Aditya Ranjan Jha, Umang Mathur, Trevor E. Carlson, Prateek Saxena

AI总结:

本文提出Anvil,一种通过新颖类型系统静态防止时序风险的硬件描述语言,在保证时序安全的同时不牺牲表达力,并支持模块安全组合,已实现并验证其实用性。

摘要:

使用硬件描述语言(HDL)表达硬件设计通常涉及使用无状态信号,这些信号的值根据其底层寄存器而变化。当这些底层寄存器中存储的值被修改,而其依赖信号预期在多个周期内保持恒定时,可能会出现意外行为。这种时序风险很常见,因为除了少数例外,现有HDL缺乏对在多个时钟周期内保持不变值的抽象,将此责任委托给硬件设计人员。设计人员必须仔细决定某个值是否应保持不变,有时甚至跨硬件模块。本文提出了Anvil,一种通过新颖类型系统静态防止时序风险的HDL。Anvil是我们所知的唯一一种保证时序安全(即无时序风险)而不牺牲周期级时序控制或动态时序行为表达能力的HDL。与许多抽象掉寄存器与信号差异的HLS语言不同,Anvil的类型系统完全暴露这些差异,同时捕获寄存器值修改与信号使用之间的时序关系以强制时序安全。这进而通过静态强制编码共享信号时序约束的时序契约,实现通信硬件模块的安全组合。此类时序契约可以参数化地指定在运行时可能变化的抽象时间点上,允许类型系统静态表达动态时序行为。我们已实现Anvil,并成功使用它来实现关键时序敏感模块,将其与开源SystemVerilog对应实现进行比较,以证明所生成硬件的实用性和表达能力。

英文摘要:

Expressing hardware designs using hardware description languages (HDLs) routinely involves using stateless signals whose values change according to their underlying registers. Unintended behaviours can arise when the stored values in these underlying registers are mutated while their dependent signals are expected to remain constant across multiple cycles. Such timing hazards are common because, with a few exceptions, existing HDLs lack abstractions for values that remain unchanged over multiple clock cycles, delegating this responsibility to hardware designers. Designers must then carefully decide whether a value should remain unchanged, sometimes even across hardware modules. This paper proposes Anvil, an HDL which statically prevents timing hazards with a novel type system. Anvil is the only HDL we know of that guarantees timing safety, i.e., absence of timing hazards, without sacrificing expressiveness for cycle-level timing control or dynamic timing behaviours. Unlike many HLS languages that abstract away the differences between registers and signals, Anvil's type system exposes them fully while capturing the timing relationships between register value mutations and signal usages to enforce timing safety. This, in turn, enables safe composition of communicating hardware modules by static enforcement of timing contracts that encode timing constraints on shared signals. Such timing contracts can be specified parametric on abstract time points that can vary during run-time, allowing the type system to statically express dynamic timing behaviour. We have implemented Anvil and successfully used it to implement key timing-sensitive modules, comparing them against open-source SystemVerilog counterparts to demonstrate the practicality and expressiveness of the generated hardware.

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

↑