pyGHDL.dom.Expression

Classes


Classes

class pyGHDL.dom.Expression.InverseExpression(node, operand)[source]

Inheritance

Inheritance diagram of InverseExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('not ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.IdentityExpression(node, operand)[source]

Inheritance

Inheritance diagram of IdentityExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('+', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.NegationExpression(node, operand)[source]

Inheritance

Inheritance diagram of NegationExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('-', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.AbsoluteExpression(node, operand)[source]

Inheritance

Inheritance diagram of AbsoluteExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('abs ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.ParenthesisExpression(node, operand)[source]

Inheritance

Inheritance diagram of ParenthesisExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('(', ')')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.TypeConversion(node, targetSubtype, operand)[source]

Represents a type conversion, e.g. integer(x).

Note

Not reachable from this translator today. GHDL’s parser cannot tell a type conversion from an indexed name or a function call - integer(x), arr(x) and f(x) are all parsed as Parenthesis_Name - and only semantic analysis rewrites one into Type_Conversion. pyGHDL.dom parses without that pass, so a Type_Conversion node never arrives and Parenthesis_Name is translated to IndexedObjectOrFunctionCallSymbol, which carries the ambiguity.

The constructor is kept correct so this class works if semantic analysis is ever run.

Inheritance

Inheritance diagram of TypeConversion

Parameters:
__init__(node, targetSubtype, operand)[source]

Initializes a type conversion.

Parameters:
  • targetSubtype (SubtypeSymbol) – Reference to the subtype the expression is converted to.

  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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 TargetSubtype: SubtypeSymbol

Read-only property to access the target subtype (_targetSubtype).

Returns:

The target subtype.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()[source]

Formats the type conversion.

Format: integer(val)

Return type:

str

Returns:

Formatted type conversion.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_targetSubtype: SubtypeSymbol

Reference to the subtype the expression is converted to.

_FORMAT: ClassVar[Tuple[str, str]]

The operator’s string representation as (prefix, suffix) around the operand.

class pyGHDL.dom.Expression.FunctionCall(node, operand)[source]

Inheritance

Inheritance diagram of FunctionCall

Parameters:
__init__(node, operand)[source]

Initializes a VHDL model entity.

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

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.AscendingRangeExpression(node, left, right)[source]

Inheritance

Inheritance diagram of AscendingRangeExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
Return type:

None

property Direction: <pyTooling.Decorators.readonly object at 0x7c5266b39fd0>

Read-only property to access the direction (_direction).

Returns:

The direction.

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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' to ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_direction: ClassVar[Direction] = 0

The range’s direction, either ascending (to) or descending (downto).

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.DescendingRangeExpression(node, left, right)[source]

Inheritance

Inheritance diagram of DescendingRangeExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
Return type:

None

property Direction: <pyTooling.Decorators.readonly object at 0x7c5266b39fd0>

Read-only property to access the direction (_direction).

Returns:

The direction.

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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' downto ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_direction: ClassVar[Direction] = 1

The range’s direction, either ascending (to) or descending (downto).

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.AdditionExpression(node, left, right)[source]

Inheritance

Inheritance diagram of AdditionExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' + ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.SubtractionExpression(node, left, right)[source]

Inheritance

Inheritance diagram of SubtractionExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' - ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ConcatenationExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ConcatenationExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' & ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MultiplyExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MultiplyExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' * ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.DivisionExpression(node, left, right)[source]

Inheritance

Inheritance diagram of DivisionExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' / ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.RemainderExpression(node, left, right)[source]

Inheritance

Inheritance diagram of RemainderExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' rem ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ModuloExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ModuloExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' mod ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ExponentiationExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ExponentiationExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', '**', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.AndExpression(node, left, right)[source]

Inheritance

Inheritance diagram of AndExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' and ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.NandExpression(node, left, right)[source]

Inheritance

Inheritance diagram of NandExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' nand ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.OrExpression(node, left, right)[source]

Inheritance

Inheritance diagram of OrExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' or ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.NorExpression(node, left, right)[source]

Inheritance

Inheritance diagram of NorExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' nor ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.XorExpression(node, left, right)[source]

Inheritance

Inheritance diagram of XorExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' xor ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.XnorExpression(node, left, right)[source]

Inheritance

Inheritance diagram of XnorExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' xnor ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.UnaryAndExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryAndExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('and ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.UnaryNandExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryNandExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('nand ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.UnaryOrExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryOrExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('or ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.UnaryNorExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryNorExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('nor ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.UnaryXorExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryXorExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('xor ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.UnaryXnorExpression(node, operand)[source]

Inheritance

Inheritance diagram of UnaryXnorExpression

Parameters:
__init__(node, operand)[source]

Initializes a unary expression.

Parameters:
  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression the operator is applied to.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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.

_FORMAT: ClassVar[Tuple[str, str]] = ('xnor ', '')

The operator’s string representation as (prefix, suffix) around the operand.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the unary expression.

Format: not operand

Return type:

str

Returns:

Formatted unary expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression the operator is applied to.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

class pyGHDL.dom.Expression.EqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of EqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' = ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.UnequalExpression(node, left, right)[source]

Inheritance

Inheritance diagram of UnequalExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' /= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.LessThanExpression(node, left, right)[source]

Inheritance

Inheritance diagram of LessThanExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' < ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.LessEqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of LessEqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' <= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.GreaterThanExpression(node, left, right)[source]

Inheritance

Inheritance diagram of GreaterThanExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' > ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.GreaterEqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of GreaterEqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' >= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingEqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingEqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingUnequalExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingUnequalExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?/= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingLessThanExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingLessThanExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?< ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingLessEqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingLessEqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?<= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingGreaterThanExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingGreaterThanExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?> ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.MatchingGreaterEqualExpression(node, left, right)[source]

Inheritance

Inheritance diagram of MatchingGreaterEqualExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ?>= ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ShiftRightLogicExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ShiftRightLogicExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' srl ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ShiftLeftLogicExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ShiftLeftLogicExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' sll ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ShiftRightArithmeticExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ShiftRightArithmeticExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' sra ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.ShiftLeftArithmeticExpression(node, left, right)[source]

Inheritance

Inheritance diagram of ShiftLeftArithmeticExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' sla ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.RotateRightExpression(node, left, right)[source]

Inheritance

Inheritance diagram of RotateRightExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' ror ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.RotateLeftExpression(node, left, right)[source]

Inheritance

Inheritance diagram of RotateLeftExpression

Parameters:
__init__(node, left, right)[source]

Initializes a binary expression.

Parameters:
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 LeftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the left operand (_leftOperand).

Returns:

The left operand.

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 RightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the right operand (_rightOperand).

Returns:

The right operand.

_FORMAT: ClassVar[Tuple[str, str, str]] = ('', ' rol ', '')

The operator’s string representation as (prefix, infix, suffix).

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()

Formats the binary expression.

Format: lhs + rhs

Return type:

str

Returns:

Formatted binary expression.

_leftOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression left of the operator.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_rightOperand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression right of the operator.

class pyGHDL.dom.Expression.QualifiedExpression(node, subtype, operand)[source]

Inheritance

Inheritance diagram of QualifiedExpression

Parameters:
__init__(node, subtype, operand)[source]

Initializes a qualified expression.

Parameters:
  • subtype (Symbol) – Reference to the subtype qualifying the expression.

  • operand (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal) – The expression being qualified.

  • 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 Operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

Read-only property to access the operand (_operand).

Returns:

The operand.

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 Subtype: Symbol

Read-only property to access the subtype (_subtype).

Returns:

The subtype.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()[source]

Formats the qualified expression.

Format: byte'(val)

Return type:

str

Returns:

Formatted qualified expression.

_operand: BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal

The expression being qualified.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_subtype: Symbol

Reference to the subtype qualifying the expression.

class pyGHDL.dom.Expression.SubtypeAllocation(node, subtype)[source]

Inheritance

Inheritance diagram of SubtypeAllocation

Parameters:
__init__(node, subtype)[source]

Initializes an allocation of a subtype via new.

Parameters:
  • subtype (Symbol) – Reference to the subtype being allocated.

  • 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 Subtype: Symbol

Read-only property to access the subtype (_subtype).

Returns:

The subtype.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()[source]

Formats the subtype allocation.

Format: new node

Return type:

str

Returns:

Formatted subtype allocation.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_subtype: Symbol

Reference to the subtype being allocated.

class pyGHDL.dom.Expression.QualifiedExpressionAllocation(node, qualifiedExpression)[source]

Inheritance

Inheritance diagram of QualifiedExpressionAllocation

Parameters:
__init__(node, qualifiedExpression)[source]

Initializes an allocation initialized by a qualified expression.

Parameters:
  • qualifiedExpression (QualifiedExpression) – The qualified expression the allocated object is initialized with.

  • 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 QualifiedExpression: <pyTooling.Decorators.readonly object at 0x7c5266b855d0>

Read-only property to access the qualified expression (_qualifiedExpression).

Returns:

The qualified expression.

__getstate__() Dict[str, Any]

Helper for pickle.

Return type:

Dict[str, Any]

__str__()[source]

Formats the qualified expression allocation.

Format: new byte'(val)

Return type:

str

Returns:

Formatted qualified expression allocation.

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.

_qualifiedExpression: <pyTooling.Decorators.readonly object at 0x7c5266b855d0>

The qualified expression the allocated object is initialized with.

class pyGHDL.dom.Expression.Aggregate(node, elements)[source]

Inheritance

Inheritance diagram of Aggregate

Parameters:
__init__(node, elements)[source]

Initializes an aggregate.

Parameters:
  • elements (List[AggregateElement]) – List of all elements of this aggregate, in the order they were written.

  • parent – The parent model entity of this entity.

  • node (Iir)

Return type:

None

property Elements: List[AggregateElement]

Read-only property to access the elements (_elements).

Returns:

List of elements.

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

Format: (1, others => 0)

Return type:

str

Returns:

Formatted aggregate.

_elements: List[AggregateElement]

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

_parent: ModelEntity

Reference to a parent entity in the logical model hierarchy.