hdlConvertorAst


NamehdlConvertorAst JSON
Version 1.2 PyPI version JSON
download
home_pagehttps://github.com/Nic30/hdlConvertorAst
SummaryA library of AST nodes for HDL languages (Verilog, VHDL, ...) and transpiler/compiler utilities
upload_time2023-10-23 13:53:41
maintainer
docs_urlNone
authorMichal Orsak
requires_python
licenseMIT
keywords hdl vhdl verilog systemverilog parser preprocessor antlr4 ast code-generator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            # hdlConvertorAst
[![CircleCI](https://circleci.com/gh/Nic30/hdlConvertorAst.svg?style=svg)](https://circleci.com/gh/Nic30/hdlConvertorAst)
[![PyPI version](https://badge.fury.io/py/hdlConvertorAst.svg)](http://badge.fury.io/py/hdlConvertorAst)
[![Python version](https://img.shields.io/pypi/pyversions/hdlConvertorAst.svg)](https://img.shields.io/pypi/pyversions/hdlConvertorAst.svg)
[![Coverage Status](https://coveralls.io/repos/github/Nic30/hdlConvertorAst/badge.svg?branch=master)](https://coveralls.io/github/Nic30/hdlConvertorAst?branch=master)
[![Documentation Status](https://readthedocs.org/projects/hdlconvertorast/badge/?version=latest)](https://hdlconvertorast.readthedocs.io/en/latest/?badge=latest)
 
This library contains universal [HDL AST nodes](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/hdlAst/__init__.py) (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](https://github.com/Nic30/hdlConvertor) and it can also be converted to VHDL/SV/JSON/SystemC/... and other formats using [hdlConvertorAst.to module](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/to).
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](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/to) 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](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/translate)

Doc shared with [hdlConvertor](https://github.com/Nic30/hdlConvertor).

### Intended as a support library for
  * code generators
  * code parsers
  * compilers/transpilers

### Supported languages
  * [IEEE 1076-2008 (VHDL 2008)](https://ieeexplore.ieee.org/document/4772740) and all previous standard, (currently without `tool_directive` and `PSL`)
  * [IEEE 1800-2017 (SystemVerilog 2017)](https://ieeexplore.ieee.org/document/8299595) 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

```bash
# 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](https://github.com/SymbiFlow/fasm) - Python, FPGA Assembly (FASM) Parser and Generator  



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Nic30/hdlConvertorAst",
    "name": "hdlConvertorAst",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "hdl,vhdl,verilog,systemverilog,parser,preprocessor,antlr4,ast,code-generator",
    "author": "Michal Orsak",
    "author_email": "Nic30original@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4f/4d/ee9d652b60b70c33329a226ec3a2a23f18e321eb260397a649becc1b54ce/hdlConvertorAst-1.2.tar.gz",
    "platform": null,
    "description": "# hdlConvertorAst\n[![CircleCI](https://circleci.com/gh/Nic30/hdlConvertorAst.svg?style=svg)](https://circleci.com/gh/Nic30/hdlConvertorAst)\n[![PyPI version](https://badge.fury.io/py/hdlConvertorAst.svg)](http://badge.fury.io/py/hdlConvertorAst)\n[![Python version](https://img.shields.io/pypi/pyversions/hdlConvertorAst.svg)](https://img.shields.io/pypi/pyversions/hdlConvertorAst.svg)\n[![Coverage Status](https://coveralls.io/repos/github/Nic30/hdlConvertorAst/badge.svg?branch=master)](https://coveralls.io/github/Nic30/hdlConvertorAst?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/hdlconvertorast/badge/?version=latest)](https://hdlconvertorast.readthedocs.io/en/latest/?badge=latest)\n \nThis library contains universal [HDL AST nodes](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/hdlAst/__init__.py) (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](https://github.com/Nic30/hdlConvertor) and it can also be converted to VHDL/SV/JSON/SystemC/... and other formats using [hdlConvertorAst.to module](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/to).\nNote that the conversion of AST of different languages requires an extra care.\nE. g. the VHDL AST and SV AST will have a different type names and thus the direct transpilation using [hdlConvertorAst.to module](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/to) 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](https://github.com/Nic30/hdlConvertorAst/tree/master/hdlConvertorAst/translate)\n\nDoc shared with [hdlConvertor](https://github.com/Nic30/hdlConvertor).\n\n### Intended as a support library for\n  * code generators\n  * code parsers\n  * compilers/transpilers\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 1800-2017 (SystemVerilog 2017)](https://ieeexplore.ieee.org/document/8299595) and all previous standards.\n  * SystemC 2.3.3\n  * HdlConvertor JSON\n  * hwtSimApi basic_rtl_sim_model (python interpreted RTL simulator)\n  * hwt (hardware construction framework (HCL) with algorithmic synthesis (HLS))\n\n\n### List of selected unique features of this library\n  * single straightforward universal AST for all languages, wide spectrum of import/export languages\n  * automatic parenthesis resolution in expressions based on operator priority/associativity\n  * clever white-spaces, constant and expression formating \n  * comments preserved as doc of objects\n\n### Installation\n\n```bash\n# note this may be older version than you see in repo\nsudo pip3 install hdlConvertorAst\n\n# or download repository and run\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 hdlConvertorAst\n```\n\n### Similar projects\n\n   * [fasm](https://github.com/SymbiFlow/fasm) - Python, FPGA Assembly (FASM) Parser and Generator  \n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A library of AST nodes for HDL languages (Verilog, VHDL, ...) and transpiler/compiler utilities",
    "version": "1.2",
    "project_urls": {
        "Homepage": "https://github.com/Nic30/hdlConvertorAst"
    },
    "split_keywords": [
        "hdl",
        "vhdl",
        "verilog",
        "systemverilog",
        "parser",
        "preprocessor",
        "antlr4",
        "ast",
        "code-generator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6250b02f8cb20d17868382f07a4b18fd1280f6a06fd38f338ad7c8fcee38bd52",
                "md5": "9f75f5a0e2596113c7183a4475b57bc8",
                "sha256": "0becf07c665b399bfdde0cc10559dc061e1278a817ec28262d3512281f58b4b3"
            },
            "downloads": -1,
            "filename": "hdlConvertorAst-1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9f75f5a0e2596113c7183a4475b57bc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 90491,
            "upload_time": "2023-10-23T13:53:39",
            "upload_time_iso_8601": "2023-10-23T13:53:39.554898Z",
            "url": "https://files.pythonhosted.org/packages/62/50/b02f8cb20d17868382f07a4b18fd1280f6a06fd38f338ad7c8fcee38bd52/hdlConvertorAst-1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f4dee9d652b60b70c33329a226ec3a2a23f18e321eb260397a649becc1b54ce",
                "md5": "9e12efab928b40155984ccae1e18d1f6",
                "sha256": "7dcf79871f529c891ead74f47a6ad4ddf1d6f058ea1a4faa7644eee2cf4ec0ec"
            },
            "downloads": -1,
            "filename": "hdlConvertorAst-1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "9e12efab928b40155984ccae1e18d1f6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 64076,
            "upload_time": "2023-10-23T13:53:41",
            "upload_time_iso_8601": "2023-10-23T13:53:41.501546Z",
            "url": "https://files.pythonhosted.org/packages/4f/4d/ee9d652b60b70c33329a226ec3a2a23f18e321eb260397a649becc1b54ce/hdlConvertorAst-1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-23 13:53:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Nic30",
    "github_project": "hdlConvertorAst",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": false,
    "circle": true,
    "lcname": "hdlconvertorast"
}
        
Elapsed time: 0.13255s