{ "info": { "author": "Michal Orsak", "author_email": "michal.o.socials@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: C++", "Programming Language :: Cython", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)", "Topic :: Software Development :: Build Tools" ], "description": "# hdlConvertor\n[![Travis-ci Build Status](https://travis-ci.org/Nic30/hdlConvertor.png?branch=master)](https://travis-ci.org/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[ROADMAP](https://drive.google.com/file/d/1zyegLIf7VaBRyb-ED5vgOMmHzW4SRZLp/view?usp=sharing) [![Gitter](https://badges.gitter.im/hdlConvertor/community.svg)](https://gitter.im/hdlConvertor/community?utm_source=badge&utm_medium=badge&utm_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)\n\nThe System Verilog and VHDL parser, preprocessor and code generator for Python/C++ written in C++. The lower layers are ANTLR4 generated parsers with full language support. Next layer converts this raw Verilog/VHDL AST to simple universal AST (Classes defined in [hdlConvertor::hdlObjects](https://github.com/Nic30/hdlConvertor/tree/master/include/hdlConvertor/hdlObjects) and it's [python equivalent](https://github.com/Nic30/hdlConvertor/tree/master/hdlConvertor/hdlAst).). So your project does not not have to care about Verilog/VHDL differences and deprecated ridiculous features.\nIt is also possible to convert this AST back to original HDL or access the comments from HDL.\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 19.04)\n```\n# use up to date compiler, gcc>=7\n# on old systems without libantlr4-runtime-dev you have to add apt repo manually, see .travis.yml\nsudo apt install build-essential uuid-dev cmake default-jre python3 python3-dev python3-pip libantlr4-runtime-dev antlr4\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 -r requirements.txt\nsudo python3 setup.py install\n```\nOr the same for python 2.7 with other options just for demonstration.\n\nInstaller also supports other commands which may be usefull\n```\npython setup.py install --prefix /tmp/python_install/ -j 8 --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 && cd build\ncmake .. && cmake . --build\ncpack # to generate .deb package\n```\n\nWindows:\n\nTake a look at appveyor.yml. 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`.\nThere are classes for objects in HDL langues and there is also type specified for every property in anotations. This allows IDEs to advise and it is also a part of doc.\n\nExample of usage:\n```python\nimport sys\nfrom hdlConvertor.language import Language\nfrom hdlConvertor.toVerilog import ToVerilog\nfrom hdlConvertor import HdlConvertor\n\nfilenames = [\"your.v\", ]\ninclude_dirs = []\nc = HdlConvertor()\nd = c.parse(filenames, Language.VERILOG, include_dirs, hierarchyOnly=False, debug=True)\n\ntv = ToVerilog(sys.stdout)\ntv.print_context(d)\n\nfor o in d.objs:\n print(o)\n```\n\n![overview](https://raw.githubusercontent.com/nic30/hdlConvertor/master/doc/hdlConvertor_typical_usage.png)\n\n\n### Similar projects:\n(Tell us If you know about some other project!)\n\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* [Pyverilog](https://github.com/PyHDI/Pyverilog) - python verilog toolkit\n* [pyVHDLParser](https://github.com/Paebbels/pyVHDLParser) - python vhdl parser with 2008 support\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* [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* [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* [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", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Nic30/hdlConvertor", "keywords": "hdl,vhdl,verilog,system verilog,parser,preprocessor,antlr4", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "hdlConvertor", "package_url": "https://pypi.org/project/hdlConvertor/", "platform": "", "project_url": "https://pypi.org/project/hdlConvertor/", "project_urls": { "Homepage": "https://github.com/Nic30/hdlConvertor" }, "release_url": "https://pypi.org/project/hdlConvertor/1.5/", "requires_dist": null, "requires_python": "", "summary": "VHDL and System Verilog parser written in c++", "version": "1.5" }, "last_serial": 5963704, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "ae446614cc263ed95ae4fda184613677", "sha256": "7586e3e1d360866b040e2a9b613d31bfec91186cf0270e03269a11e58d631e76" }, "downloads": -1, "filename": "hdlConvertor-0.3.tar.gz", "has_sig": false, "md5_digest": "ae446614cc263ed95ae4fda184613677", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 335531, "upload_time": "2016-06-28T20:24:17", "url": "https://files.pythonhosted.org/packages/33/c4/91dfdfbf6c75718aec2052e24c2a6701cb2de678b038dd2cb27e0b5db99e/hdlConvertor-0.3.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "a74b40c164b3a566166f149e97a99f5a", "sha256": "6861a97c46eea71c6df3d9bb66065cc587a422693dc125f7d4524bc76a1c9c64" }, "downloads": -1, "filename": "hdlConvertor-0.5.tar.gz", "has_sig": false, "md5_digest": "a74b40c164b3a566166f149e97a99f5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 335898, "upload_time": "2016-07-07T11:26:13", "url": "https://files.pythonhosted.org/packages/4c/fb/401f2b364933cc57161cac54fb8a5eed29c1265eca14c571f14d21c51306/hdlConvertor-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "6e006ec28364677e57ffa8783ff73417", "sha256": "4ab38ace159ee0a323b83e4b1e0833ec58db78b26aad78d8eed76fc1dfc2709e" }, "downloads": -1, "filename": "hdlConvertor-0.6.tar.gz", "has_sig": false, "md5_digest": "6e006ec28364677e57ffa8783ff73417", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 545502, "upload_time": "2016-07-07T11:28:42", "url": "https://files.pythonhosted.org/packages/14/a9/1c5607932e782263be0c772631b69a2ec1ac3a7f8895670f9ba83848cb5f/hdlConvertor-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "37c807383c6e040c3f48e22d33d75c0c", "sha256": "17b9da09dc2414b3e4902c6ea35fdbb82d81a2093b329c92987974e825cd125b" }, "downloads": -1, "filename": "hdlConvertor-0.7.tar.gz", "has_sig": false, "md5_digest": "37c807383c6e040c3f48e22d33d75c0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 545599, "upload_time": "2016-07-07T12:16:21", "url": "https://files.pythonhosted.org/packages/d1/0a/ac3a5b3d6c74d624533a91979da66cccdb1d165cd2c7ee50db23709dcff3/hdlConvertor-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "479f4b4d85547897929b71be71b2b96e", "sha256": "8a541e5dac00d384ad438d58bf348947af03e3f1d7aee5576506542d86fa136b" }, "downloads": -1, "filename": "hdlConvertor-0.8.tar.gz", "has_sig": false, "md5_digest": "479f4b4d85547897929b71be71b2b96e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 545591, "upload_time": "2016-07-07T12:22:39", "url": "https://files.pythonhosted.org/packages/f5/86/9a6f5b4ea29ecc079fda4466a1250c1840cd8bcb194984b750836977fbe1/hdlConvertor-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "e7e2996adb1934d19a290779ca6d883c", "sha256": "82bec82416e196e55994ea0848584cccb02636590528077bc0221baa32d49b4e" }, "downloads": -1, "filename": "hdlConvertor-0.9.tar.gz", "has_sig": false, "md5_digest": "e7e2996adb1934d19a290779ca6d883c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 551900, "upload_time": "2016-08-03T22:11:17", "url": "https://files.pythonhosted.org/packages/c6/b0/30f33bf8d201e32b9b996e8eaf98de08015260bbb5c0185ac72e22d19339/hdlConvertor-0.9.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "07f0fba016459f8bbbed8a771a370df1", "sha256": "2ce8a2c79cf01bd4f961f4d032ed3d5645f5b9b63699d6be250fadd13269026e" }, "downloads": -1, "filename": "hdlConvertor-1.0.tar.gz", "has_sig": false, "md5_digest": "07f0fba016459f8bbbed8a771a370df1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 835023, "upload_time": "2016-09-18T20:23:41", "url": "https://files.pythonhosted.org/packages/1b/7f/5998349de708465002e47b07b90981cf633a2384635d2a32497817d21184/hdlConvertor-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "98d794e7b1ee2b0dfaf6fa03a2392ce8", "sha256": "6596736278e64879a97f16a3838d7ab871166e36be6ac0342e22eccd42db4275" }, "downloads": -1, "filename": "hdlConvertor-1.1.tar.gz", "has_sig": false, "md5_digest": "98d794e7b1ee2b0dfaf6fa03a2392ce8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 833550, "upload_time": "2017-12-09T00:26:58", "url": "https://files.pythonhosted.org/packages/01/ce/137c4e04142660391db39e1ca374679dedd7edf0946b118bd168bbf148c0/hdlConvertor-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "bb9f710cca1146be0eb48ed6fa472305", "sha256": "7636c0827d6cf40daa2c5e66d3f96c21d0a088a998bb22961ee3845b7dba840e" }, "downloads": -1, "filename": "hdlConvertor-1.2.tar.gz", "has_sig": false, "md5_digest": "bb9f710cca1146be0eb48ed6fa472305", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 834533, "upload_time": "2018-10-07T19:18:26", "url": "https://files.pythonhosted.org/packages/48/36/907db1b021da7eb44f0b0b2d2e68c0d0988e6afabc2befbab42036eb3ae7/hdlConvertor-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "22044edb7ebd8e350fd691ffce16c5a8", "sha256": "9759df81755ad7ef28a95a6479a8570674a4b8ec7f1eb915bf7a8c1b87747d75" }, "downloads": -1, "filename": "hdlConvertor-1.3.tar.gz", "has_sig": false, "md5_digest": "22044edb7ebd8e350fd691ffce16c5a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148286, "upload_time": "2019-10-11T17:32:12", "url": "https://files.pythonhosted.org/packages/51/ef/1fc3f0965e0eb2ce69817c0637afca4cfb88bf52ac6cfa2a4145f152fb34/hdlConvertor-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "0536cc5a0cad4a2d407153487be096d8", "sha256": "be28b85353cec0eaa3b1361d6ff9ab5078cc0b3ae9a6324f2e42e2ffabcfae16" }, "downloads": -1, "filename": "hdlConvertor-1.4.tar.gz", "has_sig": false, "md5_digest": "0536cc5a0cad4a2d407153487be096d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148813, "upload_time": "2019-10-12T09:28:37", "url": "https://files.pythonhosted.org/packages/ab/9b/29cf9a39cd7b66ff81aa84f765e87c18b2141cf3fde22aa80489a55f631c/hdlConvertor-1.4.tar.gz" } ], "1.5": [ { "comment_text": "", "digests": { "md5": "26e5f3bda4d35e6cc8007ef18c6ee773", "sha256": "272945ade17dfa7a8d7ec4572ac2f5d8e380b3d8ea92bc67cd884f80df238229" }, "downloads": -1, "filename": "hdlConvertor-1.5.tar.gz", "has_sig": false, "md5_digest": "26e5f3bda4d35e6cc8007ef18c6ee773", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148852, "upload_time": "2019-10-12T09:52:20", "url": "https://files.pythonhosted.org/packages/c3/cd/8409ad980caf3e433c353a5e31a6fcf94989c868983b97b5961b8298f752/hdlConvertor-1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "26e5f3bda4d35e6cc8007ef18c6ee773", "sha256": "272945ade17dfa7a8d7ec4572ac2f5d8e380b3d8ea92bc67cd884f80df238229" }, "downloads": -1, "filename": "hdlConvertor-1.5.tar.gz", "has_sig": false, "md5_digest": "26e5f3bda4d35e6cc8007ef18c6ee773", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148852, "upload_time": "2019-10-12T09:52:20", "url": "https://files.pythonhosted.org/packages/c3/cd/8409ad980caf3e433c353a5e31a6fcf94989c868983b97b5961b8298f752/hdlConvertor-1.5.tar.gz" } ] }