Skip to main content

Parser and converters for OSVVM-specific data models and report formats.

Project description

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 Codacy - Quality Codacy - Coverage Codecov - Branch Coverage

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 pathlib import Path
from pyEDAA.OSVVM.Project.TCL import OsvvmProFileProcessor

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

project = processor.Context.ToProject("OsvvmLibraries")
for buildName, build in project.Builds.items():
  for libraryName, lib in build.Libraries.items():
    for file in lib.Files:
      ...

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

Testsuite Summary Reports

[!NOTE]
TBD

YAML Report (more details)

from pathlib import Path
from pyEDAA.OSVVM.Build import BuildSummaryDocument

yamlPath = Path("OSVVMLibraries_RunAllTests.yml")
doc = BuildSummaryDocument(yamlPath, analyzeAndConvert=True)

XML Report (Ant+JUnit format - less details)

from pathlib import Path
from pyEDAA.Reports.Unittesting.JUnit import Document as JUnitDocument

junitExampleFile = Path("OSVVMLibraries_RunAllTests.xml")
doc = JUnitDocument(junitExampleFile, analyzeAndConvert=True)

Testcase Summary Reports

[!NOTE]
TBD

Alert and Log Reports

[!NOTE]
TBD

from pathlib import Path
from pyEDAA.OSVVM.AlertLog import Document as AlertLogDocument

path = Path("TbAxi4_BasicReadWrite_alerts.yml")
doc = AlertLogDocument(path, analyzeAndConvert=True)

print(f"{doc.Name}: {doc.AlertCountWarnings}/{doc.AlertCountErrors}/{doc.AlertCountFailures}")
for item in doc:
	print(f"  {item.Name:<19}: {item.AlertCountWarnings}/{item.AlertCountErrors}/{item.AlertCountFailures}")
print(f"Total errors: {doc.TotalErrors}")

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.Project.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

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_osvvm-0.7.0.tar.gz (48.7 kB view details)

Uploaded Source

Built Distribution

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

pyedaa_osvvm-0.7.0-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

Details for the file pyedaa_osvvm-0.7.0.tar.gz.

File metadata

  • Download URL: pyedaa_osvvm-0.7.0.tar.gz
  • Upload date:
  • Size: 48.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyedaa_osvvm-0.7.0.tar.gz
Algorithm Hash digest
SHA256 99caf8ad10c975a376f552a0506e070c5cd9ee8993952d743d6216b4df244a6c
MD5 f93ab7a84c627f4b542ee7be3d0d7daf
BLAKE2b-256 5079c3a5a5aa42b53aea64a67b0a628e0c9aa7bd4ebcc877aad044f9c9d9a6e0

See more details on using hashes here.

File details

Details for the file pyedaa_osvvm-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: pyedaa_osvvm-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 55.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for pyedaa_osvvm-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cf8ca349e35d86197d22c532721910b4fdd0521647a15283f73decb134ea5a6a
MD5 c4bf16f72f386be982ae151996b68251
BLAKE2b-256 687adde57aad02cc047e01cbb8bae524787092b93e7ef5e59257f1a9ea03637f

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