PyHGL: A Python-based Hardware Generation Language Framework

09/09/2023
by   Jintao Sun, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
12/04/2020

Optimising Design Verification Using Machine Learning: An Open Source Solution

With the complexity of Integrated Circuits increasing, design verificati...
research
06/20/2020

fault: A Python Embedded Domain-Specific Language For Metaprogramming Portable Hardware Verification Components

While hardware generators have drastically improved design productivity,...
research
04/21/2020

Towards a Hardware DSL Ecosystem : RubyRTL and Friends

For several years, hardware design has been undergoing a surprising revi...
research
02/26/2021

Open-Source Verification with Chisel and Scala

Performance increase with general-purpose processors has come to a halt....
research
12/04/2017

Studying tidal effects in planetary systems with Posidonius. A N-body simulator written in Rust

Planetary systems with several planets in compact orbital configurations...
research
04/06/2023

Spade: An Expression-Based HDL With Pipelines

Spade is a new open source hardware description language (HDL) designed ...
research
06/01/2021

Reconciling interoperability with efficient Verification and Validation within open source simulation environments

A Cyber-Physical System (CPS) comprises physical as well as software sub...

Please sign up or login with your details

Forgot password? Click here to reset