Skip to main content

A library of AST nodes for HDL languages (Verilog, VHDL, ...) and transpiler/compiler utilities

Project description

hdlConvertorAst

CircleCI PyPI version Python version Coverage Status Documentation Status

This library contains universal HDL AST nodes (Hardware Description Language Abstract Syntax Tree = objects for representation of code constructs) for SystemVerilog, VHDL and others. This AST can be generated from SV/VHDL code by hdlConvertor and it can also be converted to VHDL/SV/JSON/SystemC/... and other formats using hdlConvertorAst.to module. Note that the conversion of AST of different languages requires an extra care. E. g. the VHDL AST and SV AST will have a different type names and thus the direct transpilation using hdlConvertorAst.to module will not yield working code. If source and target language differs the translation is required. For this translations and post processing you can use hdlConvertorAst.translate module

Doc shared with hdlConvertor.

Intended as a support library for

  • code generators
  • code parsers
  • compilers/transpilers

Supported languages

  • IEEE 1076-2008 (VHDL 2008) and all previous standard, (currently without tool_directive and PSL)
  • IEEE 1800-2017 (SystemVerilog 2017) and all previous standards.
  • SystemC 2.3.3
  • HdlConvertor JSON
  • hwtSimApi basic_rtl_sim_model (python interpreted RTL simulator)
  • hwt (hardware construction framework (HCL) with algorithmic synthesis (HLS))

List of selected unique features of this library

  • single straightforward universal AST for all languages, wide spectrum of import/export languages
  • automatic parenthesis resolution in expressions based on operator priority/associativity
  • clever white-spaces, constant and expression formating
  • comments preserved as doc of objects

Installation

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

# or download repository and run
sudo python3 setup.py install

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

Similar projects

  • fasm - Python, FPGA Assembly (FASM) Parser and Generator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hdlConvertorAst-1.2.tar.gz (64.1 kB view details)

Uploaded Source

Built Distribution

hdlConvertorAst-1.2-py3-none-any.whl (90.5 kB view details)

Uploaded Python 3

File details

Details for the file hdlConvertorAst-1.2.tar.gz.

File metadata

  • Download URL: hdlConvertorAst-1.2.tar.gz
  • Upload date:
  • Size: 64.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.1

File hashes

Hashes for hdlConvertorAst-1.2.tar.gz
Algorithm Hash digest
SHA256 7dcf79871f529c891ead74f47a6ad4ddf1d6f058ea1a4faa7644eee2cf4ec0ec
MD5 9e12efab928b40155984ccae1e18d1f6
BLAKE2b-256 4f4dee9d652b60b70c33329a226ec3a2a23f18e321eb260397a649becc1b54ce

See more details on using hashes here.

File details

Details for the file hdlConvertorAst-1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for hdlConvertorAst-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0becf07c665b399bfdde0cc10559dc061e1278a817ec28262d3512281f58b4b3
MD5 9f75f5a0e2596113c7183a4475b57bc8
BLAKE2b-256 6250b02f8cb20d17868382f07a4b18fd1280f6a06fd38f338ad7c8fcee38bd52

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page