pyGHDL.dom.Concurrent

Classes


Classes

class pyGHDL.dom.Concurrent.GenericAssociationItem(associationNode, formal, actual)[source]

Inheritance

Inheritance diagram of GenericAssociationItem

Parameters:
__init__(associationNode, formal, actual)[source]

Initializes an association item.

Parameters:
  • formal (Symbol) – Reference to the formal part, or None for a positional association.

  • actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The actual part of this association.

  • associationNode (Iir)

Return type:

None

property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the actual (_actual).

Returns:

The actual.

property Formal: Symbol | None

Read-only property to access the formal (_formal).

Returns:

The formal, or None if not set.

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

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]

__str__()

Formats the association item.

Format: formal => actual, or actual alone when positional

Return type:

str

Returns:

Formatted association item.

_actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The actual part of this association.

_formal: Symbol | None

Reference to the formal part, or None for a positional association.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.PortAssociationItem(associationNode, formal, actual)[source]

Inheritance

Inheritance diagram of PortAssociationItem

Parameters:
__init__(associationNode, formal, actual)[source]

Initializes an association item.

Parameters:
  • formal (Symbol) – Reference to the formal part, or None for a positional association.

  • actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The actual part of this association.

  • associationNode (Iir)

Return type:

None

property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the actual (_actual).

Returns:

The actual.

property Formal: Symbol | None

Read-only property to access the formal (_formal).

Returns:

The formal, or None if not set.

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

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]

__str__()

Formats the association item.

Format: formal => actual, or actual alone when positional

Return type:

str

Returns:

Formatted association item.

_actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The actual part of this association.

_formal: Symbol | None

Reference to the formal part, or None for a positional association.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.ParameterAssociationItem(associationNode, formal, actual)[source]

Inheritance

Inheritance diagram of ParameterAssociationItem

Parameters:
__init__(associationNode, formal, actual)[source]

Initializes an association item.

Parameters:
  • formal (Symbol) – Reference to the formal part, or None for a positional association.

  • actual (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The actual part of this association.

  • associationNode (Iir)

Return type:

None

property Actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the actual (_actual).

Returns:

The actual.

property Formal: Symbol | None

Read-only property to access the formal (_formal).

Returns:

The formal, or None if not set.

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

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]

__str__()

Formats the association item.

Format: formal => actual, or actual alone when positional

Return type:

str

Returns:

Formatted association item.

_actual: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The actual part of this association.

_formal: Symbol | None

Reference to the formal part, or None for a positional association.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.ComponentInstantiation(instantiationNode, label, componentSymbol, genericAssociationItems=None, portAssociationItems=None)[source]

Inheritance

Inheritance diagram of ComponentInstantiation

Parameters:
__init__(instantiationNode, label, componentSymbol, genericAssociationItems=None, portAssociationItems=None)[source]

Initializes a component instantiation.

Parameters:
  • label (str) – The label of a model entity.

  • componentSymbol (ComponentInstantiationSymbol) – Reference to the instantiated component.

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

  • portAssociationItems (Iterable[AssociationItem]) – List of all port associations in the port map aspect.

  • parent – The parent model entity of this entity.

  • instantiationNode (Iir)

Return type:

None

property Component: ComponentInstantiationSymbol

Read-only property to access the component (_component).

Returns:

The component.

property GenericAssociationItems: List[GenericAssociationItem]

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

Returns:

List of generic association 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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label 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 PortAssociationItems: List[PortAssociationItem]

Read-only property to access the port associations (_portAssociationItems).

Returns:

List of port association items.

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

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]

_component: ComponentInstantiationSymbol

Reference to the instantiated component.

_genericAssociationItems: List[GenericAssociationItem]

List of all generic associations.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_portAssociationItems: List[PortAssociationItem]

List of all port associations.

class pyGHDL.dom.Concurrent.EntityInstantiation(instantiationNode, label, entitySymbol, architectureSymbol=None, genericAssociationItems=None, portAssociationItems=None)[source]

Inheritance

Inheritance diagram of EntityInstantiation

Parameters:
__init__(instantiationNode, label, entitySymbol, architectureSymbol=None, genericAssociationItems=None, portAssociationItems=None)[source]

Initializes a direct entity instantiation.

Parameters:
  • label (str) – The label of a model entity.

  • entitySymbol (EntityInstantiationSymbol) – Reference to the directly instantiated entity.

  • architectureSymbol (ArchitectureSymbol) – Reference to the selected architecture, if one was given.

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

  • portAssociationItems (Iterable[AssociationItem]) – List of all port associations in the port map aspect.

  • parent – The parent model entity of this entity.

  • instantiationNode (Iir)

Return type:

None

property Architecture: ArchitectureSymbol

Read-only property to access the architecture (_architecture).

Returns:

The architecture.

property Entity: EntityInstantiationSymbol

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

Returns:

The entity.

property GenericAssociationItems: List[GenericAssociationItem]

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

Returns:

List of generic association 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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label 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 PortAssociationItems: List[PortAssociationItem]

Read-only property to access the port associations (_portAssociationItems).

Returns:

List of port association items.

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

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]

_architecture: ArchitectureSymbol

Reference to the selected architecture, if one was given.

_entity: EntityInstantiationSymbol

Reference to the directly instantiated entity.

_genericAssociationItems: List[GenericAssociationItem]

List of all generic associations.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_portAssociationItems: List[PortAssociationItem]

List of all port associations.

class pyGHDL.dom.Concurrent.ConfigurationInstantiation(instantiationNode, label, configurationSymbol, genericAssociationItems=None, portAssociationItems=None)[source]

Inheritance

Inheritance diagram of ConfigurationInstantiation

Parameters:
__init__(instantiationNode, label, configurationSymbol, genericAssociationItems=None, portAssociationItems=None)[source]

Initializes a configuration instantiation.

Parameters:
  • label (str) – The label of a model entity.

  • configurationSymbol (ConfigurationInstantiationSymbol) – Reference to the instantiated configuration.

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

  • portAssociationItems (Iterable[AssociationItem]) – List of all port associations in the port map aspect.

  • parent – The parent model entity of this entity.

  • instantiationNode (Iir)

Return type:

None

property Configuration: ConfigurationInstantiationSymbol

Read-only property to access the configuration (_configuration).

Returns:

The configuration.

property GenericAssociationItems: List[GenericAssociationItem]

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

Returns:

List of generic association 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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label 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 PortAssociationItems: List[PortAssociationItem]

Read-only property to access the port associations (_portAssociationItems).

Returns:

List of port association items.

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

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]

_configuration: ConfigurationInstantiationSymbol

Reference to the instantiated configuration.

_genericAssociationItems: List[GenericAssociationItem]

List of all generic associations.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_portAssociationItems: List[PortAssociationItem]

List of all port associations.

class pyGHDL.dom.Concurrent.ConcurrentBlockStatement(blockNode, label, genericItems=None, genericAssociationItems=None, portItems=None, portAssociationItems=None, declaredItems=None, statements=None)[source]

Inheritance

Inheritance diagram of ConcurrentBlockStatement

Parameters:
__init__(blockNode, label, genericItems=None, genericAssociationItems=None, portItems=None, portAssociationItems=None, declaredItems=None, statements=None)[source]

Initializes a block statement.

Parameters:
  • label (str) – The label of a model entity.

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

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

  • portItems (Iterable) – List of all ports, in declaration order.

  • portAssociationItems (Iterable) – List of all port associations in the port map aspect.

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

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

  • documentation – The documentation comment associated with this declaration.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • blockNode (Iir)

Return type:

None

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

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

Returns:

List of declared items.

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.

IndexDeclaredItems()[source]

A block’s ports share the declarative region of its declarative part.

Return type:

None

property Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label 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 PortAssociationItems: List[PortAssociationItem]

Read-only property to access the port associations (_portAssociationItems).

Returns:

List of port association items.

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

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

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

_declaredItems

List of all declared items in this concurrent declaration region.

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

_hierarchy

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

_instantiations

All instantiations, indexed by label.

_label

The label of a model entity.

_namespace

The namespace of this block’s declarative region.

_normalizedLabel

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

_parent

Reference to a parent entity in the logical model hierarchy.

_portAssociationItems

List of all port associations.

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

_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.Concurrent.ProcessStatement(processNode, label=None, declaredItems=None, statements=None, sensitivityList=None)[source]

Inheritance

Inheritance diagram of ProcessStatement

Parameters:
__init__(processNode, label=None, declaredItems=None, statements=None, sensitivityList=None)[source]

Initializes a process statement.

Parameters:
  • label (str) – The label of a model entity.

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

  • statements (Iterable[SequentialStatement]) – List of all sequential statements in this construct.

  • sensitivityList (Iterable[Symbol]) – List of all signal names in the sensitivity list, or None if none was given.

  • documentation – The documentation comment associated with this declaration.

  • parent – The parent model entity of this entity.

  • processNode (Iir)

Return type:

None

property Constants: Dict[str, Constant]

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

Returns:

Dictionary of constants, indexed by normalized identifier.

property DeclaredItems: List

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

Returns:

List of declared items.

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 declared files (_files).

Returns:

Dictionary of files, indexed by normalized identifier.

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

Read-only property to access the declared 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.

IndexDeclaredItems()

Index declared items listed in the sequential declaration region.

Every declared item is added to _namespace, and additionally to the lookup table matching its kind. Items of an unhandled kind are passed to _IndexOtherDeclaredItem().

See also

ConcurrentDeclarationRegionMixin.IndexDeclaredItems()

The same algorithm for a concurrent declaration region.

Return type:

None

property Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property Namespace: <pyTooling.Decorators.readonly object at 0x7c5266bcf650>

Read-only property to access this region’s namespace (_namespace).

Returns:

The namespace.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 declared procedures (_procedures).

Returns:

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

property SensitivityList: List[Name]

Read-only property to access the sensitivity list (_sensitivityList).

Returns:

List of sensitivity list.

property Statements: List[SequentialStatement]

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

Returns:

A list of sequential statements.

property Subtypes: Dict[str, Subtype]

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

Returns:

Dictionary of subtypes, indexed by normalized identifier.

property Types: Dict[str, FullType]

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

Returns:

Dictionary of types, indexed by normalized identifier.

property Variables: Dict[str, Variable]

Read-only property to access the declared variables (_variables).

Returns:

Dictionary of variables, 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]

_constants

Dictionary of all constants declared in this sequential declaration region.

_declaredItems

List of all declared items in this sequential declaration region.

_documentation

The associated documentation of a model entity.

_files

Dictionary of all files declared in this sequential declaration region.

_functions

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

_label

The label of a model entity.

_namespace

The namespace of this sequential declaration region.

_normalizedLabel

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

_parent

Reference to a parent entity in the logical model hierarchy.

_procedures

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

_sensitivityList

List of all signal names in the sensitivity list, or None if none was given.

_statements

List of all sequential statements in this construct.

_subtypes

Dictionary of all subtypes declared in this sequential declaration region.

_types

Dictionary of all types declared in this sequential declaration region.

_variables

Dictionary of all variables declared in this sequential declaration region.

class pyGHDL.dom.Concurrent.IfGenerateBranch(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]

Inheritance

Inheritance diagram of IfGenerateBranch

Parameters:
__init__(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]

Initializes an if generate branch.

Parameters:
  • condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.

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

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

  • alternativeLabel (str) – The branch’s alternative label, if one was given.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • branchNode (Iir)

Return type:

None

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 AlternativeLabel: str | None

Read-only property to access the alternative label (_alternativeLabel).

Returns:

The alternative label, or None if not set.

property Components: Dict[str, Any]

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

Returns:

Dictionary of components, indexed by normalized identifier.

property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the condition of a statement (_condition).

Returns:

The expression representing the condition of a statement.

property Constants: Dict[str, Constant]

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

Returns:

Dictionary of constants, indexed by normalized identifier.

property DeclaredItems: List

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

Returns:

List of declared items.

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.

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 NormalizedAlternativeLabel: str | None

Read-only property to access the normalized alternative label (_normalizedAlternativeLabel).

Returns:

The normalized alternative label, or None if not set.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 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]

_allowBlackbox

Allow blackboxes for components in language entity.

_alternativeLabel

The branch’s alternative label, if one was given.

_components

Dictionary of all components declared in this concurrent declaration region.

_condition

The condition guarding this statement.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_namespace

The namespace of this branch’s declarative region.

_normalizedAlternativeLabel

The normalized (lower case) alternative label.

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

_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.Concurrent.ElsifGenerateBranch(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]

Inheritance

Inheritance diagram of ElsifGenerateBranch

Parameters:
__init__(branchNode, condition, declaredItems=None, statements=None, alternativeLabel=None)[source]

Initializes an elsif generate branch.

Parameters:
  • condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.

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

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

  • alternativeLabel (str) – The branch’s alternative label, if one was given.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • branchNode (Iir)

Return type:

None

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 AlternativeLabel: str | None

Read-only property to access the alternative label (_alternativeLabel).

Returns:

The alternative label, or None if not set.

property Components: Dict[str, Any]

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

Returns:

Dictionary of components, indexed by normalized identifier.

property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the condition of a statement (_condition).

Returns:

The expression representing the condition of a statement.

property Constants: Dict[str, Constant]

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

Returns:

Dictionary of constants, indexed by normalized identifier.

property DeclaredItems: List

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

Returns:

List of declared items.

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.

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 NormalizedAlternativeLabel: str | None

Read-only property to access the normalized alternative label (_normalizedAlternativeLabel).

Returns:

The normalized alternative label, or None if not set.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 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]

_allowBlackbox

Allow blackboxes for components in language entity.

_alternativeLabel

The branch’s alternative label, if one was given.

_components

Dictionary of all components declared in this concurrent declaration region.

_condition

The condition guarding this statement.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_namespace

The namespace of this branch’s declarative region.

_normalizedAlternativeLabel

The normalized (lower case) alternative label.

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

_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.Concurrent.ElseGenerateBranch(branchNode, declaredItems=None, statements=None, alternativeLabel=None)[source]

Inheritance

Inheritance diagram of ElseGenerateBranch

Parameters:
__init__(branchNode, declaredItems=None, statements=None, alternativeLabel=None)[source]

Initializes an else generate branch.

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

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

  • alternativeLabel (str) – The branch’s alternative label, if one was given.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • branchNode (Iir)

Return type:

None

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 AlternativeLabel: str | None

Read-only property to access the alternative label (_alternativeLabel).

Returns:

The alternative label, or None if not set.

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

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

Returns:

List of declared items.

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.

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 NormalizedAlternativeLabel: str | None

Read-only property to access the normalized alternative label (_normalizedAlternativeLabel).

Returns:

The normalized alternative label, or None if not set.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 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]

_allowBlackbox

Allow blackboxes for components in language entity.

_alternativeLabel

The branch’s alternative label, if one was given.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_namespace

The namespace of this branch’s declarative region.

_normalizedAlternativeLabel

The normalized (lower case) alternative label.

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

_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.Concurrent.IfGenerateStatement(generateNode, label, ifBranch, elsifBranches=None, elseBranch=None)[source]

Inheritance

Inheritance diagram of IfGenerateStatement

Parameters:
__init__(generateNode, label, ifBranch, elsifBranches=None, elseBranch=None)[source]

Initializes an if-generate statement.

Parameters:
  • label (str) – The label of a model entity.

  • ifBranch (IfGenerateBranch) – The mandatory if branch.

  • elsifBranches (Iterable[ElsifGenerateBranch]) – List of all elsif branches, in the order they were written.

  • elseBranch (ElseGenerateBranch) – The optional else branch, or None if none was given.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • generateNode (Iir)

Return type:

None

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 ElseBranch: ElseGenerateBranch | None

Read-only property to access the else branch (_elseBranch).

Returns:

The else branch, or None if not set.

property ElsifBranches: List[ElsifGenerateBranch]

Read-only property to access the elsif branches (_elsifBranches).

Returns:

List of elsif branches.

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 IfBranch: IfGenerateBranch

Read-only property to access the if branch (_ifBranch).

Returns:

The if branch.

property Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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]

_allowBlackbox: bool | None

Allow blackboxes for components in language entity.

_elseBranch: ElseGenerateBranch | None

The optional else branch, or None if none was given.

_elsifBranches: List[ElsifGenerateBranch]

List of all elsif branches, in the order they were written.

_ifBranch: IfGenerateBranch

The mandatory if branch.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.IndexedGenerateChoice(node, expression)[source]

Inheritance

Inheritance diagram of IndexedGenerateChoice

Parameters:
__init__(node, expression)[source]

Initializes a case-generate choice given by a single value.

Parameters:
  • expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression this choice selects on.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the expression (_expression).

Returns:

The expression.

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

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]

__str__()[source]

Formats the indexed case-generate choice.

Format: 0

Return type:

str

Returns:

Formatted indexed case-generate choice.

_expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression this choice selects on.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.RangedGenerateChoice(node, rng)[source]

Inheritance

Inheritance diagram of RangedGenerateChoice

Parameters:
__init__(node, rng)[source]

Initializes a case-generate choice given by a range.

Parameters:
  • rng (Range) – The range this choice selects on.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

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

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

Read-only property to access the range (_range).

Returns:

The range.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()[source]

Formats the ranged case-generate choice.

Format: 0 to 3

Return type:

str

Returns:

Formatted ranged case-generate choice.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_range: Range

The range this choice selects on.

class pyGHDL.dom.Concurrent.GenerateCase(node, choices, declaredItems=None, statements=None, alternativeLabel=None)[source]

Inheritance

Inheritance diagram of GenerateCase

Parameters:
__init__(node, choices, declaredItems=None, statements=None, alternativeLabel=None)[source]

Initializes a generate case.

Parameters:
  • choices (Iterable[ConcurrentChoice]) – List of all choices selecting this alternative.

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

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

  • alternativeLabel (str) – The alternative’s label.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

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 Choices: List[BaseChoice]

Read-only property to access the choices (_choices).

Returns:

List of choices.

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

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

Returns:

List of declared items.

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.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 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]

__str__()[source]

Formats the case-generate alternative.

Format: when 0 | 1 =>

Return type:

str

Returns:

Formatted case-generate alternative.

_allowBlackbox

Allow blackboxes for components in language entity.

_choices

List of all choices selecting this alternative.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_label

The label of a model entity.

_namespace

The namespace of this alternative’s declarative region.

_normalizedLabel

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

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

_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.Concurrent.OthersGenerateCase(caseNode, declaredItems=None, statements=None, alternativeLabel=None)[source]

Inheritance

Inheritance diagram of OthersGenerateCase

Parameters:
__init__(caseNode, declaredItems=None, statements=None, alternativeLabel=None)[source]

Initializes a concurrent case.

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

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

  • alternativeLabel (str) – The alternative’s label.

  • choices – List of all choices selecting this alternative.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • caseNode (Iir)

Return type:

None

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 Choices: List[BaseChoice]

Read-only property to access the choices (_choices).

Returns:

List of choices.

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

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

Returns:

List of declared items.

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.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 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]

__str__()[source]

Formats the others case-generate alternative.

Format: when others =>

Return type:

str

Returns:

Formatted others case-generate alternative.

_allowBlackbox

Allow blackboxes for components in language entity.

_choices

List of all choices selecting this alternative.

_components

Dictionary of all components declared in this concurrent declaration region.

_constants

Dictionary of all constants declared in this concurrent declaration region.

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_label

The label of a model entity.

_namespace

The namespace of this alternative’s declarative region.

_normalizedLabel

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

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

_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.Concurrent.CaseGenerateStatement(generateNode, label, expression, cases)[source]

Inheritance

Inheritance diagram of CaseGenerateStatement

Parameters:
__init__(generateNode, label, expression, cases)[source]

Initializes a case-generate statement.

Parameters:
  • label (str) – The label of a model entity.

  • expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression being tested; it must be static.

  • cases (Iterable[ConcurrentCase]) – List of all alternatives, in the order they were written.

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent – The parent model entity of this entity.

  • generateNode (Iir)

Return type:

None

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 Cases: List[GenerateCase]

Read-only property to access the cases (_cases).

Returns:

List of cases.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property SelectExpression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the select expression (_expression).

Returns:

The select expression.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_allowBlackbox: bool | None

Allow blackboxes for components in language entity.

_cases: List[GenerateCase]

List of all alternatives, in the order they were written.

_expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression being tested; it must be static.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.ForGenerateStatement(generateNode, label, loopIndex, rng, declaredItems=None, statements=None, parent=None)[source]

Inheritance

Inheritance diagram of ForGenerateStatement

Parameters:
__init__(generateNode, label, loopIndex, rng, declaredItems=None, statements=None, parent=None)[source]

Initializes a for-generate statement.

Parameters:
  • label (str) – The label of a model entity.

  • loopIndex (str) – The name of the generate loop’s index.

  • rng (Range) – The range the generate loop iterates over.

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

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

  • allowBlackbox – Allow blackboxes for components in language entity.

  • parent (ModelEntity | None) – The parent model entity of this entity.

  • generateNode (Iir)

Return type:

None

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

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

Returns:

List of declared items.

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.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property LoopIndex: str

Read-only property to access the loop index (_loopIndex).

Returns:

The loop index.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _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 Range: <pyTooling.Decorators.readonly object at 0x7c5266adf7d0>

Read-only property to access the range (_range).

Returns:

The range.

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]

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

_declaredItems

List of all declared items in this concurrent declaration region.

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

_instantiations

All instantiations, indexed by label.

_label

The label of a model entity.

_loopIndex

The name of the generate loop’s index.

_namespace

The namespace of the generate loop’s declarative region.

_normalizedLabel

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

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

_range

The range the generate loop iterates over.

_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.Concurrent.WaveformElement(waveNode, expression, after)[source]

Inheritance

Inheritance diagram of WaveformElement

Parameters:
__init__(waveNode, expression, after)[source]

Initializes a waveform element.

Parameters:
  • expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The value this waveform element assigns.

  • after (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The delay after which the value is assigned, or None if none was given.

  • parent – The parent model entity of this entity.

  • waveNode (Iir)

Return type:

None

property After: <pyTooling.Decorators.readonly object at 0x7c5266cb99d0>

Read-only property to access the waveform element’s delay (_after).

Returns:

The after.

property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the expression (_expression).

Returns:

The expression.

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

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]

_after

The delay after which the value is assigned, or None if none was given.

_expression

The value this waveform element assigns.

_parent

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Concurrent.ConditionalWaveform(node, waveform, condition=None)[source]

Inheritance

Inheritance diagram of ConditionalWaveform

Parameters:
__init__(node, waveform, condition=None)[source]

Initializes a conditional waveform.

Parameters:
  • waveform (Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.

  • condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition selecting this alternative.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the condition of a statement (_condition).

Returns:

The expression representing the condition of a statement.

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

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 Waveform: List[WaveformElement]

Read-only property to access the waveform (_waveform).

Returns:

List of waveform.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_condition

The condition guarding this statement.

_parent

Reference to a parent entity in the logical model hierarchy.

_waveform

List of all waveform elements, in the order they were written.

class pyGHDL.dom.Concurrent.SelectedWaveform(node, choices, waveform)[source]

Inheritance

Inheritance diagram of SelectedWaveform

Parameters:
__init__(node, choices, waveform)[source]

Initializes a selected waveform.

Parameters:
  • choices (Iterable) – List of all choices selecting this alternative.

  • waveform (Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

property Choices: List[BaseChoice]

Read-only property to access the choices (_choices).

Returns:

List of choices.

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

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 Waveform: List[WaveformElement]

Read-only property to access the waveform (_waveform).

Returns:

List of waveform.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_choices: List[BaseChoice]

List of all choices selecting this alternative.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_waveform: List[WaveformElement]

List of all waveform elements, in the order they were written.

class pyGHDL.dom.Concurrent.OthersSelectedWaveform(node, waveform)[source]

Inheritance

Inheritance diagram of OthersSelectedWaveform

Parameters:
__init__(node, waveform)[source]

Initializes an others selected waveform.

Parameters:
  • waveform (Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

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

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 Waveform: List[WaveformElement]

Read-only property to access the waveform (_waveform).

Returns:

List of waveform.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_waveform: List[WaveformElement]

List of all waveform elements, in the order they were written.

class pyGHDL.dom.Concurrent.ConcurrentSimpleSignalAssignment(assignmentNode, label, target, waveform)[source]

Inheritance

Inheritance diagram of ConcurrentSimpleSignalAssignment

Parameters:
__init__(assignmentNode, label, target, waveform)[source]

Initializes a simple concurrent signal assignment.

Parameters:
  • label (str) – The label of a model entity.

  • target (SignalSymbol) – Reference to the assignment’s destination.

  • waveform (Iterable[WaveformElement]) – List of all waveform elements, in the order they were written.

  • parent – The parent model entity of this entity.

  • assignmentNode (Iir)

Return type:

None

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Target: SignalSymbol

Read-only property to access the target (_target).

Returns:

The target.

property Waveform: List[WaveformElement]

Read-only property to access the waveform (_waveform).

Returns:

List of waveform.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_target: Symbol

Reference to the assignment’s destination.

_waveform: List[WaveformElement]

List of all waveform elements, in the order they were written.

class pyGHDL.dom.Concurrent.ConcurrentConditionalSignalAssignment(assignmentNode, label, target, conditionalWaveforms)[source]

Inheritance

Inheritance diagram of ConcurrentConditionalSignalAssignment

Parameters:
__init__(assignmentNode, label, target, conditionalWaveforms)[source]

Initializes a conditional concurrent signal assignment.

Parameters:
  • label (str) – The label of a model entity.

  • target (SignalSymbol) – Reference to the assignment’s destination.

  • conditionalWaveforms (Iterable[ConditionalWaveform]) – All alternatives, in order.

  • parent – The parent model entity of this entity.

  • assignmentNode (Iir)

Return type:

None

property ConditionalWaveforms: List[ConditionalWaveform]

Read-only property to access the conditional waveforms (_conditionalWaveforms).

Returns:

List of conditional waveforms.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Target: SignalSymbol

Read-only property to access the target (_target).

Returns:

The target.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_conditionalWaveforms: List[ConditionalWaveform]

All alternatives, in order.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_target: Symbol

Reference to the assignment’s destination.

class pyGHDL.dom.Concurrent.ConcurrentSelectedSignalAssignment(assignmentNode, label, target, expression, selectedWaveforms)[source]

Inheritance

Inheritance diagram of ConcurrentSelectedSignalAssignment

Parameters:
__init__(assignmentNode, label, target, expression, selectedWaveforms)[source]

Initializes a selected concurrent signal assignment.

Parameters:
  • label (str) – The label of a model entity.

  • target (SignalSymbol) – Reference to the assignment’s destination.

  • expression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The selector expression.

  • selectedWaveforms (Iterable) – All alternatives, in order.

  • parent – The parent model entity of this entity.

  • assignmentNode (Iir)

Return type:

None

property Expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the expression (_expression).

Returns:

The expression.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property SelectedWaveforms: List[SelectedWaveform | OthersSelectedWaveform]

Read-only property to access the selected waveforms (_selectedWaveforms).

Returns:

List of selected waveforms.

property Target: SignalSymbol

Read-only property to access the target (_target).

Returns:

The target.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_expression: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression held by this construct.

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_selectedWaveforms: List[SelectedWaveform | OthersSelectedWaveform]

All alternatives, in order.

_target: Symbol

Reference to the assignment’s destination.

class pyGHDL.dom.Concurrent.ConcurrentProcedureCall(callNode, label, procedureName, parameterAssociationItems)[source]

Inheritance

Inheritance diagram of ConcurrentProcedureCall

Parameters:
__init__(callNode, label, procedureName, parameterAssociationItems)[source]

Initializes a concurrent procedure call.

Parameters:
  • label (str) – The label of a model entity.

  • procedureName (Symbol) – Reference to the called procedure.

  • parameterAssociationItems (Iterable) – List of all parameter associations of the call.

  • parent – The parent model entity of this entity.

  • callNode (Iir)

Return type:

None

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property ParameterAssociationItems: List[ParameterAssociationItem]

Read-only property to access the parameter association items (_parameterAssociationItems).

Returns:

List of parameter association items.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Procedure: Symbol

Read-only property to access the procedure (_procedure).

Returns:

The procedure.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_label: str | None

The label of a model entity.

_normalizedLabel: str | None

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

_parameterAssociationItems: List[ParameterAssociationItem]

List of all parameter associations of the call.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_procedure: Symbol

Reference to the called procedure.

class pyGHDL.dom.Concurrent.ConcurrentAssertStatement(assertNode, condition, message=None, severity=None, label=None)[source]

Inheritance

Inheritance diagram of ConcurrentAssertStatement

Parameters:
__init__(assertNode, condition, message=None, severity=None, label=None)[source]

Initializes a concurrent assertion statement.

Parameters:
  • condition (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The condition guarding this statement.

  • message (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The reported message, or None if none was given.

  • severity (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The reported severity level, or None if none was given.

  • label (str) – The label of a model entity.

  • parent – The parent model entity of this entity.

  • assertNode (Iir)

Return type:

None

property Condition: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the condition of a statement (_condition).

Returns:

The expression representing the condition of a statement.

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 Label: str | None

Read-only property to access the model entity’s label (_label).

Returns:

Label of a model entity.

property Message: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None

Read-only property to access the message (_message).

Returns:

The message, or None if not set.

property NormalizedLabel: str | None

Read-only property to access the model entity’s normalized label (_normalizedLabel).

Returns:

Normalized label of a model entity.

property Parent: ModelEntity

Property to access the model entity’s parent element reference in a logical hierarchy (_parent).

Returns:

Reference to the parent entity.

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

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

If _position is None, resolve the position object from _iirNode

Returns:

The IIR’s position in the source file.

property Severity: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal | None

Read-only property to access the severity (_severity).

Returns:

The severity, or None if not set.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_condition

The condition guarding this statement.

_label

The label of a model entity.

_message

The reported message, or None if none was given.

_normalizedLabel

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

_parent

Reference to a parent entity in the logical model hierarchy.

_severity

The reported severity level, or None if none was given.