Skip to main content

hdlConvertor

CircleCI Win Build status PyPI version Python version Gitter Coverage Status(generated code)

This library is a System Verilog and VHDL parser, preprocessor and code generator for Python/C++. It contains:

  • ANTLR4 generated VHDL/(System) Verilog parser with full language support.
  • Convertors from raw VHDL/SV AST to universal HDL AST (hdlConvertor::hdlAst and it's python equivalent.).
  • Convertors from this HDL AST to SV/VHDL/JSON and other formats.
  • Compiler focused utils for manipulation with HDL AST.
    • HdlAstVisitor, id resolution, sensitivity detection, vhdl <-> verilog type conversion, ...

overview

Supported languages:

Installation

Linux: Installing dependencies (Ubuntu 20.10)

# we recommend to use gcc>=9, Visual Studio 2017 or equivalent
sudo apt install build-essential uuid-dev cmake default-jre python3 python3-dev python3-pip libantlr4-runtime-dev antlr4 ninja-build

Installing this library

# note this may be older version than you see in repo
sudo pip3 install hdlConvertor

# or download repository and run
sudo pip3 install --upgrade --force-reinstall --no-cache-dir git+https://github.com/Nic30/hdlConvertorAst.git
sudo pip3 install -r requirements.txt
sudo python3 setup.py install

# if you are using version from git rather uninstall
# old library first if required
# sudo pip3 uninstall hdlConvertor

Installer also supports other options which may be usefull

python setup.py install --prefix /tmp/python_install/ --build-type Debug -- -DANTLR_JAR_LOCATION=/antlr-4.7.1-complete.jar -- VERBOSE=1

You can also install only C++ library/generate .deb package (nothing specific, just normal cmake-based library)

mkdir build && cd build
cmake .. && cmake . --build
cpack # to generate .deb package

Windows:

Take a look at appveyor.yml and doc/windows_installation_and_build.rst. It is required to download antlr4 first and have visual studio or other c++ compiler installed.

Usage

The HDL AST (the parsed code) is represented by objects from hdlConvertor.hdlAst. Parsing and code modification is straightforward, as you can see in following example Binder

Similar projects:

(Tell us If you know about some other project!)

  • circt - C++, LLVM based infrastructutre for SV/VHDL/FIRRTL compilation and simulation
  • cl-vhdl - lisp, Parser of VHDL into lisp-expressions
  • HDL_ANTLR4 - C# projects that use ANTLR4 library to analyse VHDL and Verilog code
  • hdlparse - vhdl/verilog parser in python
  • ieee1800_2017 - Java, SystemVerilog preprocessor
  • istyle-verilog-formatter - c++, Verilog formatter
  • Pyverilog - python verilog toolkit
  • pyvsc - C++, library for Verification Stimulus and Coverage description
  • pyVHDLParser - python vhdl parser with 2008 support
  • RgGen - CSR (Configuration and Status Registers) generator
  • rust_hdl - rust vhdl 2008 parser
  • slang - Parser and compiler library for SystemVerilog.
  • sv-parser - Rust, SystemVerilog parser library fully complient with IEEE 1800-2017
  • systemc-clang - SystemC Parser using the Clang Front-end
  • v2sc - vhdl to systemc
  • veelox - Java+ANTLR, An experiment in SystemVerilog Preprocessing
  • verible -C++, SystemVerilog parser, style-linter, and formatter
  • verilog-parser - A Flex/Bison Parser for the IEEE 1364-2001 Verilog Standard.
  • vbpp - C, Verilog PreProcessor
  • tree-sitter-verilog - JS, Verilog grammar for tree-sitter
  • Verilog-Perl
  • vpp.pl - verilog preprocessor with integrated Perl
  • sv2v- Haskell, SystemVerilog to Verilog
  • Surelog - C++, System Verilog 2017 Pre-processor and parser
  • verible - C++, System Verilog 2017 parser
  • UHDM - rust, universal hardware data model

Metadata

Release files for hdlConvertor-binary 2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hdlConvertor-binary 2.3
File Size Uploaded
hdlConvertor-binary-2.3.tar.gz 161.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for hdlConvertor-binary 2.3
File
hdlConvertor_binary-2.3-cp312-cp312-manylinux_2_31_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.31+ x86-64 Details
hdlConvertor_binary-2.3-cp311-cp311-manylinux_2_31_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.31+ x86-64 Details
hdlConvertor_binary-2.3-cp310-cp310-manylinux_2_31_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.31+ x86-64 Details
hdlConvertor_binary-2.3-cp39-cp39-manylinux_2_31_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.31+ x86-64 Details
hdlConvertor_binary-2.3-cp38-cp38-manylinux_2_31_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.31+ x86-64 Details

Total release size: 9.5 MB

Release files / hdlConvertor-binary-2.3.tar.gz

Download URL hdlConvertor-binary-2.3.tar.gz
Size 161.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1f6131f76dbf1bc18d5847fe96b8033a5bb14219ebb2eb50b9bec1f3c62df97b
BLAKE2b-256 checksum
How to use checksums
c98c9623469a89adda7772e456ce6b0d8c52ecc381e5e05408925b54e0619ad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hdlConvertor_binary-2.3-cp312-cp312-manylinux_2_31_x86_64.whl

Download URL hdlConvertor_binary-2.3-cp312-cp312-manylinux_2_31_x86_64.whl
Size 1.9 MB
Tags CPython 3.12 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
d68d2d2f314c366fe5d47dac55447945a7da3ef9e8873ba1b13dfd107497d9e6
BLAKE2b-256 checksum
How to use checksums
34795c68506fb17dda2e471268be50a22d02786b397aa4ec0d0d57c79466ab31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hdlConvertor_binary-2.3-cp311-cp311-manylinux_2_31_x86_64.whl

Download URL hdlConvertor_binary-2.3-cp311-cp311-manylinux_2_31_x86_64.whl
Size 1.9 MB
Tags CPython 3.11 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
e80870720fdc831a44342f8878f0d9d8b991b782ac9ea1020ca074044b0f6a33
BLAKE2b-256 checksum
How to use checksums
63b9e513450a091ddd11a222c0584e6c469e93254c93717494661aba6ed00b9e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hdlConvertor_binary-2.3-cp310-cp310-manylinux_2_31_x86_64.whl

Download URL hdlConvertor_binary-2.3-cp310-cp310-manylinux_2_31_x86_64.whl
Size 1.9 MB
Tags CPython 3.10 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
d3c66d2f26bde2a6d92bc209c7e42b16168fc25493c86d61d58f050691845def
BLAKE2b-256 checksum
How to use checksums
8ae26fcf1448053405ada691933ed814a8b8a151ee9badcf9fa7f6cad78188de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hdlConvertor_binary-2.3-cp39-cp39-manylinux_2_31_x86_64.whl

Download URL hdlConvertor_binary-2.3-cp39-cp39-manylinux_2_31_x86_64.whl
Size 1.9 MB
Tags CPython 3.9 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
bb3f66aeefe2735d64806e292129a9376399832b968b2f1186a90da61c08cd71
BLAKE2b-256 checksum
How to use checksums
f5fb74390d146b63a73dc50f6ac67d99a38b67d364eb2e00ef9858eca48a1579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / hdlConvertor_binary-2.3-cp38-cp38-manylinux_2_31_x86_64.whl

Download URL hdlConvertor_binary-2.3-cp38-cp38-manylinux_2_31_x86_64.whl
Size 1.9 MB
Tags CPython 3.8 Linux glibc 2.31+ x86-64
SHA-256 checksum
How to use checksums
3dd437bc872053ea7d704b86a55623ce7a0bad40e123164962a2bc8929e64363
BLAKE2b-256 checksum
How to use checksums
a6b039cf0e20384ef8f4bbc19e23badb314166e7dff924a1841d2371b41e6b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

2.3 This release

6 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page