pyVHDLModel.DesignUnit

This module contains parts of an abstract document language model for VHDL.

Design units are contexts, entities, architectures, packages and their bodies as well as configurations.

Classes


Classes

class pyVHDLModel.DesignUnit.Reference(symbols, parent=None)[source]

A base-class for all references.

Inheritance

Inheritance diagram of Reference

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

Initializes a reference by taking a list of symbols and a parent reference.

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

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

Return type:

None

property Symbols: List[Symbol]

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

Returns:

A list of symbols.

property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyVHDLModel.DesignUnit.LibraryClause(symbols, parent=None)[source]

Represents a library clause.

Example

library std, ieee;

Inheritance

Inheritance diagram of LibraryClause

Parameters:
property Symbols: List[LibraryReferenceSymbol]

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

Returns:

A list of library reference symbols.

property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

__init__(symbols, parent=None)

Initializes a reference by taking a list of symbols and a parent reference.

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

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

Return type:

None

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyVHDLModel.DesignUnit.UseClause(symbols, parent=None)[source]

Represents a use clause.

Example

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

Inheritance

Inheritance diagram of UseClause

Parameters:
property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

property Symbols: List[Symbol]

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

Returns:

A list of symbols.

__init__(symbols, parent=None)

Initializes a reference by taking a list of symbols and a parent reference.

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

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

Return type:

None

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyVHDLModel.DesignUnit.ContextReference(symbols, parent=None)[source]

Represents a context reference.

Hint

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

Example

context ieee.ieee_std_context;

Inheritance

Inheritance diagram of ContextReference

Parameters:
property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

property Symbols: List[Symbol]

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

Returns:

A list of symbols.

__init__(symbols, parent=None)

Initializes a reference by taking a list of symbols and a parent reference.

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

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

Return type:

None

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyVHDLModel.DesignUnit.DesignUnitWithContextMixin[source]

A mixin-class for all design units with a context.

Inheritance

Inheritance diagram of DesignUnitWithContextMixin

class pyVHDLModel.DesignUnit.DesignUnit(identifier, contextItems=None, documentation=None, parent=None)[source]

A base-class for all design units.

Inheritance

Inheritance diagram of DesignUnit

Parameters:
__init__(identifier, contextItems=None, documentation=None, parent=None)[source]

Initializes a design unit.

Parameters:
Return type:

None

_document: Document

The VHDL library, the design unit was analyzed into.

_contextItems: List[ContextUnion]

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

_libraryReferences: List[LibraryClause]

List of library clauses.

_packageReferences: List[UseClause]

List of use clauses.

_contextReferences: List[ContextReference]

List of context clauses.

_referencedLibraries: Dict[str, Library]

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, Package]]

Referenced packages based on explicit use clauses or implicit inheritance

_referencedContexts: Dict[str, Context]

Referenced contexts based on explicit context references or implicit inheritance

_dependencyVertex: Vertex[None, None, str, DesignUnit, None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_hierarchyVertex: Vertex[None, None, str, DesignUnit, None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

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 LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property PackageReferences: List[UseClause]

Read-only property to access the sequence of use clauses (_packageReferences).

Returns:

Sequence of use 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 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.

_identifier: str

The identifier of a model entity.

_normalizedIdentifier: str

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

_documentation: Nullable[str]

The associated documentation of a model entity.

property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

property Identifier: str

Returns a model entity’s identifier (name).

Returns:

Name of a model entity.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

Returns:

Normalized name of a model entity.

property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyVHDLModel.DesignUnit.PrimaryUnit(identifier, contextItems=None, documentation=None, parent=None)[source]

A base-class for all primary design units.

Inheritance

Inheritance diagram of PrimaryUnit

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

__init__(identifier, contextItems=None, documentation=None, parent=None)

Initializes a design unit.

Parameters:
Return type:

None

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

class pyVHDLModel.DesignUnit.SecondaryUnit(identifier, contextItems=None, documentation=None, parent=None)[source]

A base-class for all secondary design units.

Inheritance

Inheritance diagram of SecondaryUnit

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

__init__(identifier, contextItems=None, documentation=None, parent=None)

Initializes a design unit.

Parameters:
Return type:

None

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

class pyVHDLModel.DesignUnit.Context(identifier, references=None, documentation=None, parent=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;

Inheritance

Inheritance diagram of Context

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

Initializes a design unit.

Parameters:
  • identifier (str) – Identifier (name) of the design unit.

  • contextItems – A sequence of library, use or context clauses.

  • documentation (Optional[str]) – Associated documentation of the design unit.

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

  • references (Iterable[LibraryClause | UseClause | ContextReference] | None)

Return type:

None

_libraryReferences: List['LibraryClause']

List of library clauses.

_packageReferences: List['UseClause']

List of use clauses.

_contextReferences: List['ContextReference']

List of context clauses.

property LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property PackageReferences: List[UseClause]

Read-only property to access the sequence of use clauses (_packageReferences).

Returns:

Sequence of use clauses.

property ContextReferences: List[ContextReference]

Read-only property to access the sequence of context clauses (_contextReferences).

Returns:

Sequence of context clauses.

__str__()[source]

Return str(self).

Return type:

str

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

Returns:

Name of a model entity.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

Returns:

Normalized name of a model entity.

property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_normalizedIdentifier: str

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

class pyVHDLModel.DesignUnit.Package(identifier, contextItems=None, genericItems=None, declaredItems=None, documentation=None, parent=None)[source]

Represents a package declaration.

Example

package pkg is
  -- ...
end package;

Inheritance

Inheritance diagram of Package

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

Initializes a design unit.

Parameters:
Return type:

None

__str__()[source]

Return str(self).

Return type:

str

__repr__()[source]

Return repr(self).

Return type:

str

_declaredItems: List

List of all declared items in this concurrent declaration region.

_types: Dict[str, FullType]

Dictionary of all types declared in this concurrent declaration region.

_subtypes: Dict[str, Subtype]

Dictionary of all subtypes declared in this concurrent declaration region.

_constants: Dict[str, Constant]

Dictionary of all constants declared in this concurrent declaration region.

_signals: Dict[str, Signal]

Dictionary of all signals declared in this concurrent declaration region.

_sharedVariables: Dict[str, SharedVariable]

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

_files: Dict[str, File]

Dictionary of all files declared in this concurrent declaration region.

_functions: Dict[str, Dict[str, Function]]

Dictionary of all functions declared in this concurrent declaration region.

_procedures: Dict[str, Dict[str, Procedure]]

Dictionary of all procedures declared in this concurrent declaration region.

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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:

    • Every declared item is added to _namespace.

    • If the declared item is a FullType, then add an entry to _types.

    • If the declared item is a SubType, then add an entry to _subtypes.

    • If the declared item is a Function, then add an entry to _functions.

    • If the declared item is a Procedure, then add an entry to _procedures.

    • If the declared item is a Constant, then add an entry to _constants.

    • If the declared item is a Signal, then add an entry to _signals.

    • If the declared item is a Variable, TODO.

    • If the declared item is a SharedVariable, then add an entry to _sharedVariables.

    • If the declared item is a File, then add an entry to _files.

    • If the declared item is neither of these types, call _IndexOtherDeclaredItem().
      Derived classes may override this virtual function.

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 LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

class pyVHDLModel.DesignUnit.PackageBody(packageSymbol, contextItems=None, declaredItems=None, documentation=None, parent=None)[source]

Represents a package body declaration.

Example

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

Inheritance

Inheritance diagram of PackageBody

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

Initializes a design unit.

Parameters:
Return type:

None

__str__()[source]

Return str(self).

Return type:

str

__repr__()[source]

Return repr(self).

Return type:

str

_declaredItems: List

List of all declared items in this concurrent declaration region.

_types: Dict[str, FullType]

Dictionary of all types declared in this concurrent declaration region.

_subtypes: Dict[str, Subtype]

Dictionary of all subtypes declared in this concurrent declaration region.

_constants: Dict[str, Constant]

Dictionary of all constants declared in this concurrent declaration region.

_signals: Dict[str, Signal]

Dictionary of all signals declared in this concurrent declaration region.

_sharedVariables: Dict[str, SharedVariable]

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

_files: Dict[str, File]

Dictionary of all files declared in this concurrent declaration region.

_functions: Dict[str, Dict[str, Function]]

Dictionary of all functions declared in this concurrent declaration region.

_procedures: Dict[str, Dict[str, Procedure]]

Dictionary of all procedures declared in this concurrent declaration region.

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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:

    • Every declared item is added to _namespace.

    • If the declared item is a FullType, then add an entry to _types.

    • If the declared item is a SubType, then add an entry to _subtypes.

    • If the declared item is a Function, then add an entry to _functions.

    • If the declared item is a Procedure, then add an entry to _procedures.

    • If the declared item is a Constant, then add an entry to _constants.

    • If the declared item is a Signal, then add an entry to _signals.

    • If the declared item is a Variable, TODO.

    • If the declared item is a SharedVariable, then add an entry to _sharedVariables.

    • If the declared item is a File, then add an entry to _files.

    • If the declared item is neither of these types, call _IndexOtherDeclaredItem().
      Derived classes may override this virtual function.

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 LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

class pyVHDLModel.DesignUnit.Entity(identifier, contextItems=None, genericItems=None, portItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]

Represents an entity declaration.

Example

entity ent is
  -- ...
end entity;

Inheritance

Inheritance diagram of Entity

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

Initializes a design unit.

Parameters:
Return type:

None

_declaredItems: List

List of all declared items in this concurrent declaration region.

_types: Dict[str, FullType]

Dictionary of all types declared in this concurrent declaration region.

_subtypes: Dict[str, Subtype]

Dictionary of all subtypes declared in this concurrent declaration region.

_constants: Dict[str, Constant]

Dictionary of all constants declared in this concurrent declaration region.

_signals: Dict[str, Signal]

Dictionary of all signals declared in this concurrent declaration region.

_sharedVariables: Dict[str, SharedVariable]

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

_files: Dict[str, File]

Dictionary of all files declared in this concurrent declaration region.

_functions: Dict[str, Dict[str, Function]]

Dictionary of all functions declared in this concurrent declaration region.

_procedures: Dict[str, Dict[str, Procedure]]

Dictionary of all procedures declared in this concurrent declaration region.

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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:

    • Every declared item is added to _namespace.

    • If the declared item is a FullType, then add an entry to _types.

    • If the declared item is a SubType, then add an entry to _subtypes.

    • If the declared item is a Function, then add an entry to _functions.

    • If the declared item is a Procedure, then add an entry to _procedures.

    • If the declared item is a Constant, then add an entry to _constants.

    • If the declared item is a Signal, then add an entry to _signals.

    • If the declared item is a Variable, TODO.

    • If the declared item is a SharedVariable, then add an entry to _sharedVariables.

    • If the declared item is a File, then add an entry to _files.

    • If the declared item is neither of these types, call _IndexOtherDeclaredItem().
      Derived classes may override this virtual function.

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 LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

__str__()[source]

Return str(self).

Return type:

str

__repr__()[source]

Return repr(self).

Return type:

str

class pyVHDLModel.DesignUnit.Architecture(identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]

Represents an architecture declaration.

Example

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

Inheritance

Inheritance diagram of Architecture

Parameters:
_declaredItems: List

List of all declared items in this concurrent declaration region.

_types: Dict[str, FullType]

Dictionary of all types declared in this concurrent declaration region.

_subtypes: Dict[str, Subtype]

Dictionary of all subtypes declared in this concurrent declaration region.

_constants: Dict[str, Constant]

Dictionary of all constants declared in this concurrent declaration region.

_signals: Dict[str, Signal]

Dictionary of all signals declared in this concurrent declaration region.

_sharedVariables: Dict[str, SharedVariable]

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

_files: Dict[str, File]

Dictionary of all files declared in this concurrent declaration region.

_functions: Dict[str, Dict[str, Function]]

Dictionary of all functions declared in this concurrent declaration region.

_procedures: Dict[str, Dict[str, Procedure]]

Dictionary of all procedures declared in this concurrent declaration region.

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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:

    • Every declared item is added to _namespace.

    • If the declared item is a FullType, then add an entry to _types.

    • If the declared item is a SubType, then add an entry to _subtypes.

    • If the declared item is a Function, then add an entry to _functions.

    • If the declared item is a Procedure, then add an entry to _procedures.

    • If the declared item is a Constant, then add an entry to _constants.

    • If the declared item is a Signal, then add an entry to _signals.

    • If the declared item is a Variable, TODO.

    • If the declared item is a SharedVariable, then add an entry to _sharedVariables.

    • If the declared item is a File, then add an entry to _files.

    • If the declared item is neither of these types, call _IndexOtherDeclaredItem().
      Derived classes may override this virtual function.

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 LibraryReferences: List[LibraryClause]

Read-only property to access the sequence of library clauses (_libraryReferences).

Returns:

Sequence of library clauses.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

__init__(identifier, entity, contextItems=None, declaredItems=None, statements=None, documentation=None, parent=None)[source]

Initializes a design unit.

Parameters:
Return type:

None

__str__()[source]

Return str(self).

Return type:

str

__repr__()[source]

Return repr(self).

Return type:

str

class pyVHDLModel.DesignUnit.Component(identifier, genericItems=None, portItems=None, documentation=None, parent=None)[source]

Represents a configuration declaration.

Example

component ent is
  -- ...
end component;

Inheritance

Inheritance diagram of Component

Parameters:
_identifier: str

The identifier of a model entity.

_normalizedIdentifier: str

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

_documentation: Optional[str]

The associated documentation of a model entity.

property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

property Identifier: str

Returns a model entity’s identifier (name).

Returns:

Name of a model entity.

property NormalizedIdentifier: str

Returns a model entity’s normalized identifier (lower case name).

Returns:

Normalized name of a model entity.

property Parent: ModelEntity

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

__init__(identifier, genericItems=None, portItems=None, documentation=None, parent=None)[source]

Initializes a VHDL model entity.

Parameters:
Return type:

None

class pyVHDLModel.DesignUnit.Configuration(identifier, contextItems=None, documentation=None, parent=None)[source]

Represents a configuration declaration.

Example

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

Inheritance

Inheritance diagram of Configuration

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

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

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

Returns a model entity’s identifier (name).

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

Returns a model entity’s normalized identifier (lower case name).

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

Read-only property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

_contextItems: List['ContextUnion']

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

_contextReferences: List['ContextReference']

List of context clauses.

_dependencyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

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

_document: Document

The VHDL library, the design unit was analyzed into.

_documentation: Nullable[str]

The associated documentation of a model entity.

_hierarchyVertex: Vertex[None, None, str, 'DesignUnit', None, None, None, None, None, None, None, None, None, None, None, None, None]

The vertex in the hierarchy graph

_identifier: str

The identifier of a model entity.

_libraryReferences: List['LibraryClause']

List of library clauses.

_normalizedIdentifier: str

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

_packageReferences: List['UseClause']

List of use clauses.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_referencedContexts: Dict[str, 'Context']

Referenced contexts based on explicit context references or implicit inheritance

_referencedLibraries: Dict[str, 'Library']

Referenced libraries based on explicit library clauses or implicit inheritance

_referencedPackages: Dict[str, Dict[str, 'Package']]

Referenced packages based on explicit use clauses or implicit inheritance

__init__(identifier, contextItems=None, documentation=None, parent=None)[source]

Initializes a design unit.

Parameters:
  • identifier (str) – Identifier (name) of the design unit.

  • contextItems (Optional[Iterable[Context]]) – A sequence of library, use or context clauses.

  • documentation (Optional[str]) – Associated documentation of the design unit.

  • parent (ModelEntity) – Reference to the logical parent in the model hierarchy.

Return type:

None

__str__()[source]

Return str(self).

Return type:

str

__repr__()[source]

Return repr(self).

Return type:

str