Skip to main content

An abstract VHDL language model.

Project description

Sourcecode on GitHub Sourcecode License GitHub tag (latest SemVer incl. pre-release) GitHub release (latest SemVer incl. including pre-releases) GitHub release date Dependent repos (via libraries.io)
GitHub Workflow - Build and Test Status Codacy - Quality Codacy - Coverage Codecov - Branch Coverage Libraries.io SourceRank
GitHub Workflow Release Status PyPI PyPI - Status PyPI - Python Version Libraries.io status for latest release Requires.io
GitHub Workflow - Documentation Status Documentation License Documentation - Read Now!

pyVHDLModel

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 libghdl offered via pyghdl.
  • Code Document-Object-Model (Code-DOM) in pyVHDLParser.

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:
  print("{}".format(entity.Name))
  print("  generics:")
  for generic in entity.Generics:
    print("  - {} : {!s} {}".format(
      generic.Name, generic.Mode, generic.SubTypeIndication)
    )
  print("  ports:")
  for port in entity.Ports:
    print("  - {} : {!s} {}".format(
      port.Name, port.Mode, port.SubTypeIndication)
    )

Contributors

License

This Python package (source code) 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.10.5.tar.gz (20.2 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.10.5-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file pyVHDLModel-0.10.5.tar.gz.

File metadata

  • Download URL: pyVHDLModel-0.10.5.tar.gz
  • Upload date:
  • Size: 20.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pyVHDLModel-0.10.5.tar.gz
Algorithm Hash digest
SHA256 c0c3064bb18558e1ceae8b1c563a2020d8d8bb5cc66c0de8ea173b71edb77e71
MD5 9e753eb1cdec8f60777c74ef534fdcd4
BLAKE2b-256 945e4e54c578cb089a8be3c923f63a0d99ce82a4caec0e60ad9180650f24131a

See more details on using hashes here.

File details

Details for the file pyVHDLModel-0.10.5-py3-none-any.whl.

File metadata

  • Download URL: pyVHDLModel-0.10.5-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.5

File hashes

Hashes for pyVHDLModel-0.10.5-py3-none-any.whl
Algorithm Hash digest
SHA256 0709aa1242e22d989bfddaf2d2deda99bc3898ff73ddb0259de8da2b537f9438
MD5 36e9948669d14e13d22ffbb988bd4346
BLAKE2b-256 3c4383d77d9c0d721d69fe85e0fb1daf57c9e6a878252aaf44c4980e18cb88f9

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