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
: AWithDefaultExpression
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, thusDocumentedEntityMixin
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
- _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 isNone
.Inheritance
- Parameters:
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- __init__(defaultExpression=None)[source]
- Parameters:
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
- class pyVHDLModel.Object.BaseConstant(identifiers, subtype, documentation=None)[source]
Base-class for all constants (normal and deferred constants) in VHDL.
Inheritance
- 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.
- _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
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]
Initializes a VHDL model entity.
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (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.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
- 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
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- __init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]
Initializes a VHDL model entity.
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (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.
Represents a shared variable.
Todo
Shared variable object not implemented.
Inheritance
Returns a model entity’s associated documentation.
- Returns:
Associated documentation of a model entity.
Check if class has Attributes.
- Returns:
True
, if the class has Attributes.
Check if class has any method with Attributes.
- Returns:
True
, if the class has any method with Attributes.
Returns a model entity’s tuple of identifiers (names).
- Returns:
Tuple of identifiers.
Returns a model entity’s tuple of normalized identifiers (lower case names).
- Returns:
Tuple of normalized identifiers.
Returns a reference to the parent entity.
- Returns:
Parent entity.
Initializes a VHDL model entity.
The associated documentation of a model entity.
A list of identifiers.
A list of normalized (lower case) identifiers.
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
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (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.
- __init__(identifiers, subtype, defaultExpression=None, documentation=None)[source]
Initializes a VHDL model entity.
- Parameters:
subtype (Symbol)
defaultExpression (BaseExpression | QualifiedExpression | FunctionCall | TypeConversion | Literal)
documentation (str)
- class pyVHDLModel.Object.File(identifiers, subtype, documentation=None)[source]
Represents a file.
Todo
File object not implemented.
Inheritance
- 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.
- _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.