Skip to content

edaa-org/pyEDAA.OSVVM

Repository files navigation

Sourcecode on GitHub Sourcecode License Documentation Documentation License
PyPI PyPI - Status PyPI - Python Version
GitHub Workflow - Build and Test Status Libraries.io status for latest release

Main Goals

This package provides OSVVM-specific data models and parsers. The data models can be used as-is or converted to generic data models of the pyEDAA data model family. This includes parsing OSVVM's *.pro-files and translating them to a pyEDAA.ProjectModel instance as well as reading OSVVM's reports in YAML format like test results, alerts or functional coverage.

Frameworks consuming these data models can build higher level features and services on top of these models, while using one parser that's aligned with OSVVM's data formats.

Data Models

Project Description via *.pro-Files

Features:

  • Parse OSVVM's *.pro files including complex TCL code structures like nested if-statements.
  • Emulate tool specific TCL variables: ::osvvm::ToolVendor, ::osvvm::ToolName ::osvvm::ToolNameVersion, ...
  • Convert the project description stored in one or more *.pro files to a pyEDAA.ProjectModel instance.

Basic Data Model:

  • VHDL source files are accumulated in VHDL libraries.
  • The order of source files is preserved in a library.
  • Test cases are accumulated in test suites.
  • Configuration changes are collected in a context.
    • When a new item is added to the model, certain default values or collected configuration values are used to create this new item.

Quick Example

from pyEDAA.OSVVM.Tcl import OsvvmProFileProcessor

processor = OsvvmProFileProcessor()
processor.LoadProFile(Path("OSVVM/OSVVMLibraries/OsvvmLibraries.pro"))

for libraryName, lib in processor.Context.Libraries.items():
  for file in lib.Files:
    ...

for testsuiteName, ts in processor.Context.Testsuites.items():
  for tc in ts.Testcases.values():
    ...

Testsuite Summary Reports

Note

TBD

Testcase Summary Reports

Note

TBD

Alert and Log Reports

Note

TBD

Scoreboard Reports

Note

TBD

Functional Coverage Reports

Note

TBD

Requirement Reports

Note

TBD

Use Cases

  • Reading OSVVM's project description from *.pro files.
    • Convert to other data or file format.
  • Reading OSVVM's reports from *.yaml files.
    • Convert to other data or file format.
    • Investigate reports.
    • Merge reports.

Examples

from pathlib import Path
from pyEDAA.OSVVM.Tcl import OsvvmProFileProcessor

def main() -> None:
  processor = OsvvmProFileProcessor()

  processor.LoadProFile(Path("OSVVM/OSVVMLibraries/OsvvmLibraries.pro"))
  processor.LoadProFile(Path("OSVVM/OSVVMLibraries/RunAllTests.pro"))

  for libraryName, lib in processor.Context.Libraries.items():
    print(f"Library: {libraryName} ({len(lib.Files)})")
    for file in lib.Files:
      print(f"  {file.Path}")

  print()
  for testsuiteName, ts in processor.Context.Testsuites.items():
    print(f"Testsuite: {testsuiteName} ({len(ts.Testcases)})")
    for tc in ts.Testcases.values():
      print(f"  {tc.Name}")

Consumers

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