Skip to main content

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) 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 pyEDAA.ProjectModel 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyEDAA.ProjectModel 0.6.4
File Size Uploaded
pyedaa_projectmodel-0.6.4.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyEDAA.ProjectModel 0.6.4
File Interpreter ABI Platform
pyedaa_projectmodel-0.6.4-py3-none-any.whl Python 3 none any Details

Total release size: 62.3 kB

Release files / pyedaa_projectmodel-0.6.4.tar.gz

Download URL pyedaa_projectmodel-0.6.4.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
60c2105ebb57d8e75b30357452377922dc8d3fc6dacd27f38ac57ca0a1375a85
BLAKE2b-256 checksum
How to use checksums
0445bd197f98f49f9e38c5b078b65d2287d3efd903f3f17e70445e23e1c99a1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / pyedaa_projectmodel-0.6.4-py3-none-any.whl

Download URL pyedaa_projectmodel-0.6.4-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45bd0c6b9690bcce8afe2172c644850246b6d2449006fb5fe36e3c7253053abf
BLAKE2b-256 checksum
How to use checksums
5c34980e2f411f758ae81adcc7aeafdb024597c5a63af3515f95e3bad09c007e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.6.4 This release

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page