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
libghdloffered viapyghdl. - Code Document-Object-Model (Code-DOM) in pyVHDLParser.
- PyHDLio based on an ANTLR4 grammar.
- pyVHDLModelTreesitter based on tree-sitter-vhdl.
pyVHDLModel Consumers
- Create graphical views of VHDL files or designs.
Possible candidates: 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 package implementing
pyVHDLModel.
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 (Maintainer)
- Unai Martinez-Corral
- and more...
License
This Python package (source code) is licensed under Apache License 2.0.
The accompanying documentation is licensed under Creative Commons - Attribution 4.0 (CC-BY 4.0).
SPDX-License-Identifier: Apache-2.0
Metadata
Release files for pyVHDLModel 0.39.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyvhdlmodel-0.39.0.tar.gz | 113.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyvhdlmodel-0.39.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 244.3 kB
Release files / pyvhdlmodel-0.39.0.tar.gz
| Download URL | pyvhdlmodel-0.39.0.tar.gz |
|---|---|
| Size | 113.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cee9c179af6ce209e06fc9e1e1c27ef8875bea4cec2ab95feb7bc323194e3da
|
|
BLAKE2b-256 checksum How to use checksums |
c3ae5307314030d909640548df5d2e00463f193d8242f96e2d392f31f0966fda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / pyvhdlmodel-0.39.0-py3-none-any.whl
| Download URL | pyvhdlmodel-0.39.0-py3-none-any.whl |
|---|---|
| Size | 131.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8eace7cc310bbda5f2dc649c7b5c4c58856a3295a5cd0ccf68a99b0dda929f93
|
|
BLAKE2b-256 checksum How to use checksums |
adeb0a78ef9616b997f42ada1f3647e9ce514cb0214fa5f6b1250481a0898dca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|