Skip to main content

An abstract VHDL language model.

Project description

Sourcecode on GitHub Sourcecode License Documentation Documentation License Gitter
PyPI PyPI - Status PyPI - Python Version
GitHub Workflow - Build and Test Status Libraries.io status for latest release Codacy - Quality Codacy - Coverage Codecov - Branch Coverage

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyvhdlmodel-0.37.0.tar.gz (67.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyvhdlmodel-0.37.0-py3-none-any.whl (87.0 kB view details)

Uploaded Python 3

File details

Details for the file pyvhdlmodel-0.37.0.tar.gz.

File metadata

  • Download URL: pyvhdlmodel-0.37.0.tar.gz
  • Upload date:
  • Size: 67.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pyvhdlmodel-0.37.0.tar.gz
Algorithm Hash digest
SHA256 5d5798966c838b15d0e75b282c352d2f65423e71328e66df20cfc28a5d7324f5
MD5 075e467a0364bfaf184dfa989db71ef9
BLAKE2b-256 3c3d807403bf36943952d9eada62996dade319bbf4464139da8ab163d12aadf1

See more details on using hashes here.

File details

Details for the file pyvhdlmodel-0.37.0-py3-none-any.whl.

File metadata

  • Download URL: pyvhdlmodel-0.37.0-py3-none-any.whl
  • Upload date:
  • Size: 87.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pyvhdlmodel-0.37.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fb0d0b74e64ff2941f0bee36d50a4af9866055a6c341ab95a854f5a7428091b
MD5 db9336130b62c442c35319e197347466
BLAKE2b-256 4a5c77f2a173ac660f61432827803642c345a49ea7acd22b346916b49533f274

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page