arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2309.04859cs.AR
收藏

PyHGL:一种基于 Python 的硬件生成语言框架

PyHGL: A Python-based Hardware Generation Language Framework

Jintao Sun, Zeke Wang, Tao Lu, Wenzhi Chen

AI总结:

本文提出开源 Python 硬件生成框架 PyHGL,通过提供动态类型等特性及集成事件驱动仿真器,解决现有工具对异步电路支持有限等问题,代码密度较传统 RTL 提升至 6.1 倍,仿真器实现 2.9 倍加速。

摘要:

硬件生成语言(HGLs)通过创建参数化模块和测试台来提高硬件设计生产力。遗憾的是,现有工具并未被广泛采用,原因在于其存在若干缺陷,包括对异步电路和未知状态的支持有限,缺乏简洁高效的语言特性,以及仿真与验证功能的集成度低。本文介绍了 PyHGL,这是一个开源的 Python 框架,旨在为硬件生成、仿真和验证提供一个简单且统一的环境。PyHGL 语言是 Python 的语法超集,它通过提供动态类型、向量化操作和自动端口推导等独特特性,大幅减少了代码行数(LOC)并提升了生产力。此外,PyHGL 集成了一个事件驱动仿真器,该仿真器使用三态逻辑来仿真数字电路的异步行为。我们还提出了一种算法,消除了二进制激励下未知状态传播的计算和传输开销。结果表明,PyHGL 代码的密度比传统 RTL 高达 6.1 倍,并能生成高质量的可综合 RTL 代码。此外,优化后的仿真器实现了 2.9 倍的加速,并匹配了常用开源逻辑仿真器的性能。

英文摘要:

Hardware generation languages (HGLs) increase hardware design productivity by creating parameterized modules and test benches. Unfortunately, existing tools are not widely adopted due to several demerits, including limited support for asynchronous circuits and unknown states, lack of concise and efficient language features, and low integration of simulation and verification functions. This paper introduces PyHGL, an open-source Python framework that aims to provide a simple and unified environment for hardware generation, simulation, and verification. PyHGL language is a syntactical superset of Python, which greatly reduces the lines of code (LOC) and improves productivity by providing unique features such as dynamic typing, vectorized operations, and automatic port deduction. In addition, PyHGL integrates an event-driven simulator that simulates the asynchronous behaviors of digital circuits using three-state logic. We also propose an algorithm that eliminates the calculation and transmission overhead of unknown state propagation for binary stimuli. The results suggest that PyHGL code is up to 6.1x denser than traditional RTL and generates high-quality synthesizable RTL code. Moreover, the optimized simulator achieves 2.9x speed up and matches the performance of a commonly used open-source logic simulator.

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

↑