pyVHDLModel


NamepyVHDLModel JSON
Version 0.28.0 PyPI version JSON
download
home_pagehttps://GitHub.com/VHDL/pyVHDLModel
SummaryAn abstract VHDL language model.
upload_time2024-01-21 01:30:57
maintainer
docs_urlNone
authorPatrick Lehmann
requires_python>=3.8
licenseApache-2.0
keywords python3 vhdl language model abstract
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a title="vhdl.github.io/pyVHDLModel" href="https://vhdl.github.io/pyVHDLModel"><img height="80px" src="doc/_static/logo.svg"/></a>
</p>

[![Sourcecode on GitHub](https://img.shields.io/badge/VHDL-pyVHDLModel-29b6f6.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=0277bd)](https://github.com/vhdl/pyVHDLModel)
[![Sourcecode License](https://img.shields.io/pypi/l/pyVHDLModel?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)
[![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=vhdl.github.io%2FpyVHDLModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fvhdl.github.io%2FpyVHDLModel%2Findex.html)](https://vhdl.github.io/pyVHDLModel/)
[![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)
[![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)  
[![PyPI](https://img.shields.io/pypi/v/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyVHDLModel/)
![PyPI - Status](https://img.shields.io/pypi/status/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)  
[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/actions/workflow/status/vhdl/pyVHDLModel/Pipeline.yml?branch=main&longCache=true&style=flat-square&label=Build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/VHDL/pyVHDLModel/actions/workflows/Pipeline.yml)
[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyVHDLModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/vhdl/pyVHDLModel)
[![Codacy - Quality](https://img.shields.io/codacy/grade/2286426d2b11417e90010427b7fed8e7?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/VHDL/pyVHDLModel)
[![Codacy - Coverage](https://img.shields.io/codacy/coverage/2286426d2b11417e90010427b7fed8e7?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/VHDL/pyVHDLModel)
[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/vhdl/pyVHDLModel?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/vhdl/pyVHDLModel)

<!--
[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pyVHDLModel?longCache=true&style=flat-square&logo=GitHub)](https://github.com/vhdl/pyVHDLModel/network/dependents)
[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyVHDLModel?longCache=true&style=flat-square)](https://libraries.io/github/vhdl/pyVHDLModel/sourcerank)
-->

An abstract VHDL language model written in Python.


# Main Goals

This package provides a unified abstract language model for VHDL.
Projects reading from source files can derive own classes and implement additional logic to create a concrete language
model for their tools.

Projects consuming pre-processed VHDL data (parsed, analyzed or elaborated) can build higher level features and services
on such a model, while supporting multiple frontends.


# Use Cases

## pyVHDLModel Generators

* High-level API for [GHDL's](https://GitHub.com/ghdl/ghdl) `libghdl` offered via `pyghdl`.
* Code Document-Object-Model (Code-DOM) in [pyVHDLParser](https://GitHub.com/Paebbels/pyVHDLParser).

## pyVHDLModel Consumers

* Create graphical views of VHDL files or designs.  
	Possible candidates: [Symbolator](https://GitHub.com/kevinpt/symbolator)
* Created a (re)formatted output of VHDL.


# Examples

## List all Entities with Generics and Ports

The following tiny example is based on GHDL's [`pyGHDL.dom`](https://GitHub.com/ghdl/ghdl/tree/master/pyGHDL/dom) package implementing
pyVHDLModel.

```python
from pathlib import Path
from pyGHDL.dom.NonStandard import Design, Document

sourceFile = Path("example.vhdl")

design = Design()
library = design.GetLibrary("lib")
document = Document(sourceFile)
design.AddDocument(document, library)

for entity in document.Entities.values():
  print(f"{entity.Identifier}")
  print("  generics:")
  for generic in entity.GenericItems:
    identifiers = ", ".join([str(i) for i in generic.Identifiers])
    print(f"  - {identifiers} : {generic.Mode!s} {generic.Subtype}")
  print("  ports:")
  for port in entity.PortItems:
    identifiers = ", ".join([str(i) for i in port.Identifiers])
    print(f"  - {identifiers} : {port.Mode!s} {port.Subtype}")
```


# Contributors

* [Patrick Lehmann](https://GitHub.com/Paebbels) (Maintainer)
* [Unai Martinez-Corral](https://GitHub.com/umarcor)
* [and more...](https://GitHub.com/VHDL/pyVHDLModel/graphs/contributors)


# License

This Python package (source code) licensed under [Apache License 2.0](LICENSE.md).  
The accompanying documentation is licensed under [Creative Commons - Attribution 4.0 (CC-BY 4.0)](doc/Doc-License.rst).

-------------------------
SPDX-License-Identifier: Apache-2.0

            

Raw data

            {
    "_id": null,
    "home_page": "https://GitHub.com/VHDL/pyVHDLModel",
    "name": "pyVHDLModel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Python3 VHDL Language Model Abstract",
    "author": "Patrick Lehmann",
    "author_email": "Paebbels@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f9/df/e07b6f7fb8a34f26fcefb29adeaaaae0cd38ad5a1f3f005ecf26d339d0a4/pyVHDLModel-0.28.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a title=\"vhdl.github.io/pyVHDLModel\" href=\"https://vhdl.github.io/pyVHDLModel\"><img height=\"80px\" src=\"doc/_static/logo.svg\"/></a>\n</p>\n\n[![Sourcecode on GitHub](https://img.shields.io/badge/VHDL-pyVHDLModel-29b6f6.svg?longCache=true&style=flat-square&logo=GitHub&labelColor=0277bd)](https://github.com/vhdl/pyVHDLModel)\n[![Sourcecode License](https://img.shields.io/pypi/l/pyVHDLModel?longCache=true&style=flat-square&logo=Apache&label=code)](LICENSE.md)\n[![Documentation](https://img.shields.io/website?longCache=true&style=flat-square&label=vhdl.github.io%2FpyVHDLModel&logo=GitHub&logoColor=fff&up_color=blueviolet&up_message=Read%20now%20%E2%9E%9A&url=https%3A%2F%2Fvhdl.github.io%2FpyVHDLModel%2Findex.html)](https://vhdl.github.io/pyVHDLModel/)\n[![Documentation License](https://img.shields.io/badge/doc-CC--BY%204.0-green?longCache=true&style=flat-square&logo=CreativeCommons&logoColor=fff)](LICENSE.md)\n[![Gitter](https://img.shields.io/badge/chat-on%20gitter-4db797.svg?longCache=true&style=flat-square&logo=gitter&logoColor=e8ecef)](https://gitter.im/hdl/community)  \n[![PyPI](https://img.shields.io/pypi/v/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)](https://pypi.org/project/pyVHDLModel/)\n![PyPI - Status](https://img.shields.io/pypi/status/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyVHDLModel?longCache=true&style=flat-square&logo=PyPI&logoColor=FBE072)  \n[![GitHub Workflow - Build and Test Status](https://img.shields.io/github/actions/workflow/status/vhdl/pyVHDLModel/Pipeline.yml?branch=main&longCache=true&style=flat-square&label=Build%20and%20test&logo=GitHub%20Actions&logoColor=FFFFFF)](https://github.com/VHDL/pyVHDLModel/actions/workflows/Pipeline.yml)\n[![Libraries.io status for latest release](https://img.shields.io/librariesio/release/pypi/pyVHDLModel?longCache=true&style=flat-square&logo=Libraries.io&logoColor=fff)](https://libraries.io/github/vhdl/pyVHDLModel)\n[![Codacy - Quality](https://img.shields.io/codacy/grade/2286426d2b11417e90010427b7fed8e7?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/VHDL/pyVHDLModel)\n[![Codacy - Coverage](https://img.shields.io/codacy/coverage/2286426d2b11417e90010427b7fed8e7?longCache=true&style=flat-square&logo=Codacy)](https://www.codacy.com/gh/VHDL/pyVHDLModel)\n[![Codecov - Branch Coverage](https://img.shields.io/codecov/c/github/vhdl/pyVHDLModel?longCache=true&style=flat-square&logo=Codecov)](https://codecov.io/gh/vhdl/pyVHDLModel)\n\n<!--\n[![Dependent repos (via libraries.io)](https://img.shields.io/librariesio/dependent-repos/pypi/pyVHDLModel?longCache=true&style=flat-square&logo=GitHub)](https://github.com/vhdl/pyVHDLModel/network/dependents)\n[![Libraries.io SourceRank](https://img.shields.io/librariesio/sourcerank/pypi/pyVHDLModel?longCache=true&style=flat-square)](https://libraries.io/github/vhdl/pyVHDLModel/sourcerank)\n-->\n\nAn abstract VHDL language model written in Python.\n\n\n# Main Goals\n\nThis package provides a unified abstract language model for VHDL.\nProjects reading from source files can derive own classes and implement additional logic to create a concrete language\nmodel for their tools.\n\nProjects consuming pre-processed VHDL data (parsed, analyzed or elaborated) can build higher level features and services\non such a model, while supporting multiple frontends.\n\n\n# Use Cases\n\n## pyVHDLModel Generators\n\n* High-level API for [GHDL's](https://GitHub.com/ghdl/ghdl) `libghdl` offered via `pyghdl`.\n* Code Document-Object-Model (Code-DOM) in [pyVHDLParser](https://GitHub.com/Paebbels/pyVHDLParser).\n\n## pyVHDLModel Consumers\n\n* Create graphical views of VHDL files or designs.  \n\tPossible candidates: [Symbolator](https://GitHub.com/kevinpt/symbolator)\n* Created a (re)formatted output of VHDL.\n\n\n# Examples\n\n## List all Entities with Generics and Ports\n\nThe following tiny example is based on GHDL's [`pyGHDL.dom`](https://GitHub.com/ghdl/ghdl/tree/master/pyGHDL/dom) package implementing\npyVHDLModel.\n\n```python\nfrom pathlib import Path\nfrom pyGHDL.dom.NonStandard import Design, Document\n\nsourceFile = Path(\"example.vhdl\")\n\ndesign = Design()\nlibrary = design.GetLibrary(\"lib\")\ndocument = Document(sourceFile)\ndesign.AddDocument(document, library)\n\nfor entity in document.Entities.values():\n  print(f\"{entity.Identifier}\")\n  print(\"  generics:\")\n  for generic in entity.GenericItems:\n    identifiers = \", \".join([str(i) for i in generic.Identifiers])\n    print(f\"  - {identifiers} : {generic.Mode!s} {generic.Subtype}\")\n  print(\"  ports:\")\n  for port in entity.PortItems:\n    identifiers = \", \".join([str(i) for i in port.Identifiers])\n    print(f\"  - {identifiers} : {port.Mode!s} {port.Subtype}\")\n```\n\n\n# Contributors\n\n* [Patrick Lehmann](https://GitHub.com/Paebbels) (Maintainer)\n* [Unai Martinez-Corral](https://GitHub.com/umarcor)\n* [and more...](https://GitHub.com/VHDL/pyVHDLModel/graphs/contributors)\n\n\n# License\n\nThis Python package (source code) licensed under [Apache License 2.0](LICENSE.md).  \nThe accompanying documentation is licensed under [Creative Commons - Attribution 4.0 (CC-BY 4.0)](doc/Doc-License.rst).\n\n-------------------------\nSPDX-License-Identifier: Apache-2.0\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "An abstract VHDL language model.",
    "version": "0.28.0",
    "project_urls": {
        "Documentation": "https://VHDL.GitHub.io/pyVHDLModel",
        "Homepage": "https://GitHub.com/VHDL/pyVHDLModel",
        "Issue Tracker": "https://GitHub.com/VHDL/pyVHDLModel/issues",
        "Source Code": "https://GitHub.com/VHDL/pyVHDLModel"
    },
    "split_keywords": [
        "python3",
        "vhdl",
        "language",
        "model",
        "abstract"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d67c3c248848ab5110e0f071c7e1323e8ee9b86c7cf42cd59ce2c3dcb92e286c",
                "md5": "e2ea3326fb10e6a9776865216218228e",
                "sha256": "82a62ee10dc7ea0af49199c5f9b10a88aadefd3a3ff4236829f26f38972d74db"
            },
            "downloads": -1,
            "filename": "pyVHDLModel-0.28.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e2ea3326fb10e6a9776865216218228e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 72002,
            "upload_time": "2024-01-21T01:31:00",
            "upload_time_iso_8601": "2024-01-21T01:31:00.189855Z",
            "url": "https://files.pythonhosted.org/packages/d6/7c/3c248848ab5110e0f071c7e1323e8ee9b86c7cf42cd59ce2c3dcb92e286c/pyVHDLModel-0.28.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f9dfe07b6f7fb8a34f26fcefb29adeaaaae0cd38ad5a1f3f005ecf26d339d0a4",
                "md5": "8fe896d1befb8d9c9df8120d6d594dfc",
                "sha256": "4027fe9a236be8b0f92e13e035fe4dac9fa1fa7906f6024efcfd24fb6621dacd"
            },
            "downloads": -1,
            "filename": "pyVHDLModel-0.28.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8fe896d1befb8d9c9df8120d6d594dfc",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 52839,
            "upload_time": "2024-01-21T01:30:57",
            "upload_time_iso_8601": "2024-01-21T01:30:57.862432Z",
            "url": "https://files.pythonhosted.org/packages/f9/df/e07b6f7fb8a34f26fcefb29adeaaaae0cd38ad5a1f3f005ecf26d339d0a4/pyVHDLModel-0.28.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-21 01:30:57",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pyvhdlmodel"
}
        
Elapsed time: 0.16754s