<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>
[](https://github.com/vhdl/pyVHDLModel)
[](LICENSE.md)
[](https://vhdl.github.io/pyVHDLModel/)
[](LICENSE.md)
[](https://gitter.im/hdl/community)
[](https://pypi.org/project/pyVHDLModel/)


[](https://github.com/VHDL/pyVHDLModel/actions/workflows/Pipeline.yml)
[](https://libraries.io/github/vhdl/pyVHDLModel)
[](https://www.codacy.com/gh/VHDL/pyVHDLModel)
[](https://www.codacy.com/gh/VHDL/pyVHDLModel)
[](https://codecov.io/gh/vhdl/pyVHDLModel)
<!--
[](https://github.com/vhdl/pyVHDLModel/network/dependents)
[](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": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Python3 VHDL Language Model Abstract",
"author": "Patrick Lehmann",
"author_email": "Paebbels@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/02/07/d2c08967580137e3274a86214e9abf18e2c2d525b04f1462560614b23a0e/pyvhdlmodel-0.30.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[](https://github.com/vhdl/pyVHDLModel)\n[](LICENSE.md)\n[](https://vhdl.github.io/pyVHDLModel/)\n[](LICENSE.md)\n[](https://gitter.im/hdl/community) \n[](https://pypi.org/project/pyVHDLModel/)\n\n \n[](https://github.com/VHDL/pyVHDLModel/actions/workflows/Pipeline.yml)\n[](https://libraries.io/github/vhdl/pyVHDLModel)\n[](https://www.codacy.com/gh/VHDL/pyVHDLModel)\n[](https://www.codacy.com/gh/VHDL/pyVHDLModel)\n[](https://codecov.io/gh/vhdl/pyVHDLModel)\n\n<!--\n[](https://github.com/vhdl/pyVHDLModel/network/dependents)\n[](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.30.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": null,
"digests": {
"blake2b_256": "e399ae5cb0a9b40824bee34ed691d8588a195d15f4946c04ea69c82ff4809bb6",
"md5": "01648aca16d62418a110246bf668657e",
"sha256": "0e7c185de177db34968a0b2f7410a61fbe612a78322c8747a9ebb75cc80a1879"
},
"downloads": -1,
"filename": "pyVHDLModel-0.30.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "01648aca16d62418a110246bf668657e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 79894,
"upload_time": "2025-02-12T20:00:57",
"upload_time_iso_8601": "2025-02-12T20:00:57.465029Z",
"url": "https://files.pythonhosted.org/packages/e3/99/ae5cb0a9b40824bee34ed691d8588a195d15f4946c04ea69c82ff4809bb6/pyVHDLModel-0.30.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0207d2c08967580137e3274a86214e9abf18e2c2d525b04f1462560614b23a0e",
"md5": "0c8339f83c808981993dd7c5052bae71",
"sha256": "b92ef89a510a54d5548b8b8d9c7f2e3e27596aea5c6f7abc999ad4fefa42877a"
},
"downloads": -1,
"filename": "pyvhdlmodel-0.30.0.tar.gz",
"has_sig": false,
"md5_digest": "0c8339f83c808981993dd7c5052bae71",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 60290,
"upload_time": "2025-02-12T20:00:55",
"upload_time_iso_8601": "2025-02-12T20:00:55.922517Z",
"url": "https://files.pythonhosted.org/packages/02/07/d2c08967580137e3274a86214e9abf18e2c2d525b04f1462560614b23a0e/pyvhdlmodel-0.30.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-12 20:00:55",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "pyvhdlmodel"
}