pyEDAA.OSVVM.Project

Data model for OSVVM’s *.pro files.

Submodules

Variables

Classes

  • Base: Base-class for all entities in the data model reflecting an OSVVM *.pro file.

  • Named: Base-class for all named classes in the data model reflecting an OSVVM *.pro file.

  • Option: Base-class for all options in the data model used within an OSVVM *.pro file.

  • NoNullRangeWarning: Analysis option: Disable null-range warnings for VHDL files at analysis.

  • SourceFile: A base-class describing any source file (VHDL, Verilog, …) supported by OSVVM Scripts.

  • XDCConstraintFile: Represents an XDC constraint file.

  • VHDLSourceFile: Represents a VHDL source file.

  • VHDLLibrary: A VHDL library collecting multiple VHDL files containing VHDL design units.

  • GenericValue: Elaboration option: A generic value for a VHDL top-level entity.

  • ConstraintFile: Associated file option: Associated constraint file for VHDL sourcefiles.

  • ScopeToRef: Constrain file option: ScopeToRef binding.

  • ScopeToCell: Constrain file option: ScopeToCell binding.

  • Testcase: An OSVVM testcase.

  • Testsuite: An OSVVM testsuite containing multiple OSVVM testcases.

  • BuildName: OSVVM option: Name of a build.

  • Build: An OSVVM build containing one or multiple OSVVM testsuites.

  • Project: An OSVVM project containing one or multiple OSVVM builds.

  • Context: The OSVVM TCL execution context.


Variables

pyEDAA.OSVVM.Project.osvvmContext

Global OSVVM processing context.

Type:

Context

<pyEDAA.OSVVM.Project.Context object at 0x7fc6f6bf4400>
pyEDAA.OSVVM.Project._ParentType

Type variable for the parent reference.

~_ParentType

Classes

class pyEDAA.OSVVM.Project.Base(parent=None)[source]

Base-class for all entities in the data model reflecting an OSVVM *.pro file.

Inheritance

Inheritance diagram of Base

Parameters:

parent (_ParentType | None)

__init__(parent=None)[source]

Initializes the base-class with a parent reference.

Parameters:

parent (TypeVar(_ParentType, bound= Base) | None) – Optional, reference to a parent object.

Return type:

None

_parent: _ParentType | None

Reference to a parent object.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

class pyEDAA.OSVVM.Project.Named(name, parent=None)[source]

Base-class for all named classes in the data model reflecting an OSVVM *.pro file.

Inheritance

Inheritance diagram of Named

Parameters:
__init__(name, parent=None)[source]

Initializes the base-class with a parent reference.

Parameters:
  • name (str) – Name of the entity.

  • parent (TypeVar(_ParentType, bound= Base) | None) – Optional, reference to a parent object.

Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

Return type:

None

_name: str

Name of the entity.

property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.Option[source]

Base-class for all options in the data model used within an OSVVM *.pro file.

Inheritance

Inheritance diagram of Option

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.NoNullRangeWarning[source]

Analysis option: Disable null-range warnings for VHDL files at analysis.

Inheritance

Inheritance diagram of NoNullRangeWarning

__init__()[source]

Initializes this option.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.SourceFile(path, parent=None)[source]

A base-class describing any source file (VHDL, Verilog, …) supported by OSVVM Scripts.

Inheritance

Inheritance diagram of SourceFile

Parameters:
  • path (<property object at 0x7fc6f6bed670>)

  • parent (Base[_ParentType] | None)

__init__(path, parent=None)[source]

Initializes a source file.

Parameters:
  • path (<property object at 0x7fc6f6bed670>) – Path to the source file.

  • parent (Base[TypeVar(_ParentType, bound= Base)] | None) – Reference to the parent entity.

Raises:

TypeError – When parameter ‘path’ is not of type pathlib.Path.

Return type:

None

_path: <property object at 0x7fc6f6bed670>

Path to the source file.

property Path: <property object at 0x7fc6f6bed670>

Read-only property to access the path to the sourcefile (_path).

Returns:

The sourcefile’s path.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.XDCConstraintFile(path, scopeToRef, scopeToCell)[source]

Represents an XDC constraint file.

Inheritance

Inheritance diagram of XDCConstraintFile

Parameters:
  • path (Path)

  • scopeToRef (str | None)

  • scopeToCell (str | None)

__init__(path, scopeToRef, scopeToCell)[source]

Initializes an XDC constraint file.

Parameters:
  • path (Path) – Path to the XDC file.

  • scopeToRef (str | None) – Optional, ScopeToRef parameter for Vivado.

  • scopeToCell (str | None) – Optional, ScopeToCell parameter for Vivado.

Raises:
  • TypeError – When parameter ‘scopeToRef’ is not of type string.

  • TypeError – When parameter ‘scopeToCell’ is not of type string.

Return type:

None

_scopeToRef: str | None

Bind this constraint file to a reference within the design (e.g. VHDL entity name).

_scopeToCell: str | None

Bind this constraint file to a cell name within the design.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

property Path: <property object at 0x7fc6f6bed670>

Read-only property to access the path to the sourcefile (_path).

Returns:

The sourcefile’s path.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_parent: _ParentType | None

Reference to a parent object.

_path: <property object at 0x7fc6f6bed670>

Path to the source file.

class pyEDAA.OSVVM.Project.VHDLSourceFile(path, vhdlVersion=2008, vhdlLibrary=None, noNullRangeWarning=None, associatedFiles=None)[source]

Represents a VHDL source file.

Inheritance

Inheritance diagram of VHDLSourceFile

Parameters:
__init__(path, vhdlVersion=2008, vhdlLibrary=None, noNullRangeWarning=None, associatedFiles=None)[source]

Initializes a VHDL source file.

Parameters:
  • path (Path) – Path to the VHDL source file.

  • vhdlVersion (<property object at 0x7fc6f6bed850>) – VHDL language revision used for analysis.

  • vhdlLibrary (VHDLLibrary | None) – Optional, VHDL library all contained design units are compiled into.

  • noNullRangeWarning (bool | None) – Optional, suppress null-range warnings while analyzing.

  • associatedFiles (Iterable[SourceFile] | None) – Optional, list of associated files.

Raises:
Return type:

None

_vhdlVersion: <property object at 0x7fc6f6bed850>

VHDL language revision used for analyzing the file.

_noNullRangeWarning: bool | None

Optional setting, if null-range warnings should be suppressed while analysis.

_associatedFiles: List[SourceFile]

List of associated XDC files.

property VHDLLibrary: VHDLLibrary | None

Read-only property to access the VHDL file’s VHDL library (_parent).

Returns:

The VHDL library this file and its design units is compiled into.

property VHDLVersion: <property object at 0x7fc6f6bed850>

Property to access the VHDL language revision (_vhdlVersion).

Returns:

The used VHDL revision to analyze the file.

property NoNullRangeWarning: bool | None

Property to access the no-null-range-warning option (_noNullRangeWarning).

Returns:

The option’s value.

property AssociatedFiles: List[SourceFile]

Read-only property to access the list of associated files (_associatedFiles).

Returns:

The list of associated files.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

property Path: <property object at 0x7fc6f6bed670>

Read-only property to access the path to the sourcefile (_path).

Returns:

The sourcefile’s path.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_parent: _ParentType | None

Reference to a parent object.

_path: <property object at 0x7fc6f6bed670>

Path to the source file.

class pyEDAA.OSVVM.Project.VHDLLibrary(name, vhdlFiles=None, build=None)[source]

A VHDL library collecting multiple VHDL files containing VHDL design units.

Inheritance

Inheritance diagram of VHDLLibrary

Parameters:
__init__(name, vhdlFiles=None, build=None)[source]

Initializes a VHDL library.

Parameters:
Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

  • TypeError – When parameter ‘build’ is not of type Build.

  • TypeError – When parameter ‘vhdlFiles’ is not an iterable.

  • TypeError – When parameter ‘vhdlFiles’ contains elements not of type VHDLSourceFile.

Return type:

None

_files: List[VHDLSourceFile]

VHDL source files within this VHDL library.

property Build: Build | None

Read-only property to access the build object (_parent).

Returns:

The parent object.

property Files: List[SourceFile]

Read-only property to access the list of VHDl source files in this VHDL library (_files).

Returns:

The list of VHDL source files in this VHDL library.

AddFile(file)[source]

Add a file to this VHDL library.

Parameters:

file (VHDLSourceFile) – VHDL source file to add.

Raises:

TypeError – When parameter ‘file’ is not of type VHDLSourceFile.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_name: str

Name of the entity.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.GenericValue(name, value)[source]

Elaboration option: A generic value for a VHDL top-level entity.

Inheritance

Inheritance diagram of GenericValue

Parameters:
__init__(name, value)[source]

Initializes a generic value.

Parameters:
  • name (str) – Name of the generic.

  • value (str) – Value of the generic.

Raises:
  • TypeError – When parameter ‘name’ us not of type string.

  • TypeError – When parameter ‘value’ us not of type string.

Return type:

None

_name: str

Name of the generic.

_value: str

Value of the generic.

property Name: str

Read-only property to access the generic’s name (_name).

Returns:

The parent object.

property Value: str

Read-only property to access the generic’s value (_value).

Returns:

The parent object.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.ConstraintFile(path, scopeToRef=None, scopeToCell=None)[source]

Associated file option: Associated constraint file for VHDL sourcefiles.

Inheritance

Inheritance diagram of ConstraintFile

Parameters:
  • path (<property object at 0x7fc6f6bedcb0>)

  • scopeToRef (str | None)

  • scopeToCell (str | None)

__init__(path, scopeToRef=None, scopeToCell=None)[source]

Initialize a constraint file option.

Parameters:
  • path (<property object at 0x7fc6f6bedcb0>) – Path to the constraint file.

  • scopeToRef (str | None) – Optional, ScopeToRef binding name.

  • scopeToCell (str | None) – Optional, ScopeToCell binding name.

Raises:
  • TypeError – When parameter ‘path’ is not of type Path.

  • TypeError – When parameter ‘scopeToRef’ is not of type string.

  • TypeError – When parameter ‘scopeToCell’ is not of type string.

Return type:

None

_path: <property object at 0x7fc6f6bedcb0>

Path to the constraint file.

_scopeToRef: str | None

Optional, ScopeToRef binding name.

_scopeToCell: str | None

Optional, ScopeToCell binding name.

property Path: <property object at 0x7fc6f6bedcb0>

Read-only property to access the constraint file’s path (_path).

Returns:

The constraint file’s path.

property ScopeToRef: str | None

Read-only property to access the constraint file’s binding to a reference in the design (_scopeToRef).

Returns:

The ScopeToRef binding.

property ScopeToCell: str | None

Read-only property to access the constraint file’s binding to a reference in the design (_scopeToCell).

Returns:

The ScopeToCell binding.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.ScopeToRef(reference)[source]

Constrain file option: ScopeToRef binding.

Inheritance

Inheritance diagram of ScopeToRef

Parameters:

reference (str)

__init__(reference)[source]

Initialize a ScopeToRef binding.

Parameters:

reference (str) – Reference name.

Raises:

TypeError – When parameter ‘reference’ is not of type string.

Return type:

None

_reference: str

Reference name.

property Reference: str

Read-only property to access the reference name (_reference).

Returns:

The reference name.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.ScopeToCell(cell)[source]

Constrain file option: ScopeToCell binding.

Inheritance

Inheritance diagram of ScopeToCell

Parameters:

cell (str)

__init__(cell)[source]

Initialize a ScopeToCell binding.

Parameters:

cell (str) – Cell name.

Raises:

TypeError – When parameter ‘cell’ is not of type string.

Return type:

None

_cell: str

Cell name

property Cell: str

Read-only property to access the cell name (_cell).

Returns:

The cell name.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.Testcase(name, toplevelName=None, generics=None, testsuite=None)[source]

An OSVVM testcase.

Inheritance

Inheritance diagram of Testcase

Parameters:
__init__(name, toplevelName=None, generics=None, testsuite=None)[source]

Initialize an OSVVM testcase.

Parameters:
  • name (str) – Name of the testcase.

  • toplevelName (str | None) – Optional, name of the toplevel entity or configuration.

  • generics (Iterable[GenericValue] | Mapping[str, str] | None) – Optional, list or dictionary of generic values to run the simulation.

  • testsuite (Testsuite | None) – Optional, reference to the parent testsuite.

Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

  • TypeError – When parameter ‘testsuite’ is not of type Testsuite.

  • TypeError – When parameter ‘toplevelName’ is not of type string.

  • TypeError – When parameter ‘generics’ is not a mapping or iterable.

  • TypeError – When parameter ‘generics’ contains elements not of type GenericValue.

Return type:

None

_toplevelName: str | None

Name of the VHDL simulation toplevel entity or configuration.

_generics: Dict[str, str]

A dictionary of toplevel generic values.

property Testsuite: Testsuite

Read-only property to access the parent testsuite (_parent).

Returns:

The parent testsuite.

property ToplevelName: str

Read-only property to access the testcases toplevel name (_toplevelName).

Returns:

The toplevel name.

property Generics: Dict[str, str]

Read-only property to access the testcase’s toplevel generics (_generics).

Returns:

The dictionary of generic values for this testcase.

SetToplevel(toplevelName)[source]

Set the testcase’s toplevel entity or configuration.

Parameters:

toplevelName (str) – Name of the toplevel.

Raises:

TypeError – When parameter ‘toplevelName’ is not of type string.

Return type:

None

AddGeneric(genericValue)[source]

Add a generic value to this testcase.

Parameters:

genericValue (GenericValue) – Generic value to be added.

Raises:

TypeError – When parameter ‘genericValue’ is not of type GenericValue.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_name: str

Name of the entity.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.Testsuite(name, testcases=None, build=None)[source]

An OSVVM testsuite containing multiple OSVVM testcases.

Inheritance

Inheritance diagram of Testsuite

Parameters:
__init__(name, testcases=None, build=None)[source]

Initialize an OSVVM testsuite.

Parameters:
Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

  • TypeError – When parameter ‘build’ is not of type Build.

  • TypeError – When parameter ‘testcases’ is not an iterable or mapping.

  • TypeError – When parameter ‘testcases’ contains an element not of type Testcase.

Return type:

None

_testcases: Dict[str, Testcase]

Dictionary of testcases.

property Build: Build | None

Read-only property to access the parent build (_parent).

Returns:

The parent build.

property Testcases: Dict[str, Testcase]

Read-only property to access the dictionary of testcases (_testcases).

Returns:

The dictionary of testcases.

AddTestcase(testcase)[source]

Add a testcase to the testsuite.

Parameters:

testcase (Testcase) – Testcase to add.

Raises:

TypeError – When parameter ‘testcase’ is not of type Testcase.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_name: str

Name of the entity.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.BuildName(name)[source]

OSVVM option: Name of a build.

Inheritance

Inheritance diagram of BuildName

Parameters:

name (str)

__init__(name)[source]

Initialize the build name option.

Parameters:

name (str) – Name of the build

Raises:

TypeError – When parameter ‘name’ is not of type string.

Return type:

None

_name: str

Name of the build.

property Name: str

Read-only property to access the build name (_name).

Returns:

Name of the build.

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

class pyEDAA.OSVVM.Project.Build(name, vhdlLibraries=None, testsuites=None, project=None)[source]

An OSVVM build containing one or multiple OSVVM testsuites.

Inheritance

Inheritance diagram of Build

Parameters:
__init__(name, vhdlLibraries=None, testsuites=None, project=None)[source]

Initialize an OSVVM build.

Parameters:
Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

  • TypeError – When parameter ‘project’ is not of type Project.

  • TypeError – When parameter ‘vhdlLibraries’ is not an iterable or mapping.

  • TypeError – When parameter ‘vhdlLibraries’ contains an element not of type VHDLLibrary.

  • TypeError – When parameter ‘testsuites’ is not an iterable or mapping.

  • TypeError – When parameter ‘testsuites’ contains an element not of type Testsuites.

Return type:

None

_includedFiles: List[Path]

List of loaded (included) *.pro files.

_vhdlLibraries: Dict[str, VHDLLibrary]

Dictionary of VHDL libraries.

_testsuites: Dict[str, Testsuite]

Dictionary of testsuites.

property Project: Project | None

Read-only property to access the parent project (_parent).

Returns:

The parent project.

property IncludedFiles: Generator[Path, None, None]

Read-only property to return a generator for all included (loaded) *.pro files (_includedFiles).

Returns:

The sequence of loaded *.pro files.

property VHDLLibraries: Dict[str, VHDLLibrary]

Read-only property to access the dictionary of VHDL libraries (_vhdlLibraries).

Returns:

The dictionary of VHDL libraries.

property Testsuites: Dict[str, Testsuite]

Read-only property to access the dictionary of testsuites (_testsuites).

Returns:

The dictionary of testsuites.

AddVHDLLibrary(vhdlLibrary)[source]

Add a VHDL library to the build.

Parameters:

vhdlLibrary (VHDLLibrary) – VHDL library to add.

Raises:

TypeError – When parameter ‘vhdlLibrary’ is not of type VHDLLibrary.

Return type:

None

AddTestsuite(testsuite)[source]

Add a testsuite to the build.

Parameters:

testsuite (Testsuite) – Testsuite to add.

Raises:

TypeError – When parameter ‘testsuite’ is not of type Testsuite.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_name: str

Name of the entity.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.Project(name, builds=None)[source]

An OSVVM project containing one or multiple OSVVM builds.

Inheritance

Inheritance diagram of Project

Parameters:
__init__(name, builds=None)[source]

Initializes an OSVVM project.

Parameters:
Raises:
  • TypeError – When parameter ‘name’ is not of type string.

  • ValueError – When parameter ‘name’ is empty.

  • TypeError – When parameter ‘builds’ is not an iterable or mapping.

  • TypeError – When parameter ‘builds’ contains an element not of type Build.

Return type:

None

_builds: Dict[str, Build]

Dictionary of builds

property Builds: Dict[str, Build]

Read-only property to access the dictionary of builds (_builds).

Returns:

The dictionary of builds.

property IncludedFiles: Generator[Path, None, None]

Read-only property to return a generator for all included (loaded) *.pro files.

Note

This generator iterates all builds (_builds) and returns a combined generator for all included files.

Returns:

The sequence of loaded *.pro files.

AddBuild(build)[source]

Add a build to the project.

Parameters:

build (Build) – Build to add.

Raises:

TypeError – When parameter ‘build’ is not of type Build.

Return type:

None

__repr__()[source]

Return repr(self).

Return type:

str

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Name: str

Read-only property to access the entity’s name (_name).

Returns:

Name of the entity.

property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_name: str

Name of the entity.

_parent: _ParentType | None

Reference to a parent object.

class pyEDAA.OSVVM.Project.Context[source]

The OSVVM TCL execution context.

When an OSVVM *.pro file is executed, it relies on a context for storing the currently objects and settings. For example the currently used testsuite or the currently set VHDL language revision.

Hint

The context stores the last seen exception within Python scripting in _lastException, because TCL doesn’t forward a raised Python exception through TCL back into the Python context. It just raises a generic TclError. The helper function getException() help to restore the original Python exception using this context object.

Inheritance

Inheritance diagram of Context

__init__()[source]

Initializes a TCL execution context for OSVVM *.pro file processing.

Return type:

None

_processor: OsvvmProFileProcessor

The TCL processor.

classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
Parameters:

predicate (TypeVar(TAttr) | Iterable[TypeVar(TAttr)] | None)

Return type:

Dict[Callable, Tuple[Attribute, ...]]

Returns:

Raises:
property Parent: _ParentType | None

Read-only property to access the parent object reference (_parent).

Returns:

Parent object.

classmethod __class_getitem__()

Parameterizes a generic class.

At least, parameterizing a generic class is the main thing this method does. For example, for some generic class Foo, this is called when we do Foo[int] - there, with cls=Foo and params=int.

However, note that this method is also called when defining generic classes in the first place with class Foo[T]: ….

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

classmethod __init_subclass__()

Function to initialize subclasses.

_parent

Reference to a parent object.

_lastException: Exception | None

Last Python exception seen.

_workingDirectory: Path

The working directory, where the processing started.

_currentDirectory: Path

The virtual working directory, e.g. updated by including other *.pro files.

_includedFiles: List[Path]

A list of used *.pro files.

_vhdlversion: <property object at 0x7fc6f6bee8e0>

The currently set VHDL language revision.

_vhdlLibrary: <property object at 0x7fc6f6bee930> | None

The currently active VHDL library.

_vhdlLibraries: Dict[str, <property object at 0x7fc6f6bee930>]

A dictionary of known VHDL libraries.

_testcase: Testcase | None

The currently active OSVVM testcase.

_testsuite: <property object at 0x7fc6f6bee9d0> | None

The currently active OSVVM testsuite.

_testsuites: Dict[str, <property object at 0x7fc6f6bee9d0>]

A dictionary of known testsuites.

_options: Dict[int, Option]

A dictionary of gathered options.

_build: <property object at 0x7fc6f6beeac0> | None

The currently active OSVVM build.

_builds: Dict[str, <property object at 0x7fc6f6beeac0>]

A dictionary of known OSVVM builds.

Clear()[source]

Clear the TCL execution context.

Return type:

None

property Processor

Read-only property to access the TCL processor (_processor).

Returns:

The TCL processor.

property LastException: Exception | None

Property to access the last seen Python exception (_lastException).

Returns:

The last seen Python exception. This might return None.

property WorkingDirectory: Path

Read-only property to access the working directory (_workingDirectory).

Returns:

The working directory.

property CurrentDirectory: Path

Read-only property to access the current directory (_currentDirectory).

The current directory is a virtual working directory used while processing *.pro files.

Returns:

The current directory.

property VHDLVersion: <property object at 0x7fc6f6bee8e0>

Property to access the VHDL language revision (_vhdlVersion).

Returns:

The currently set VHDL revision.

property IncludedFiles: List[Path]

Read-only property to access list of included *.pro files (_includedFiles).

Returns:

The list of loaded files.

property VHDLLibrary: <property object at 0x7fc6f6bee930>

Read-only property to access the currently active VHDL library (_vhdlLibrary).

Returns:

The active VHDL libraries.

property VHDLLibraries: Dict[str, <property object at 0x7fc6f6bee930>]

Read-only property to access the dictionary of known VHDL libraries (_vhdlLibraries).

Returns:

The dictionary of VHDL libraries.

property Testsuite: <property object at 0x7fc6f6bee9d0>

Read-only property to access the currently active OSVVM testsuite (_testsuite).

Returns:

The active OSVVM testsuite.

property Testsuites: Dict[str, <property object at 0x7fc6f6bee9d0>]

Read-only property to access the dictionary of known OSVVM testsuites (_testsuites).

Returns:

The dictionary of OSVVM testsuites.

property TestCase: Testcase

Read-only property to access the currently active OSVVM testcase (_testcase).

Returns:

The active OSVVM testcase.

property Build: <property object at 0x7fc6f6beeac0>

Read-only property to access the currently active OSVVM build (_build).

Returns:

The active OSVVM build.

property Builds: Dict[str, <property object at 0x7fc6f6beeac0>]

Read-only property to access the dictionary of known OSVVM builds (_build).

Returns:

The dictionary of OSVVM builds.

ToProject(projectName)[source]

Convert the context to an OSVVM project.

Parameters:

projectName (str) – Name of the project.

Return type:

Project

Returns:

OSVVM project.

RaiseException(ex, cause=None)[source]

Raise an exception, but keep a reference to the exception object in the TCL execution context.

Parameters:
Return type:

NoReturn

BeginBuild(buildName)[source]

Begin a new build context within the overall TCL execution context.

Parameters:

buildName (str) – Name of the new build.

Return type:

<property object at 0x7fc6f6beeac0>

Returns:

Currently active OSVVM build object.

Raises:
  • OSVVMException – When a VHDL library has been created outside a build context.

  • OSVVMException – When a OSVVM testsuite has been created outside a build context.

EndBuild()[source]

Finalize the currently active build context.

The TCL execution context is cleaned up: partially reset the context and initialize some fields with new data structures.

Return type:

<property object at 0x7fc6f6beeac0>

Returns:

The OSVVM build object.

IncludeFile(proFileOrBuildDirectory)[source]

Include a specific *.pro file or the *.pro file from an OSVVM build directory.

Hint

An OSVVM build directory is a directory:

  • containing a build.pro file (new style), or

  • containing a *.pro file with the same name as the directory its contained in (old style).

Parameters:

proFileOrBuildDirectory (Path) – The path to the *.pro file or directory containing a *.pro file.
Only relative paths are supported.

Return type:

Path

Returns:

The resolved path to the found *.pro file.

Raises:
  • TypeError – When parameter ‘proFileOrBuildDirectory’ is not of type Path.

  • OSVVMException – When parameter ‘proFileOrBuildDirectory’ contains an absolut path.

  • OSVVMException – When the resolved path doesn’t reference to a *.pro file.

  • OSVVMException – When the resolved path isn’t an OSVVM build directory.

  • OSVVMException – When the resolved path neither references a *.pro file nor an OSVVM build directory.

EvaluateFile(proFile)[source]

Evaluate a *.pro file.

Parameters:

proFile (Path) – OSVVM *.pro file to process.

Return type:

None

SetLibrary(name)[source]

Set or create the currently active VHDL library.

If the VHDL library isn’t known in the current context, create a new VHDL library with the given name.

Parameters:

name (str) – Name of the VHDL library.

Return type:

None

Returns:

Activated VHDL library.

AddVHDLFile(vhdlFile)[source]

Add a VHDL source file to the currently active VHDL library.

The VHDL source file’s VHDL revision is derived from currently active VHDL revision of the TCL execution context.

Note

If there is no active VHDL library in the context, a new VHDL library named default is created.

Parameters:

vhdlFile (VHDLSourceFile) – VHDL source file to be added.

Return type:

None

SetTestsuite(testsuiteName)[source]

Set or create the currently active OSVVM testsuite.

If the testsuite isn’t known in the current context, create a new testsuite with the given name.

Parameters:

testsuiteName (str) – Name of the OSVVM testsuite.

Return type:

None

Returns:

Activated OSVVM testsuite.

AddTestcase(testName)[source]

Create a new testcase and add to the currently active OSVVM testsuite.

Note

If there is no active OSVVM testsuite in the context, a new testsuite named default is created.

Parameters:

testName (str) – Name of the testcase.

Return type:

<property object at 0x7fc6f6beea70>

Returns:

The created OSVVM testcase object.

SetTestcaseToplevel(toplevel)[source]

Set the testcase’s toplevel entity or configuration name.

Parameters:

toplevel (str) – Name of the toplevel entity or configuration.

Return type:

<property object at 0x7fc6f6beea70>

Returns:

The currently active OSVVM testcase.

Raises:

OSVVMException – When there is no active OSVVM testcase.

AddOption(option)[source]

Register a new option and return a unique ID.

Hint

TCL can’t pass complex Python objects through the TCL layer back to Python. Therefore, complex objects like options are registered in a dictionary and a unique ID (integer) is returned. Back in Python, this ID can be converted back to the Python object.

This unique ID is based on id().

Parameters:

option (Option) – Option to register.

Return type:

int

Returns:

Unique option ID.