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*.profile.Named: Base-class for all named classes in the data model reflecting an OSVVM*.profile.Option: Base-class for all options in the data model used within an OSVVM*.profile.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:
<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
*.profile.Inheritance
- Parameters:
parent (_ParentType | 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, ...]]
- 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]: ….
- 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
*.profile.Inheritance
- Parameters:
name (str)
parent (_ParentType | None)
- __init__(name, parent=None)[source]
Initializes the base-class with a parent reference.
- Parameters:
- Raises:
TypeError – When parameter ‘name’ is not of type string.
ValueError – When parameter ‘name’ is empty.
- Return type:
None
- property Name: str
Read-only property to access the entity’s name (
_name).- Returns:
Name of the entity.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- 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
*.profile.Inheritance
- class pyEDAA.OSVVM.Project.NoNullRangeWarning[source]
Analysis option: Disable null-range warnings for VHDL files at analysis.
Inheritance
- class pyEDAA.OSVVM.Project.SourceFile(path, parent=None)[source]
A base-class describing any source file (VHDL, Verilog, …) supported by OSVVM Scripts.
Inheritance
- Parameters:
path (<property object at 0x7fc6f6bed670>)
parent (Base[_ParentType] | None)
- __init__(path, parent=None)[source]
Initializes a source file.
- Parameters:
- 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.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- 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
- __init__(path, scopeToRef, scopeToCell)[source]
Initializes an XDC constraint file.
- Parameters:
- Raises:
- Return type:
None
- _scopeToRef: str | None
Bind this constraint file to a reference within the design (e.g. VHDL entity name).
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- 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
- Parameters:
path (Path)
vhdlVersion (<property object at 0x7fc6f6bed850>)
vhdlLibrary (VHDLLibrary | None)
noNullRangeWarning (bool | None)
associatedFiles (Iterable[SourceFile] | None)
- __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:
TypeError – When parameter ‘vhdlLibrary’ is not of type
VHDLLibrary.TypeError – When parameter ‘vhdlversion’ is not of type
VHDLVersion.TypeError – When parameter ‘noNullRangeWarning’ is not of type boolean.
- 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.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- 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
- Parameters:
name (str)
vhdlFiles (Iterable[VHDLSourceFile] | None)
build (Build | None)
- __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 ‘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:
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _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
- 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.
- class pyEDAA.OSVVM.Project.ConstraintFile(path, scopeToRef=None, scopeToCell=None)[source]
Associated file option: Associated constraint file for VHDL sourcefiles.
Inheritance
- Parameters:
- __init__(path, scopeToRef=None, scopeToCell=None)[source]
Initialize a constraint file option.
- Parameters:
- Raises:
- Return type:
None
- _path: <property object at 0x7fc6f6bedcb0>
Path to the constraint file.
- 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
ScopeToRefbinding.
- property ScopeToCell: str | None
Read-only property to access the constraint file’s binding to a reference in the design (
_scopeToCell).- Returns:
The
ScopeToCellbinding.
- class pyEDAA.OSVVM.Project.ScopeToRef(reference)[source]
Constrain file option: ScopeToRef binding.
Inheritance
- Parameters:
reference (str)
- property Reference: str
Read-only property to access the reference name (
_reference).- Returns:
The reference name.
- class pyEDAA.OSVVM.Project.ScopeToCell(cell)[source]
Constrain file option: ScopeToCell binding.
Inheritance
- Parameters:
cell (str)
- class pyEDAA.OSVVM.Project.Testcase(name, toplevelName=None, generics=None, testsuite=None)[source]
An OSVVM testcase.
Inheritance
- 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
- 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.
- 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:
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _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
- 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 ‘testcases’ is not an iterable or mapping.
TypeError – When parameter ‘testcases’ contains an element not of type
Testcase.
- Return type:
None
- 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.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _parent: _ParentType | None
Reference to a parent object.
- class pyEDAA.OSVVM.Project.BuildName(name)[source]
OSVVM option: Name of a build.
Inheritance
- Parameters:
name (str)
- property Name: str
Read-only property to access the build name (
_name).- Returns:
Name of the build.
- class pyEDAA.OSVVM.Project.Build(name, vhdlLibraries=None, testsuites=None, project=None)[source]
An OSVVM build containing one or multiple OSVVM testsuites.
Inheritance
- Parameters:
- __init__(name, vhdlLibraries=None, testsuites=None, project=None)[source]
Initialize an OSVVM build.
- Parameters:
name (
str) – Name of the build.vhdlLibraries (
Iterable[VHDLLibrary] |Mapping[str,VHDLLibrary] |None) – Optional, list or dictionary of VHDL libraries.testsuites (
Iterable[Testsuite] |Mapping[str,Testsuite] |None) – Optional, list or dictionary of OSVVM testsuites.project (
Base|None) – Optional, reference to the parent project.
- 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
- _vhdlLibraries: Dict[str, VHDLLibrary]
Dictionary of VHDL libraries.
- 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)
*.profiles (_includedFiles).- Returns:
The sequence of loaded
*.profiles.
- 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:
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _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
- __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
- 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)
*.profiles.Note
This generator iterates all builds (
_builds) and returns a combined generator for all included files.- Returns:
The sequence of loaded
*.profiles.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _parent: _ParentType | None
Reference to a parent object.
- class pyEDAA.OSVVM.Project.Context[source]
The OSVVM TCL execution context.
When an OSVVM
*.profile 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 genericTclError. The helper functiongetException()help to restore the original Python exception using this context object.Inheritance
- __init__()[source]
Initializes a TCL execution context for OSVVM
*.profile processing.- Return type:
None
- _processor: OsvvmProFileProcessor
The TCL processor.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- 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]: ….
- classmethod __init_subclass__()
Function to initialize subclasses.
- _parent
Reference to a parent object.
- _currentDirectory: Path
The virtual working directory, e.g. updated by including other
*.profiles.
- _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.
- _testsuite: <property object at 0x7fc6f6bee9d0> | None
The currently active OSVVM testsuite.
- _testsuites: Dict[str, <property object at 0x7fc6f6bee9d0>]
A dictionary of known testsuites.
- _build: <property object at 0x7fc6f6beeac0> | None
The currently active OSVVM build.
- _builds: Dict[str, <property object at 0x7fc6f6beeac0>]
A dictionary of known OSVVM builds.
- 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
*.profiles.- 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
*.profiles (_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.
- RaiseException(ex, cause=None)[source]
Raise an exception, but keep a reference to the exception object in the TCL execution context.
- 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
*.profile or the*.profile from an OSVVM build directory.Hint
An OSVVM build directory is a directory:
containing a
build.profile (new style), orcontaining a
*.profile with the same name as the directory its contained in (old style).
- Parameters:
proFileOrBuildDirectory (
Path) – The path to the*.profile or directory containing a*.profile.
Only relative paths are supported.- Return type:
- Returns:
The resolved path to the found
*.profile.- 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
*.profile.OSVVMException – When the resolved path isn’t an OSVVM build directory.
OSVVMException – When the resolved path neither references a
*.profile nor an OSVVM build directory.
- 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.
- 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
defaultis created.- Parameters:
vhdlFile (
VHDLSourceFile) – VHDL source file to be added.- Return type:
- 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.
- 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
defaultis 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().