Hardcaml:一种用于高效且稳健设计的OCaml硬件领域特定语言
Hardcaml: An OCaml Hardware Domain-Specific Language for Efficient and Robust Design
AI总结:
本文介绍Hardcaml,一种基于OCaml的嵌入式硬件设计DSL,通过类型系统和快速电路细化实现低层次控制与高效稳健设计,并在ZPrize竞赛FPGA赛道夺冠。
摘要:
本文介绍了Hardcaml,一种使用OCaml编程语言实现的嵌入式硬件设计领域特定语言(DSL)。与高层次综合(HLS)不同,Hardcaml允许对底层硬件进行低层次控制,以实现最大生产力,同时抽象掉了传统硬件描述语言(如Verilog或VHDL)中许多繁琐的方面。OCaml类型系统的丰富性结合Hardcaml快速的电路细化检查,通过自定义类型定义、类型安全的参数化模块以及细化时的位宽推断和验证等功能,降低了用户引入错误和错误连接的可能性。Hardcaml工具链强调通过仿真、测试和验证实现快速反馈。它包含一个原生OCaml周期精确仿真器和一个事件驱动仿真器。单元测试可以存在于源代码中,并包含表示仿真器输出的数字ASCII波形。Hardcaml还提供了SAT证明和形式化验证的工具。Hardcaml已在工业界得到验证,并已在Jane Street内部用于许多大型FPGA设计。作为案例研究,我们重点介绍了近期提交至2022年ZPrize密码学竞赛的Hardcaml设计的几个方面,该设计在FPGA赛道中荣获第一名。
英文摘要:
This paper introduces Hardcaml, an embedded hardware design domain specific language (DSL) implemented in the OCaml programming language. Unlike high level synthesis (HLS), Hardcaml allows for low level control of the underlying hardware for maximum productivity, while abstracting away many of the tedious aspects of traditional hardware definition languages (HDLs) such as Verilog or VHDL. The richness of OCaml's type system combined with Hardcaml's fast circuit elaboration checks reduces the chance of user-introduced bugs and erroneous connections with features like custom type defining, type-safe parameterized modules and elaboration-time bit-width inference and validation. Hardcaml tooling emphasizes fast feedback through simulation, testing, and verification. It includes both a native OCaml cycle-accurate and an event-driven simulator. Unit tests can live in the source code and include digital ASCII waveforms representing the simulator's output. Hardcaml also provides tools for SAT proving and formal verification. Hardcaml is industrially proven, and has been used at Jane Street internally for many large FPGA designs. As a case study we highlight several aspects of our recent Hardcaml submission to the 2022 ZPrize cryptography competition which won 1st place in the FPGA track.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。