pyGHDL.dom.DesignUnit

This module contains all DOM classes for VHDL’s design units (context, architecture, package, package body, context and configuration.

Classes


Classes

class pyGHDL.dom.DesignUnit.LibraryClause(libraryNode, symbols)[source]

Represents a library clause.

Example

library std, ieee;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.LibraryClause.

Inheritance

Inheritance diagram of LibraryClause

Parameters:
__init__(libraryNode, symbols)[source]

Initializes a library clause.

Parameters:
  • libraryNode (TypeVar(Iir, bound= c_int)) – The IIR node of the library clause.

  • symbols (Iterable[Symbol]) – A list of symbols this reference references to.

Return type:

None

_iirNode: Iir

The IIR node in libghdl’s tree this DOM object was translated from.

_position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

The IIR node’s position in the source file, resolved on first access and then cached.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Symbols: List[LibraryReferenceSymbol]

Read-only property to access the symbols this library clause references to (_symbols).

Returns:

A list of library reference symbols.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_symbols: List[Symbol]

List of all symbols referenced by this clause.

class pyGHDL.dom.DesignUnit.UseClause(useNode, symbols)[source]

Represents a use clause.

Example

use std.text_io.all, ieee.numeric_std.all;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.UseClause.

Inheritance

Inheritance diagram of UseClause

Parameters:
__init__(useNode, symbols)[source]

Initializes a use clause.

Parameters:
  • useNode (TypeVar(Iir, bound= c_int)) – The IIR node of the use clause.

  • symbols (Iterable[Symbol]) – A list of symbols this reference references to.

Return type:

None

classmethod parse(useNode)[source]

Translates the IIR node of the use clause to an UseClause.

Parameters:

useNode (TypeVar(Iir, bound= c_int)) – The IIR node of the use clause.

Returns:

The translated use clause.

_iirNode: Iir

The IIR node in libghdl’s tree this DOM object was translated from.

_position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

The IIR node’s position in the source file, resolved on first access and then cached.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Symbols: List[Symbol]

Read-only property to access the symbols this reference references to (_symbols).

Returns:

A list of symbols.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_symbols: List[Symbol]

List of all symbols referenced by this clause.

class pyGHDL.dom.DesignUnit.ContextReference(contextNode, symbols)[source]

Represents a context reference.

Hint

It’s called context reference not context clause by the LRM.

Example

context ieee.ieee_std_context;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.ContextReference.

Inheritance

Inheritance diagram of ContextReference

Parameters:
__init__(contextNode, symbols)[source]

Initializes a context reference.

Parameters:
  • contextNode (TypeVar(Iir, bound= c_int)) – The IIR node of the context reference.

  • symbols (Iterable[Symbol]) – A list of symbols this reference references to.

Return type:

None

classmethod parse(contextNode)[source]

Translates the IIR node of the context to a ContextReference.

Parameters:

contextNode (TypeVar(Iir, bound= c_int)) – The IIR node of the context.

Returns:

The translated context.

_iirNode: Iir

The IIR node in libghdl’s tree this DOM object was translated from.

_position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

The IIR node’s position in the source file, resolved on first access and then cached.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Symbols: List[Symbol]

Read-only property to access the symbols this reference references to (_symbols).

Returns:

A list of symbols.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_symbols: List[Symbol]

List of all symbols referenced by this clause.

class pyGHDL.dom.DesignUnit.Entity(node, identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None)[source]

Represents an entity declaration.

Example

entity ent is
  -- ...
end entity;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Entity.

Inheritance

Inheritance diagram of Entity

Parameters:
__init__(node, identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None)[source]

Initializes an entity declaration.

Parameters:
Return type:

None

classmethod parse(entityNode, contextItems)[source]

Translates the IIR node of the entity declaration to an Entity.

Parameters:
Returns:

The translated entity declaration.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property AllowBlackbox: bool

Property to return whether a design supports blackboxes, inherited from the parent if not set locally (_allowBlackbox).

Algorithm

  1. If allow blackbox property is locally set, return the local value,

  2. Otherwise, return allow blackbox value from parent object.

Returns:

True, if blackboxes are allowed.

Raises:

VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.

property Architectures: Dict[str, Architecture]

Read-only property to access the architectures (_architectures).

Returns:

Dictionary of architectures, indexed by normalized identifier.

property Components: Dict[str, Any]

Read-only property to access the components (_components).

Returns:

Dictionary of components, indexed by normalized identifier.

property Constants: Dict[str, Constant]

Read-only property to access the constants (_constants).

Returns:

Dictionary of constants, indexed by normalized identifier.

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 DeclaredItems: List

Read-only property to access the declared items (_declaredItems).

Returns:

List of declared items.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Files: Dict[str, File]

Read-only property to access the files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

property Functions: Dict[str, List[Function]]

Read-only property to access the functions (_functions).

Returns:

Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.

property GenericCount: int

Read-only property to return the number of generics in _genericItems.

Returns:

The generic count.

property GenericItems: List[GenericInterfaceItemMixin]

Read-only property to access the generic items (_genericItems).

Returns:

List of generic items.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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.

IndexDeclaredItems()[source]

An entity’s generics and ports share the declarative region of its declarative part.

Return type:

None

property Library: Library

Property to access the library (_parent).

Returns:

The library.

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 PortCount: int

Read-only property to return the number of ports in _portItems.

Returns:

The port count.

property PortItems: List[PortInterfaceItemMixin]

Read-only property to access the port items (_portItems).

Returns:

List of port items.

property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedures: Dict[str, List[Procedure]]

Read-only property to access the procedures (_procedures).

Returns:

Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.

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.

property SharedVariables: Dict[str, SharedVariable]

Read-only property to access the shared variables (_sharedVariables).

Returns:

Dictionary of shared variables, indexed by normalized identifier.

property Signals: Dict[str, Signal]

Read-only property to access the signals (_signals).

Returns:

Dictionary of signals, indexed by normalized identifier.

property Statements: List[ConcurrentStatement]

Read-only property to access the statements (_statements).

Returns:

List of statements.

property Subtypes: Dict[str, Subtype]

Read-only property to access the subtypes (_subtypes).

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

Read-only property to access the types (_types).

Returns:

Dictionary of types, indexed by normalized identifier.

_IndexGenericItems()

Add this region’s generics to its namespace.

Return type:

None

_IndexOtherDeclaredItem(item)

Hook for declared items the region doesn’t handle itself. Derived classes may override it.

Return type:

None

_IndexParameterItems()

Add this region’s parameters to its namespace.

Return type:

None

_IndexPortItems()

Add this region’s ports to its namespace.

Return type:

None

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()[source]

Formats a representation of the entity declaration.

Format: mylib.myEntity(rtl, sim)

Return type:

str

Returns:

String representation of the entity declaration.

__str__()[source]

Formats the entity declaration.

Format: Entity: 'mylib.myEntity(rtl, sim)'

The parenthesis lists the known architectures, or ? if there are none.

Return type:

str

Returns:

Formatted entity declaration.

_allowBlackbox

Allow blackboxes for components in language entity.

_architectures

Dictionary of all architectures of this entity, indexed by name.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = False

True if it continues its parent’s declarative region.

_declaredItems

List of all declared items in this concurrent declaration region.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_files

Dictionary of all files declared in this concurrent declaration region.

_functions

Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_genericItems

List of all generics, in declaration order.

_hierarchy

All elements creating a hierarchy level (blocks and generates), in declaration order.

_hierarchyVertex

The vertex in the hierarchy graph

_identifier

The identifier of a model entity.

_instantiations

All instantiations, indexed by label.

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

_portItems

List of all ports, in declaration order.

_procedures

Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_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

_sharedVariables

Dictionary of all shared variables declared in this concurrent declaration region.

_signals

Dictionary of all signals declared in this concurrent declaration region.

_statements

List of all concurrent statements in this construct.

_subtypes

Dictionary of all subtypes declared in this concurrent declaration region.

_types

Dictionary of all types declared in this concurrent declaration region.

class pyGHDL.dom.DesignUnit.Architecture(node, identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None)[source]

Represents an architecture declaration.

Example

architecture rtl of ent is
  -- ...
begin
  -- ...
end architecture;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Architecture.

Inheritance

Inheritance diagram of Architecture

Parameters:
__init__(node, identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None)[source]

Initializes an architecture declaration.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – The architecture’s identifier.

  • entity (EntitySymbol) – Reference to the entity this architecture implements.

  • contextItems (Iterable[LibraryClause | UseClause | ContextReference]) – List of all context items (library, use and context clauses).

  • declaredItems (Iterable) – List of all declared items in this concurrent declaration region.

  • statements (Iterable[ConcurrentStatement]) – List of all concurrent statements in this construct.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(architectureNode, contextItems)[source]

Translates the IIR node of the architecture body to an Architecture.

Parameters:
Returns:

The translated architecture body.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property AllowBlackbox: bool

Property to return whether a design supports blackboxes, inherited from the parent if not set locally (_allowBlackbox).

Algorithm

  1. If allow blackbox property is locally set, return the local value,

  2. Otherwise, return allow blackbox value from parent object.

Returns:

True, if blackboxes are allowed.

Raises:

VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.

property Components: Dict[str, Any]

Read-only property to access the components (_components).

Returns:

Dictionary of components, indexed by normalized identifier.

property Constants: Dict[str, Constant]

Read-only property to access the constants (_constants).

Returns:

Dictionary of constants, indexed by normalized identifier.

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 DeclaredItems: List

Read-only property to access the declared items (_declaredItems).

Returns:

List of declared items.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Entity: EntitySymbol

Read-only property to access the entity (_entity).

Returns:

The entity.

property Files: Dict[str, File]

Read-only property to access the files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

property Functions: Dict[str, List[Function]]

Read-only property to access the functions (_functions).

Returns:

Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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.

IndexDeclaredItems()

Index declared items listed in the concurrent declaration region.

Return type:

None

Algorithm

  1. Iterate all declared items:

See also

pyVHDLModel.Design.IndexPackages()

Iterate all packages in the design and index declared items.

pyVHDLModel.Library.IndexPackages()

Iterate all packages in the library and index declared items.

pyVHDLModel.Library._IndexOtherDeclaredItem()

Iterate all packages in the library and index declared items.

property Library: Library

Property to access the library (_parent).

Returns:

The library.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedures: Dict[str, List[Procedure]]

Read-only property to access the procedures (_procedures).

Returns:

Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.

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.

property SharedVariables: Dict[str, SharedVariable]

Read-only property to access the shared variables (_sharedVariables).

Returns:

Dictionary of shared variables, indexed by normalized identifier.

property Signals: Dict[str, Signal]

Read-only property to access the signals (_signals).

Returns:

Dictionary of signals, indexed by normalized identifier.

property Statements: List[ConcurrentStatement]

Read-only property to access the statements (_statements).

Returns:

List of statements.

property Subtypes: Dict[str, Subtype]

Read-only property to access the subtypes (_subtypes).

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

Read-only property to access the types (_types).

Returns:

Dictionary of types, indexed by normalized identifier.

_IndexGenericItems()

Add this region’s generics to its namespace.

Return type:

None

_IndexOtherDeclaredItem(item)

Hook for declared items the region doesn’t handle itself. Derived classes may override it.

Return type:

None

_IndexParameterItems()

Add this region’s parameters to its namespace.

Return type:

None

_IndexPortItems()

Add this region’s ports to its namespace.

Return type:

None

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()[source]

Formats a representation of the architecture declaration.

Format: mylib.myEntity(rtl)

Return type:

str

Returns:

String representation of the architecture declaration.

__str__()[source]

Formats the architecture declaration.

Format: Architecture: mylib.myEntity(rtl)

Return type:

str

Returns:

Formatted architecture declaration.

_allowBlackbox

Allow blackboxes for components in language entity.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = True

An architecture continues its entity’s declarative region.

_declaredItems

List of all declared items in this concurrent declaration region.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_entity

Reference to the entity this architecture implements.

_files

Dictionary of all files declared in this concurrent declaration region.

_functions

Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_hierarchy

All elements creating a hierarchy level (blocks and generates), in declaration order.

_hierarchyVertex

The vertex in the hierarchy graph

_identifier

The identifier of a model entity.

_instantiations

All instantiations, indexed by label.

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

_procedures

Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_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

_sharedVariables

Dictionary of all shared variables declared in this concurrent declaration region.

_signals

Dictionary of all signals declared in this concurrent declaration region.

_statements

List of all concurrent statements in this construct.

_subtypes

Dictionary of all subtypes declared in this concurrent declaration region.

_types

Dictionary of all types declared in this concurrent declaration region.

class pyGHDL.dom.DesignUnit.Component(node, identifier, genericItems=None, portItems=None, documentation=None)[source]

Represents a component declaration.

Example

component ent is
  -- ...
end component;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Component.

Inheritance

Inheritance diagram of Component

Parameters:
__init__(node, identifier, genericItems=None, portItems=None, documentation=None)[source]

Initializes a component declaration.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – The component’s identifier.

  • genericItems (Iterable[GenericInterfaceItemMixin]) – List of all generics of this component, in declaration order.

  • portItems (Iterable[PortInterfaceItemMixin]) – List of all ports of this component, in declaration order.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(componentNode)[source]

Translates the IIR node of the component declaration to a Component.

Parameters:

componentNode (TypeVar(Iir, bound= c_int)) – The IIR node of the component declaration.

Returns:

The translated component declaration.

_iirNode: Iir

The IIR node in libghdl’s tree this DOM object was translated from.

_position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

The IIR node’s position in the source file, resolved on first access and then cached.

property AllowBlackbox: bool

Property to return whether a design supports blackboxes, inherited from the parent if not set locally (_allowBlackbox).

Algorithm

  1. If allow blackbox property is locally set, return the local value,

  2. Otherwise, return allow blackbox value from parent object.

Returns:

True, if blackboxes are allowed.

Raises:

VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Entity: <property object at 0x7d2df1112a70> | None

Property to access the entity (_entity).

Returns:

The entity, or None if not set.

property GenericItems: List[GenericInterfaceItemMixin]

Read-only property to access the generic items (_genericItems).

Returns:

List of generic items.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 IsBlackbox: bool | None

Check if the component is a blackbox (_isBlackbox).

If components were not linked to matching entities, this property returns None.

Returns:

True, if the component is a blackbox; False, if it is not; None, if components were not linked to entities yet.

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 PortItems: List[PortInterfaceItemMixin]

Read-only property to access the port items (_portItems).

Returns:

List of port items.

property Position: <pyTooling.Decorators.readonly object at 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__repr__()[source]

Formats a representation of the component declaration.

Format: mylib.myPackage:myComponent

Return type:

str

Returns:

String representation of the component declaration.

__str__()[source]

Formats the component declaration.

Format: Component: myComponent

Return type:

str

Returns:

Formatted component declaration.

_allowBlackbox: bool | None

Allow blackboxes for components in language entity.

_documentation: str | None

The associated documentation of a model entity.

_entity: <property object at 0x7d2df1112a70> | None

Linked entity, or None if unresolved.

_genericItems: List[GenericInterfaceItemMixin]

List of all generics of this component, in declaration order.

_identifier: str

The identifier of a model entity.

_isBlackbox: bool | None

Component is a blackbox.

_normalizedIdentifier: str

The normalized (lower case) identifier of a model entity.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_portItems: List[PortInterfaceItemMixin]

List of all ports of this component, in declaration order.

class pyGHDL.dom.DesignUnit.Package(node, identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None)[source]

Represents a package declaration.

Example

package pkg is
  -- ...
end package;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Package.

Inheritance

Inheritance diagram of Package

Parameters:
__init__(node, identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None)[source]

Initialize a package.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – Name of the VHDL package.

  • contextItems (Iterable[LibraryClause | UseClause | ContextReference]) – List of all context items (library, use and context clauses).

  • genericItems (Iterable[GenericInterfaceItemMixin]) – List of all generics, in declaration order.

  • declaredItems (Iterable) – List of all declared items in this concurrent declaration region.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(packageNode, contextItems)[source]

Translates the IIR node of the package declaration to a Package.

Parameters:
Returns:

The translated package declaration.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property AllowBlackbox: bool

Property to return whether a design supports blackboxes, inherited from the parent if not set locally (_allowBlackbox).

Algorithm

  1. If allow blackbox property is locally set, return the local value,

  2. Otherwise, return allow blackbox value from parent object.

Returns:

True, if blackboxes are allowed.

Raises:

VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.

property Components: Dict[str, Component]

Read-only property to access the components (_components).

Returns:

Dictionary of components, indexed by normalized identifier.

property Constants: Dict[str, Constant]

Read-only property to access the constants (_constants).

Returns:

Dictionary of constants, indexed by normalized identifier.

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 DeclaredItems: List

Read-only property to access the declared items (_declaredItems).

Returns:

List of declared items.

property DeferredConstants: Dict[str, DeferredConstant]

Read-only property to access the deferred constants (_deferredConstants).

Returns:

Dictionary of deferred constants, indexed by normalized identifier.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Files: Dict[str, File]

Read-only property to access the files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

property Functions: Dict[str, List[Function]]

Read-only property to access the functions (_functions).

Returns:

Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.

property GenericCount: int

Read-only property to return the number of generics in _genericItems.

Returns:

The generic count.

property GenericItems: List[GenericInterfaceItemMixin]

Read-only property to access the generic items (_genericItems).

Returns:

List of generic items.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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.

IndexDeclaredItems()[source]

A generic package’s generics share the declarative region of its declarative part.

Return type:

None

property Library: Library

Property to access the library (_parent).

Returns:

The library.

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 PackageBody: PackageBody | None

Read-only property to access the package body (_packageBody).

Returns:

The package body, or None if not set.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedures: Dict[str, List[Procedure]]

Read-only property to access the procedures (_procedures).

Returns:

Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.

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.

property SharedVariables: Dict[str, SharedVariable]

Read-only property to access the shared variables (_sharedVariables).

Returns:

Dictionary of shared variables, indexed by normalized identifier.

property Signals: Dict[str, Signal]

Read-only property to access the signals (_signals).

Returns:

Dictionary of signals, indexed by normalized identifier.

property Subtypes: Dict[str, Subtype]

Read-only property to access the subtypes (_subtypes).

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

Read-only property to access the types (_types).

Returns:

Dictionary of types, indexed by normalized identifier.

_IndexGenericItems()

Add this region’s generics to its namespace.

Return type:

None

_IndexOtherDeclaredItem(item)[source]

Hook for declared items the region doesn’t handle itself. Derived classes may override it.

Return type:

None

_IndexParameterItems()

Add this region’s parameters to its namespace.

Return type:

None

_IndexPortItems()

Add this region’s ports to its namespace.

Return type:

None

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()[source]

Formats a representation of the package declaration.

Format: mylib.myPackage

Return type:

str

Returns:

String representation of the package declaration.

__str__()[source]

Formats the package declaration.

Format: Package: 'mylib.myPackage'

Return type:

str

Returns:

Formatted package declaration.

_allowBlackbox

Allow blackboxes for components in language entity.

_components

Components, indexed by name.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = False

True if it continues its parent’s declarative region.

_declaredItems

List of all declared items in this concurrent declaration region.

_deferredConstants

Deferred constants, indexed by name.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_files

Dictionary of all files declared in this concurrent declaration region.

_functions

Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_genericItems

List of all generics, in declaration order.

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

_packageBody

The corresponding package body, or None if none was analyzed.

_packageReferences

List of use clauses.

_parent

Reference to a parent entity in the logical model hierarchy.

_procedures

Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_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

_sharedVariables

Dictionary of all shared variables declared in this concurrent declaration region.

_signals

Dictionary of all signals declared in this concurrent declaration region.

_subtypes

Dictionary of all subtypes declared in this concurrent declaration region.

_types

Dictionary of all types declared in this concurrent declaration region.

class pyGHDL.dom.DesignUnit.PackageBody(node, packageSymbol, contextItems=None, declaredItems=None, documentation=None)[source]

Represents a package body declaration.

Example

package body pkg is
  -- ...
end package body;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.PackageBody.

Inheritance

Inheritance diagram of PackageBody

Parameters:
__init__(node, packageSymbol, contextItems=None, declaredItems=None, documentation=None)[source]

Initializes a package body declaration.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • packageSymbol (PackageSymbol) – Reference to the package this body implements.

  • contextItems (Iterable[LibraryClause | UseClause | ContextReference]) – List of all context items (library, use and context clauses).

  • declaredItems (Iterable) – List of all declared items in this concurrent declaration region.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(packageBodyNode, contextItems)[source]

Translates the IIR node of the package body to a PackageBody.

Parameters:
Returns:

The translated package body.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property Components: Dict[str, Any]

Read-only property to access the components (_components).

Returns:

Dictionary of components, indexed by normalized identifier.

property Constants: Dict[str, Constant]

Read-only property to access the constants (_constants).

Returns:

Dictionary of constants, indexed by normalized identifier.

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 DeclaredItems: List

Read-only property to access the declared items (_declaredItems).

Returns:

List of declared items.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Files: Dict[str, File]

Read-only property to access the files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

property Functions: Dict[str, List[Function]]

Read-only property to access the functions (_functions).

Returns:

Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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.

IndexDeclaredItems()

Index declared items listed in the concurrent declaration region.

Return type:

None

Algorithm

  1. Iterate all declared items:

See also

pyVHDLModel.Design.IndexPackages()

Iterate all packages in the design and index declared items.

pyVHDLModel.Library.IndexPackages()

Iterate all packages in the library and index declared items.

pyVHDLModel.Library._IndexOtherDeclaredItem()

Iterate all packages in the library and index declared items.

property Library: Library

Property to access the library (_parent).

Returns:

The library.

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 Package: PackageSymbol

Read-only property to access the package (_package).

Returns:

The package.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedures: Dict[str, List[Procedure]]

Read-only property to access the procedures (_procedures).

Returns:

Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.

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.

property SharedVariables: Dict[str, SharedVariable]

Read-only property to access the shared variables (_sharedVariables).

Returns:

Dictionary of shared variables, indexed by normalized identifier.

property Signals: Dict[str, Signal]

Read-only property to access the signals (_signals).

Returns:

Dictionary of signals, indexed by normalized identifier.

property Subtypes: Dict[str, Subtype]

Read-only property to access the subtypes (_subtypes).

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

Read-only property to access the types (_types).

Returns:

Dictionary of types, indexed by normalized identifier.

_IndexGenericItems()

Add this region’s generics to its namespace.

Return type:

None

_IndexOtherDeclaredItem(item)

Hook for declared items the region doesn’t handle itself. Derived classes may override it.

Return type:

None

_IndexParameterItems()

Add this region’s parameters to its namespace.

Return type:

None

_IndexPortItems()

Add this region’s ports to its namespace.

Return type:

None

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()[source]

Formats a representation of the package body declaration.

Format: mylib.myPackage(body)

Return type:

str

Returns:

String representation of the package body declaration.

__str__()[source]

Formats the package body declaration.

Format: Package Body: mylib.myPackage(body)

Return type:

str

Returns:

Formatted package body declaration.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = True

A package body continues its package’s declarative region.

_declaredItems

List of all declared items in this concurrent declaration region.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_files

Dictionary of all files declared in this concurrent declaration region.

_functions

Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

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

_package

Reference to the package this body implements.

_packageReferences

List of use clauses.

_parent

Reference to a parent entity in the logical model hierarchy.

_procedures

Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_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

_sharedVariables

Dictionary of all shared variables declared in this concurrent declaration region.

_signals

Dictionary of all signals declared in this concurrent declaration region.

_subtypes

Dictionary of all subtypes declared in this concurrent declaration region.

_types

Dictionary of all types declared in this concurrent declaration region.

class pyGHDL.dom.DesignUnit.PackageInstantiation(node, identifier, uninstantiatedPackageName, contextItems=None, genericAssociationItems=None, documentation=None)[source]

Represents the instantiation of a generic package.

Example

package p is new gp generic map (N => 1);
--      ^                                   <- Identifier
--               ^^                         <- PackageReference

This class implements a pyGHDL.dom object derived from pyVHDLModel.Instantiation.PackageInstantiation.

Inheritance

Inheritance diagram of PackageInstantiation

Parameters:
__init__(node, identifier, uninstantiatedPackageName, contextItems=None, genericAssociationItems=None, documentation=None)[source]

Initializes a package instantiation.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – The instantiated package’s identifier.

  • uninstantiatedPackageName (Symbol) – The name of the uninstantiated generic package.

  • contextItems (Iterable[LibraryClause | UseClause | ContextReference]) – List of all context items (library, use and context clauses).

  • genericAssociationItems (Iterable[GenericAssociationItem]) – List of all generic associations in the generic map aspect.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(packageNode, contextItems=None)[source]

Translates the IIR node of the package declaration to a PackageInstantiation.

Parameters:
Returns:

The translated package declaration.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property AllowBlackbox: bool

Property to return whether a design supports blackboxes, inherited from the parent if not set locally (_allowBlackbox).

Algorithm

  1. If allow blackbox property is locally set, return the local value,

  2. Otherwise, return allow blackbox value from parent object.

Returns:

True, if blackboxes are allowed.

Raises:

VHDLModelException – If neither a local value is set nor a parent object is available to inherit the value from.

property Components: Dict[str, Component]

Read-only property to access the components (_components).

Returns:

Dictionary of components, indexed by normalized identifier.

property Constants: Dict[str, Constant]

Read-only property to access the constants (_constants).

Returns:

Dictionary of constants, indexed by normalized identifier.

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 DeclaredItems: List

Read-only property to access the declared items (_declaredItems).

Returns:

List of declared items.

property DeferredConstants: Dict[str, DeferredConstant]

Read-only property to access the deferred constants (_deferredConstants).

Returns:

Dictionary of deferred constants, indexed by normalized identifier.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Files: Dict[str, File]

Read-only property to access the files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

property Functions: Dict[str, List[Function]]

Read-only property to access the functions (_functions).

Returns:

Dictionary of functions, indexed by normalized identifier; each entry is a list of overloads.

property GenericAssociationItems: List[GenericAssociationItem]

Read-only property to access the generic associations (_genericAssociationItems).

Returns:

List of generic association items.

property GenericCount: int

Read-only property to return the number of generics in _genericItems.

Returns:

The generic count.

property GenericItems: List[GenericInterfaceItemMixin]

Read-only property to access the generic items (_genericItems).

Returns:

List of generic items.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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.

IndexDeclaredItems()

A generic package’s generics share the declarative region of its declarative part.

Return type:

None

property Library: Library

Property to access the library (_parent).

Returns:

The library.

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 PackageBody: PackageBody | None

Read-only property to access the package body (_packageBody).

Returns:

The package body, or None if not set.

property PackageReference: PackageReferenceSymbol

Read-only property to access the package reference (_packageReference).

Returns:

The package reference.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedures: Dict[str, List[Procedure]]

Read-only property to access the procedures (_procedures).

Returns:

Dictionary of procedures, indexed by normalized identifier; each entry is a list of overloads.

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.

property SharedVariables: Dict[str, SharedVariable]

Read-only property to access the shared variables (_sharedVariables).

Returns:

Dictionary of shared variables, indexed by normalized identifier.

property Signals: Dict[str, Signal]

Read-only property to access the signals (_signals).

Returns:

Dictionary of signals, indexed by normalized identifier.

property Subtypes: Dict[str, Subtype]

Read-only property to access the subtypes (_subtypes).

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

Read-only property to access the types (_types).

Returns:

Dictionary of types, indexed by normalized identifier.

_IndexGenericItems()

Add this region’s generics to its namespace.

Return type:

None

_IndexOtherDeclaredItem(item)

Hook for declared items the region doesn’t handle itself. Derived classes may override it.

Return type:

None

_IndexParameterItems()

Add this region’s parameters to its namespace.

Return type:

None

_IndexPortItems()

Add this region’s ports to its namespace.

Return type:

None

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()

Formats a representation of the package declaration.

Format: mylib.myPackage

Return type:

str

Returns:

String representation of the package declaration.

__str__()

Formats the package declaration.

Format: Package: 'mylib.myPackage'

Return type:

str

Returns:

Formatted package declaration.

_allowBlackbox

Allow blackboxes for components in language entity.

_components

Components, indexed by name.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = False

True if it continues its parent’s declarative region.

_declaredItems

List of all declared items in this concurrent declaration region.

_deferredConstants

Deferred constants, indexed by name.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_files

Dictionary of all files declared in this concurrent declaration region.

_functions

Dictionary of all functions declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_genericAssociationItems

List of all generic associations.

_genericItems

List of all generics, in declaration order.

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

_packageBody

The corresponding package body, or None if none was analyzed.

_packageReference

Reference to the instantiated generic package.

_packageReferences

List of use clauses.

_parent

Reference to a parent entity in the logical model hierarchy.

_procedures

Dictionary of all procedures declared in this concurrent declaration region, indexed by name; each entry is a list of overloads.

_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

_sharedVariables

Dictionary of all shared variables declared in this concurrent declaration region.

_signals

Dictionary of all signals declared in this concurrent declaration region.

_subtypes

Dictionary of all subtypes declared in this concurrent declaration region.

_types

Dictionary of all types declared in this concurrent declaration region.

class pyGHDL.dom.DesignUnit.Context(node, identifier, references=None, documentation=None)[source]

Represents a context declaration.

A context contains a generic list of all its items (library clauses, use clauses and context references) in _references.

Furthermore, when a context gets initialized, the item kinds get separated into individual lists:

When pyVHDLModel.Design.LinkContexts() got called, these lists were processed and the fields:

are populated.

Example

context ctx is
  -- ...
end context;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Context.

Inheritance

Inheritance diagram of Context

Parameters:
__init__(node, identifier, references=None, documentation=None)[source]

Initializes a context declaration.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – The context’s identifier.

  • references (Iterable[LibraryClause | UseClause | ContextReference]) – All context items, in declaration order.

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(contextNode)[source]

Translates the IIR node of the context to a Context.

Parameters:

contextNode (TypeVar(Iir, bound= c_int)) – The IIR node of the context.

Returns:

The translated context.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

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 context references (_contextReferences).

Returns:

List of context references.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

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 type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 Library: Library

Property to access the library (_parent).

Returns:

The library.

property LibraryReferences: List[LibraryClause]

Read-only property to access the library references (_libraryReferences).

Returns:

List of library references.

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 package references (_packageReferences).

Returns:

List of package references.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is 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.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__str__()[source]

Formats the context declaration.

Format: Context: mylib.myContext

Return type:

str

Returns:

Formatted context declaration.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = False

True if it continues its parent’s declarative region.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_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

_references

All context items, in declaration order.

class pyGHDL.dom.DesignUnit.Configuration(node, identifier, entity, blockConfiguration, contextItems=None, documentation=None)[source]

Represents a configuration declaration.

Example

configuration cfg of ent is
  for rtl
    -- ...
  end for;
end configuration;

This class implements a pyGHDL.dom object derived from pyVHDLModel.DesignUnit.Configuration.

Inheritance

Inheritance diagram of Configuration

Parameters:
__init__(node, identifier, entity, blockConfiguration, contextItems=None, documentation=None)[source]

Initializes a configuration declaration.

Parameters:
  • node (TypeVar(Iir, bound= c_int)) – The IIR node this object was translated from.

  • identifier (str) – The configuration’s identifier.

  • entity (EntitySymbol) – Reference to the entity this configuration configures.

  • blockConfiguration (BlockConfiguration) – The configuration of the entity’s architecture.

  • contextItems (Iterable[Context]) – List of all context items (library, use and context clauses).

  • documentation (str) – The documentation comment associated with this declaration.

Return type:

None

classmethod parse(configurationNode, contextItems)[source]

Translates the IIR node of the configuration declaration to a Configuration.

Parameters:
  • configurationNode (TypeVar(Iir, bound= c_int)) – The IIR node of the configuration declaration.

  • contextItems (Iterable[Context]) – List of all context items (library, use and context clauses) preceding the unit.

Return type:

Configuration

Returns:

The translated configuration declaration.

_iirNode

The IIR node in libghdl’s tree this DOM object was translated from.

_position

The IIR node’s position in the source file, resolved on first access and then cached.

property BlockConfiguration: <pyTooling.Decorators.readonly object at 0x7d2df1139850>

Read-only property to access the block configuration (_blockConfiguration).

Returns:

The block configuration.

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 Document: Document

Property to access the document (_document).

Returns:

The document.

property Documentation: str | None

Read-only property to access the model entity’s documentation (_documentation).

Returns:

Associated documentation of a model entity.

property Entity: EntitySymbol

Read-only property to access the entity (_entity).

Returns:

The entity.

GetAncestor(type)

Return the closest ancestor of the given type found 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:

ModelEntity

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, or None to accept every attribute.

Return type:

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

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 Library: Library

Property to access the library (_parent).

Returns:

The library.

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 0x7d2df247c1d0>

Cached read-only property to access an IIR’s position in source code (_position).

If _position is 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.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__new__(**kwargs)
__repr__()[source]

Formats a representation of the configuration declaration.

Format: mylib.myConfiguration

Return type:

str

Returns:

String representation of the configuration declaration.

__str__()[source]

Formats the configuration declaration.

Format: Configuration: mylib.myConfiguration

Return type:

str

Returns:

Formatted configuration declaration.

_blockConfiguration

The configuration of the entity’s architecture.

_contextItems

List of all context items (library, use and context clauses).

_contextReferences

List of context clauses.

_continuesParentRegion = False

True if it continues its parent’s declarative region.

_dependencyVertex

Reference to the vertex in the dependency graph representing the design unit.
This reference is set by CreateDependencyGraph().

_document

The VHDL library, the design unit was analyzed into.

_documentation

The associated documentation of a model entity.

_entity

Reference to the entity this configuration configures.

_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