{"id":17431991,"url":"https://github.com/nic30/hdlconvertor","last_synced_at":"2025-05-15T07:06:19.584Z","repository":{"id":43660539,"uuid":"62142405","full_name":"Nic30/hdlConvertor","owner":"Nic30","description":"Fast Verilog/VHDL parser preprocessor and code generator for C++/Python based on ANTLR4","archived":false,"fork":false,"pushed_at":"2025-03-08T14:21:38.000Z","size":15107,"stargazers_count":292,"open_issues_count":37,"forks_count":72,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-15T07:06:13.454Z","etag":null,"topics":["antrl4","fpga","parser","python","systemverilog","systemverilog-parser","verilog","verilog-parser","vhdl","vhdl-parser"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nic30.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-06-28T13:19:49.000Z","updated_at":"2025-05-14T09:50:17.000Z","dependencies_parsed_at":"2023-02-09T15:45:36.928Z","dependency_job_id":"9a8b34c2-9e2e-4a24-9c3c-417e9b2d9703","html_url":"https://github.com/Nic30/hdlConvertor","commit_stats":{"total_commits":1601,"total_committers":26,"mean_commits":61.57692307692308,"dds":"0.14553404122423486","last_synced_commit":"a04904a506d85ceb011f02a28f2b1b791ab37e56"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nic30%2FhdlConvertor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nic30%2FhdlConvertor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nic30%2FhdlConvertor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nic30%2FhdlConvertor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nic30","download_url":"https://codeload.github.com/Nic30/hdlConvertor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292042,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antrl4","fpga","parser","python","systemverilog","systemverilog-parser","verilog","verilog-parser","vhdl","vhdl-parser"],"created_at":"2024-10-17T08:09:39.298Z","updated_at":"2025-05-15T07:06:14.575Z","avatar_url":"https://github.com/Nic30.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hdlConvertor\n[![CircleCI](https://circleci.com/gh/Nic30/hdlConvertor.svg?style=svg)](https://circleci.com/gh/Nic30/hdlConvertor)\n[![Win Build status](https://ci.appveyor.com/api/projects/status/e3cvi3ig5y4vni7e?svg=true)](https://ci.appveyor.com/project/nic30/hdlconvertor)\n[![PyPI version](https://badge.fury.io/py/hdlConvertor.svg)](http://badge.fury.io/py/hdlConvertor)\n[![Python version](https://img.shields.io/pypi/pyversions/hdlConvertor.svg)](https://img.shields.io/pypi/pyversions/hdlConvertor.svg)\n[![Gitter](https://badges.gitter.im/hdlConvertor/community.svg)](https://gitter.im/hdlConvertor/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Coverage Status](https://coveralls.io/repos/github/Nic30/hdlConvertor/badge.svg?branch=master)](https://coveralls.io/github/Nic30/hdlConvertor?branch=master)(generated code)\n\nThis library is a System Verilog and VHDL parser, preprocessor and code generator for Python/C++.\nIt contains:\n\n   * ANTLR4 generated VHDL/(System) Verilog parser with full language support.\n   * Convertors from raw VHDL/SV AST to universal HDL AST ([hdlConvertor::hdlAst](https://github.com/Nic30/hdlConvertor/tree/master/include/hdlConvertor/hdlAst) and it's [python equivalent](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/hdlAst).).\n   * Convertors from this HDL AST [to SV/VHDL/JSON](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/to) and other formats.\n   * Compiler focused [utils](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/translate) for manipulation with HDL AST.\n       * HdlAstVisitor, id resolution, sensitivity detection, vhdl \u003c-\u003e verilog type conversion, ...\n\n![overview](https://raw.githubusercontent.com/Nic30/hdlConvertor/master/doc/hdlConvertor_overview.png)\n\n\n### Supported languages:\n* [IEEE 1076-2008 (VHDL 2008)](https://ieeexplore.ieee.org/document/4772740) and all previous standard, (currently without `tool_directive` and `PSL`)\n* [IEEE 1076-2019] WIP\n* [IEEE 1800-2017 (SystemVerilog 2017)](https://ieeexplore.ieee.org/document/8299595) and all previous standards.\n\n\n## Installation\n\nLinux:\nInstalling dependencies (Ubuntu 20.10)\n```\n# we recommend to use gcc\u003e=9, Visual Studio 2017 or equivalent\nsudo apt install build-essential uuid-dev cmake default-jre python3 python3-dev python3-pip libantlr4-runtime-dev antlr4 ninja-build\n```\n\nInstalling this library\n```\n# note this may be older version than you see in repo\nsudo pip3 install hdlConvertor\n\n# or download repository and run\nsudo pip3 install --upgrade --force-reinstall --no-cache-dir git+https://github.com/Nic30/hdlConvertorAst.git\nsudo pip3 install -r requirements.txt\nsudo python3 setup.py install\n\n# if you are using version from git rather uninstall\n# old library first if required\n# sudo pip3 uninstall hdlConvertor\n```\n\nInstaller also supports other options which may be usefull\n```\npython setup.py install --prefix /tmp/python_install/ --build-type Debug -- -DANTLR_JAR_LOCATION=/antlr-4.7.1-complete.jar -- VERBOSE=1\n```\n\nYou can also install only C++ library/generate .deb package (nothing specific, just normal cmake-based library)\n```\nmkdir build \u0026\u0026 cd build\ncmake .. \u0026\u0026 cmake . --build\ncpack # to generate .deb package\n```\n\nWindows:\n\nTake a look at appveyor.yml and [doc/windows_installation_and_build.rst](doc/windows_installation_and_build.rst). It is required to download antlr4 first and have visual studio or other c++ compiler installed.\n\n\n## Usage\n\nThe 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](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Nic30/hdlConvertor/master?filepath=notebooks%2F01_parse_and_dump.ipynb)\n\n\n\n### Similar projects:\n(Tell us If you know about some other project!)\n\n* [circt](https://github.com/llvm/circt) - C++, LLVM based infrastructutre for SV/VHDL/FIRRTL compilation and simulation\n* [cl-vhdl](https://github.com/mabragor/cl-vhdl) - lisp, Parser of VHDL into lisp-expressions\n* [HDL_ANTLR4](https://github.com/denisgav/HDL_ANTLR4) - C# projects that use ANTLR4 library to analyse VHDL and Verilog code\n* [hdlparse](https://github.com/kevinpt/hdlparse/) - vhdl/verilog parser in python\n* [ieee1800_2017](https://github.com/veriktig/ieee1800_2017) - Java, SystemVerilog preprocessor\n* [istyle-verilog-formatter](https://github.com/thomasrussellmurphy/istyle-verilog-formatter) - c++, Verilog formatter\n* [Pyverilog](https://github.com/PyHDI/Pyverilog) - python verilog toolkit\n* [pyvsc](https://github.com/fvutils/pyvsc) - C++, library for Verification Stimulus and Coverage description\n* [pyVHDLParser](https://github.com/Paebbels/pyVHDLParser) - python vhdl parser with 2008 support\n* [RgGen](https://github.com/rggen/rggen) - CSR (Configuration and Status Registers) generator\n* [rust_hdl](https://github.com/kraigher/rust_hdl) - rust vhdl 2008 parser\n* [slang](https://github.com/MikePopoloski/slang) - Parser and compiler library for SystemVerilog.\n* [sv-parser](https://github.com/dalance/sv-parser) - Rust, SystemVerilog parser library fully complient with IEEE 1800-2017\n* [sv2chisel](https://github.com/ovh/sv2chisel) - Scala, SystemVerilog to [Chisel](https://github.com/chipsalliance/chisel3) translator\n* [systemc-clang](https://github.com/anikau31/systemc-clang) - SystemC Parser using the Clang Front-end\n* [v2sc](https://github.com/denisgav/v2sc) - vhdl to systemc\n* [veelox](https://github.com/martinda/veelox) - Java+ANTLR, An experiment in SystemVerilog Preprocessing\n* [verible](https://github.com/chiplicity/verible) -C++, SystemVerilog parser, style-linter, and formatter\n* [verilog-parser](https://github.com/ben-marshall/verilog-parser) - A Flex/Bison Parser for the IEEE 1364-2001 Verilog Standard.\n* [vbpp](https://github.com/balanx/vbpp) - C, Verilog PreProcessor\n* [tree-sitter-verilog](https://github.com/tree-sitter/tree-sitter-verilog) - JS,  Verilog grammar for tree-sitter\n* [Verilog-Perl](https://metacpan.org/pod/Verilog-Perl)\n* [vpp.pl](https://www.beyond-circuits.com/wordpress/vpp-pl-man-page/) - verilog preprocessor with integrated Perl\n* [sv2v](https://github.com/zachjs/sv2v)- Haskell, SystemVerilog to Verilog\n* [Surelog](https://github.com/alainmarcel/Surelog) - C++, System Verilog 2017 Pre-processor and parser\n* [UHDM](https://github.com/alainmarcel/UHDM) - rust, universal hardware data model\n* [HDLParserSharp](https://github.com/Aperture-Electronic/HDLParserSharp) - C#, VHDL/SV -\u003e universal AST\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnic30%2Fhdlconvertor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnic30%2Fhdlconvertor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnic30%2Fhdlconvertor/lists"}