pyGHDL.dom.PSL
This module contains all DOM classes for VHDL’s design units (context,
architecture, package,
package body, context and
configuration.
Classes
VerificationUnit: Represents a PSL verification unit (vunit).VerificationProperty: Represents a PSL verification property (vprop).VerificationMode: Represents a PSL verification mode (vmode).DefaultClock: Represents a PSL default clock declaration.
Classes
- class pyGHDL.dom.PSL.VerificationUnit(node, identifier)[source]
Inheritance
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
- __new__(**kwargs)
- __str__()[source]
Formats the verification unit declaration.
Format:
vunit myUnit- Return type:
- Returns:
Formatted verification unit declaration.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
- class pyGHDL.dom.PSL.VerificationProperty(node, identifier)[source]
Inheritance
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
- __new__(**kwargs)
- __str__()[source]
Formats the verification property declaration.
Format:
vprop myUnit- Return type:
- Returns:
Formatted verification property declaration.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
- class pyGHDL.dom.PSL.VerificationMode(node, identifier)[source]
Inheritance
- property ContextItems: List[LibraryClause | UseClause | ContextReference]
Read-only property to access the sequence of all context items comprising library, use and context clauses (
_contextItems).- Returns:
Sequence of context items.
- property ContextReferences: List[ContextReference]
Read-only property to access the sequence of context clauses (
_contextReferences).- Returns:
Sequence of context clauses.
- property DependencyVertex: Vertex
Read-only property to access the corresponding dependency vertex (
_dependencyVertex).The dependency vertex references this design unit by its value field.
- Returns:
The corresponding dependency vertex.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property HierarchyVertex: Vertex
Read-only property to access the corresponding hierarchy vertex (
_hierarchyVertex).The hierarchy vertex references this design unit by its value field.
- Returns:
The corresponding hierarchy vertex.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property LibraryReferences: List[LibraryClause]
Read-only property to access the sequence of library clauses (
_libraryReferences).- Returns:
Sequence of library clauses.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property PackageReferences: List[UseClause]
Read-only property to access the sequence of use clauses (
_packageReferences).- Returns:
Sequence of use clauses.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- property ReferencedContexts: Dict[str, Context]
Read-only property to access the referenced contexts (
_referencedContexts).- Returns:
Dictionary of referenced contexts, indexed by normalized identifier.
- property ReferencedLibraries: Dict[str, Library]
Read-only property to access the referenced libraries (
_referencedLibraries).- Returns:
Dictionary of referenced libraries, indexed by normalized identifier.
- property ReferencedPackages: Dict[str, Package]
Read-only property to access the referenced packages (
_referencedPackages).- Returns:
Dictionary of referenced packages, indexed by normalized identifier.
- __new__(**kwargs)
- __str__()[source]
Formats the verification mode declaration.
Format:
vmode myUnit- Return type:
- Returns:
Formatted verification mode declaration.
- _contextItems
List of all context items (library, use and context clauses).
- _contextReferences
List of context clauses.
- _continuesParentRegion = False
Trueif it continues its parent’s declarative region.
- _dependencyVertex
Reference to the vertex in the dependency graph representing the design unit.
This reference is set byCreateDependencyGraph().
- _document
The VHDL library, the design unit was analyzed into.
- _documentation
The associated documentation of a model entity.
- _hierarchyVertex
The vertex in the hierarchy graph
- _identifier
The identifier of a model entity.
- _libraryReferences
List of library clauses.
- _namespace
The namespace of this design unit’s declarative region.
- _normalizedIdentifier
The normalized (lower case) identifier of a model entity.
- _packageReferences
List of use clauses.
- _parent
Reference to a parent entity in the logical model hierarchy.
- _referencedContexts
Referenced contexts based on explicit context references or implicit inheritance
- _referencedLibraries
Referenced libraries based on explicit library clauses or implicit inheritance
- _referencedPackages
Referenced packages based on explicit use clauses or implicit inheritance
- class pyGHDL.dom.PSL.DefaultClock(node, identifier, documentation=None)[source]
Inheritance
- __init__(node, identifier, documentation=None)[source]
Initializes a PSL default clock declaration.
- property Documentation: str | None
Read-only property to access the model entity’s documentation (
_documentation).- Returns:
Associated documentation of a model entity.
- GetAncestor(type)
Return the closest ancestor of the given
typefound by walking the parent chain upwards.Iterates the parent chain - starting at this model entity - upwards (toward the root of the model) until an ancestor of the requested type is found.
- Parameters:
type (
Type) – Class (type) of the ancestor to find.- Return type:
- Returns:
The closest ancestor of the requested type.
- Raises:
VHDLModelException – If the root of the model is reached without finding an ancestor of the requested type.
- classmethod GetMethodsWithAttributes(predicate: TAttr | Iterable[TAttr] | None = None) Dict[Callable, Tuple[Attribute, ...]]
- Parameters:
predicate (
TypeVar(TAttr) |Iterable[TypeVar(TAttr)] |None) – An attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- Returns:
Dictionary of methods and the matching attributes attached to them.
- Raises:
ValueError – If an element of parameter ‘predicate’ is not a sub-class of
Attribute.ValueError – If parameter ‘predicate’ is neither an attribute class nor an iterable of those.
- property Identifier: str
Read-only property to access the model entity’s identifier (
_identifier).- Returns:
Name of a model entity.
- property NormalizedIdentifier: str
Read-only property to access the model entity’s normalized identifier (
_normalizedIdentifier).- Returns:
Normalized name of a model entity.
- property Parent: ModelEntity
Property to access the model entity’s parent element reference in a logical hierarchy (
_parent).- Returns:
Reference to the parent entity.
- property Position: <pyTooling.Decorators.readonly object at 0x7c526738b7d0>
Cached read-only property to access an IIR’s position in source code (
_position).If
_positionis None, resolve the position object from_iirNode- Returns:
The IIR’s position in the source file.
- __str__()[source]
Formats the default clock declaration.
Format:
default clock myClock- Return type:
- Returns:
Formatted default clock declaration.
- _parent: ModelEntity
Reference to a parent entity in the logical model hierarchy.