Skip to main content

An abstract model of EDA tool projects.

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

Main Goals

This package provides a unified abstract project model for HDL designs and EDA tools. Third-party frameworks can derive own classes and implement additional logic to create a concrete project model for their tools.

Frameworks consuming this model can build higher level features and services on top of such a model, while supporting multiple input sources.

Data Model

  1. The toplevel element is a Project, which contains one or multiple designs.
  2. A Design is a variant of a project and contains filesets.
  3. A FileSet contains files or further sub-filesets.
  4. A File represents a single file. E.g. source files, configuration files, constraint files.
  5. A VHDLLibrary represents a group of VHDLSourceFiles being compiled into the same VHDL library.

img.png

Features

  • Construct a project model:

    • top-down (project → design → fileset → file) or
    • bottom-up (file → fileset → design → project) or
    • parsing a project file.
  • Designs, filesets and files can use absolute or relative paths.

    • ResolvedPath returns the resolved absolute path to an object.
  • Projects, designs, filesets and files can be validated (e.g. if the path exists).

  • Projects, designs, filesets and files can have user-defined attributes.

    • User-defined attributes are resolved bottom-up.

Project File Readers

OSVVM *.pro File Reader

ProjectModel can read *.pro files and extract source files. Included *.pro files are represented as sub-filesets.

Xilinx Vivado *.xpr Reader

ProjectModel can read *.xpr files and extract source, constraint and simulation files while preserving the fileset structure.

Use Cases

  • Reading OSVVM's *.pro files.
  • Reading Xilinx Vivado's *.xpr files.

Examples

from pathlib import Path
from pyEDAA.ProjectModel import Project, Design, FileSet, VHDLSourceFile

print(f"Current working directory: {Path.cwd()}")
projectDirectory = Path.cwd() / "../project"
print(f"Project directory: {projectDirectory!s} - {projectDirectory.exists()}")

project = Project("myProject", rootDirectory=projectDirectory)
designA = Design("designA", project=project, directory=Path("designA"))
designAFileset = FileSet("srcA", design=designA)
for vhdlFilePath in designAFileset.ResolvedPath.glob("*.vhdl"):
	designAFileset.AddFile(VHDLSourceFile(vhdlFilePath))

libFileset = FileSet("lib", Path("../lib"), design=designA)
for vhdlFilePath in libFileset.ResolvedPath.glob("*.vhdl"):
	libFileset.AddFile(VHDLSourceFile(vhdlFilePath))

print(f"All VHDL files in {designA.Name}:")
for file in designA.Files(fileType=VHDLSourceFile):
	print(f"  {file.Path}")

Consumers

This layer is used by:

  • 🚧 pyEDAA.Workflow

References

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

pyEDAA.ProjectModel-0.4.2.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

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

pyEDAA.ProjectModel-0.4.2-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file pyEDAA.ProjectModel-0.4.2.tar.gz.

File metadata

  • Download URL: pyEDAA.ProjectModel-0.4.2.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyEDAA.ProjectModel-0.4.2.tar.gz
Algorithm Hash digest
SHA256 6850d38c4195d96e8b02e15e0987e9760fb34c7586cf9771c145f4577e593e0f
MD5 998736520584871ec94c351009c23bb9
BLAKE2b-256 058611f1703305fad99e6735f7f6e2a5eddfbcf5203bc05a68ac943aef9c51e1

See more details on using hashes here.

File details

Details for the file pyEDAA.ProjectModel-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: pyEDAA.ProjectModel-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for pyEDAA.ProjectModel-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cfbc839b4c145b8ab001b0bd0cc7ee3286c7bc2803597c467bb0818d7283000a
MD5 12b38b3310af2ec9ea316d2479799888
BLAKE2b-256 6790a3374e9107a020c67619d448f975d08f887aa6d89a296e037dde9aa00ed5

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