pyVHDLModel.Object

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

Objects are constants, variables, signals and files.

Classes

  • Obj: Base-class for all objects (constants, signals, variables and files) in VHDL.

  • WithDefaultExpressionMixin: A WithDefaultExpression is a mixin-class for all objects declarations accepting default expressions.

  • BaseConstant: Base-class for all constants (normal and deferred constants) in VHDL.

  • Constant: Represents a constant.

  • DeferredConstant: Represents a deferred constant.

  • Variable: Represents a variable.

  • SharedVariable: Represents a shared variable.

  • Signal: Represents a signal.

  • File: Represents a file.


Classes

class pyVHDLModel.Object.Obj(identifiers, subtype, documentation=None)[source]

Base-class for all objects (constants, signals, variables and files) in VHDL.

An object (syntax element) can define multiple objects (semantic elements) in a single declaration, thus MultipleNamedEntityMixin is inherited. All objects can be documented, thus DocumentedEntityMixin is inherited too.

Each object references a subtype via _subtype.

Objects are elements in the type and object graph, thus a reference to a vertex in that graph is stored in __objectVertex.

Inheritance

Inheritance diagram of Obj

Parameters:
__init__(identifiers, subtype, documentation=None)[source]

Initializes a VHDL model entity.

Parameters:
_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_documentation: Nullable[str]

The associated documentation of a model entity.

property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.WithDefaultExpressionMixin(defaultExpression=None)[source]

A WithDefaultExpression is a mixin-class for all objects declarations accepting default expressions.

The default expression is referenced by __defaultExpression. If no default expression is present, this field is None.

Inheritance

Inheritance diagram of WithDefaultExpressionMixin

Parameters:

defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)

__init__(defaultExpression=None)[source]
Parameters:

defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

class pyVHDLModel.Object.BaseConstant(identifiers, subtype, documentation=None)[source]

Base-class for all constants (normal and deferred constants) in VHDL.

Inheritance

Inheritance diagram of BaseConstant

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

__init__(identifiers, subtype, documentation=None)

Initializes a VHDL model entity.

Parameters:
_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.Constant(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Represents a constant.

As constants (always) have a default expression, the class WithDefaultExpressionMixin is inherited.

Example

constant BITS : positive := 8;

Inheritance

Inheritance diagram of Constant

Parameters:
__init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Initializes a VHDL model entity.

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.DeferredConstant(identifiers, subtype, documentation=None)[source]

Represents a deferred constant.

Deferred constants are forward declarations for a (complete) constant declaration, thus it contains a field __constantReference to the complete constant declaration.

Example

constant BITS : positive;

Inheritance

Inheritance diagram of DeferredConstant

Parameters:
__init__(identifiers, subtype, documentation=None)[source]

Initializes a VHDL model entity.

Parameters:
__str__()[source]

Return str(self).

Return type:

str

property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.Variable(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Represents a variable.

As variables might have a default expression, the class WithDefaultExpressionMixin is inherited.

Example

variable result : natural := 0;

Inheritance

Inheritance diagram of Variable

Parameters:
__init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Initializes a VHDL model entity.

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.SharedVariable(identifiers, subtype, documentation=None)[source]

Represents a shared variable.

Todo

Shared variable object not implemented.

Inheritance

Inheritance diagram of SharedVariable

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

__init__(identifiers, subtype, documentation=None)

Initializes a VHDL model entity.

Parameters:
_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

class pyVHDLModel.Object.Signal(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Represents a signal.

As signals might have a default expression, the class WithDefaultExpressionMixin is inherited.

Example

signal counter : unsigned(7 downto 0) := '0';

Inheritance

Inheritance diagram of Signal

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.

__init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]

Initializes a VHDL model entity.

Parameters:
class pyVHDLModel.Object.File(identifiers, subtype, documentation=None)[source]

Represents a file.

Todo

File object not implemented.

Inheritance

Inheritance diagram of File

Parameters:
property Documentation: str | None

Returns a model entity’s associated documentation.

Returns:

Associated documentation of a model entity.

class property HasClassAttributes: bool

Check if class has Attributes.

Returns:

True, if the class has Attributes.

class property HasMethodAttributes: bool

Check if class has any method with Attributes.

Returns:

True, if the class has any method with Attributes.

property Identifiers: Tuple[str]

Returns a model entity’s tuple of identifiers (names).

Returns:

Tuple of identifiers.

property NormalizedIdentifiers: Tuple[str]

Returns a model entity’s tuple of normalized identifiers (lower case names).

Returns:

Tuple of normalized identifiers.

property Parent: ModelEntity

Returns a reference to the parent entity.

Returns:

Parent entity.

__init__(identifiers, subtype, documentation=None)

Initializes a VHDL model entity.

Parameters:
_documentation: Nullable[str]

The associated documentation of a model entity.

_identifiers: Tuple[str]

A list of identifiers.

_normalizedIdentifiers: Tuple[str]

A list of normalized (lower case) identifiers.

_parent: ModelEntity

Reference to a parent entity in the model.