pyVHDLModel.Formatting.VHDL
This module contains a writer, which formats a VHDL language model as VHDL source text.
The writer is a Visitor: a model element walks itself and the writer appends the VHDL
source text of each event to a buffer. A parser’s subclass of a model class (e.g. from pyGHDL.dom) is written like
that model class. Writing is a re-format: comments, blank lines and the letter case of reserved words in a parsed source
are not preserved.
Classes
KeywordCase: An enumeration of letter cases for VHDL reserved words in the written source text.IndentStyle: An enumeration of indentation styles of the written source text, as vhdl-style-guide’s optionindent_style.VHDLStyle: Represents the formatting options of theVHDL writer.VHDLWriter: A writer formatting VHDL language model elements as VHDL source text.
Classes
- class pyVHDLModel.Formatting.VHDL.KeywordCase(*values)[source]
An enumeration of letter cases for VHDL reserved words in the written source text.
See also
- Configuring Uppercase and Lowercase Rules
→ vhdl-style-guide’s option
case.
Inheritance
- Lower = 0
Lower case, e.g.
downto.
- Upper = 1
Upper case, e.g.
DOWNTO.
- classmethod __contains__(value)
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)
Return the member matching name.
- classmethod __iter__()
Return members in definition order.
- classmethod __len__()
Return the number of members (no aliases)
- class pyVHDLModel.Formatting.VHDL.IndentStyle(*values)[source]
An enumeration of indentation styles of the written source text, as vhdl-style-guide’s option
indent_style.See also
- Configuring Indent Rules
→ vhdl-style-guide’s options
indent_styleandindent_size, with an example of smart tabs.
Inheritance
- Spaces = 0
Spaces,
indent_sizeper indentation level (VSG:spaces).
- SmartTabs = 1
One tab per indentation level (VSG:
smart_tabs- tabs indent, spaces align).
- classmethod __contains__(value)
Return True if value is in cls.
value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)
- classmethod __getitem__(name)
Return the member matching name.
- classmethod __iter__()
Return members in definition order.
- classmethod __len__()
Return the number of members (no aliases)
- class pyVHDLModel.Formatting.VHDL.VHDLStyle(keywordCase=KeywordCase.Lower, indentStyle=IndentStyle.Spaces, indentSize=2)[source]
Represents the formatting options of the
VHDL writer.The options follow vhdl-style-guide’s names and values.
See also
- Configuring Uppercase and Lowercase Rules
→ vhdl-style-guide’s option
case.- Configuring Indent Rules
→ vhdl-style-guide’s options
indent_styleandindent_size.
Inheritance
- Parameters:
keywordCase (KeywordCase)
indentStyle (IndentStyle)
indentSize (int)
- __init__(keywordCase=KeywordCase.Lower, indentStyle=IndentStyle.Spaces, indentSize=2)[source]
Initializes the formatting options.
- Parameters:
keywordCase (
KeywordCase) – Optional, letter case of reserved words. Default:KeywordCase.Lower.indentStyle (
IndentStyle) – Optional, indentation style. Default:IndentStyle.Spaces.indentSize (
int) – Optional, number of spaces per indentation level. Default:2.
- Raises:
ValueError – If parameter ‘keywordCase’ is None.
TypeError – If parameter ‘keywordCase’ is not of type
KeywordCase.ValueError – If parameter ‘indentStyle’ is None.
TypeError – If parameter ‘indentStyle’ is not of type
IndentStyle.ValueError – If parameter ‘indentSize’ is None.
ValueError – If parameter ‘indentSize’ is less than 1.
- Return type:
None
- _keywordCase: KeywordCase
Letter case of reserved words.
- _indentStyle: IndentStyle
Indentation style.
- property KeywordCase: KeywordCase
Read-only property to access the letter case of reserved words (
_keywordCase).- Returns:
The letter case of reserved words.
- property IndentStyle: IndentStyle
Read-only property to access the indentation style (
_indentStyle).- Returns:
The indentation style.
- property IndentSize: int
Read-only property to access the number of spaces per indentation level (
_indentSize).- Returns:
The number of spaces per indentation level.
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, an attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- 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.
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- class pyVHDLModel.Formatting.VHDL.VHDLWriter(style=None)[source]
A writer formatting VHDL language model elements as VHDL source text.
The writer handles the
visitor eventsof each supported model class. An element of a class without a walk of its own raisesNotImplementedError; nothing is skipped.Expressions are written with the parentheses VHDL’s operator precedence requires (IEEE Std 1076-2008, clause 9.2). Parentheses from the source (
SubExpression) are kept. Symbols are written from theirName, whether resolved or not.Inheritance
- Parameters:
style (Nullable[VHDLStyle])
- _BASE_SPECIFIERS: ClassVar[dict[BitStringBase, str]] = {<BitStringBase.Binary: 2>: 'b', <BitStringBase.Decimal: 10>: 'd', <BitStringBase.Hexadecimal: 16>: 'x', <BitStringBase.Octal: 8>: 'o'}
Dictionary of base specifiers, indexed by bit string base.
- _minimum: OperatorPrecedence
Loosest precedence of the next operand without parentheses.
- _frames: list[tuple[OperatorPrecedence, bool]]
Stack of entered operands: precedence and if in parentheses.
- property Style: VHDLStyle
Read-only property to access the formatting options (
_style).- Returns:
The formatting options.
- Format(element)[source]
Format a model element as VHDL source text.
Each call starts with an empty buffer at indentation level 0. A declaration, a statement or a design unit ends with a newline.
- Parameters:
element (
ModelEntity|Symbol) – The model element to format.- Return type:
- Returns:
The VHDL source text.
- Raises:
ValueError – If parameter ‘element’ is None.
TypeError – If parameter ‘element’ is not of type
ModelEntityorSymbol.NotImplementedError – If the class of the element or of one of its children has no walk of its own.
VHDLWriterError – If the element or one of its children has no VHDL notation.
- VisitLeftParenthesis(element)[source]
Write the left parenthesis opening a parenthesized list.
- Parameters:
element (
IndexedName|ParenthesisName|TypeConversion|EntityAspectEntity|EntityInstantiation) – The element enclosing the list.- Return type:
- VisitComma(element)[source]
Write the comma between two items of a list.
In a map aspect, the next association starts on a new line.
- Parameters:
element (
IndexedName|ParenthesisName|Aggregate|ConstrainedArraySubtypeSymbol|ConstrainedRecordSubtypeSymbol|EnumeratedType|ArrayType|AttributeSpecification|GenericMapAspectMixin|PortMapAspectMixin|Reference|ComponentConfiguration|ProcessStatement|ProcedureCallMixin|WaveformMixin|SelectedWaveformsMixin|SelectedExpressionsMixin|WaitStatement) – The element containing the list.- Return type:
- VisitArrow(element)[source]
Write the arrow (
=>) between a choice or formal and its value.After the choices of a case or case-generate alternative, the alternative’s body follows on new lines, indented.
- Parameters:
element (
AssociationItem|IndexedAggregateElement|RangedAggregateElement|NamedAggregateElement|ConcurrentCase|SequentialCase) – The element containing the arrow.- Return type:
- VisitApostrophe(expression)[source]
Write the apostrophe of a qualified expression and, unless the operand brings its own, a left parenthesis.
An aggregate or a parenthesized sub-expression brings its own parentheses.
- Parameters:
expression (
QualifiedExpression) – The qualified expression.- Return type:
- VisitWhen(element)[source]
Write the reserved word
whenof a conditional expression or waveform, or of a selected waveform or expression.- Parameters:
element (
WhenElseExpression|ConditionalWaveform|SelectedWaveform|OthersSelectedWaveform|ConditionalExpression|SelectedExpression|OthersSelectedExpression|LoopControlStatement) – The conditional expression, the conditional waveform or the selected waveform or expression.- Return type:
- _Keyword(keyword)[source]
Apply the keyword case of the formatting options to a reserved word.
- Parameters:
keyword (
ReservedWord) – The reserved word.- Return type:
- Returns:
The reserved word in the configured letter case.
- _Keywords(keywords)[source]
Apply the keyword case of the formatting options to reserved words and join them by spaces.
Format:
shared variable,protected body- Parameters:
keywords (
Iterable[ReservedWord]) – The reserved words.- Return type:
- Returns:
The reserved words in the configured letter case, separated by spaces.
- VisitElse(element)[source]
Write the reserved word
elseof a conditional expression or between the alternatives of an assignment.- Parameters:
element (
WhenElseExpression|ConditionalWaveformsMixin|SequentialConditionalVariableAssignment) – The conditional expression or the conditional assignment.- Return type:
- VisitOperator(expression)[source]
Write the operator of a binary expression.
The right operand binds tighter than the operator, unless it’s a primary.
- Parameters:
expression (
BinaryExpression) – The binary expression.- Return type:
- VisitDirection(rng)[source]
Write the direction of a range.
- Parameters:
rng (
RangeExpression|SimpleRange) – The range.- Return type:
- VisitNullLiteral(literal)[source]
Write a null literal.
Format:
null- Parameters:
literal (
NullLiteral) – The null literal.- Return type:
- VisitEnumerationLiteral(literal)[source]
Write an enumeration literal.
Format:
Idle- Parameters:
literal (
EnumerationLiteral) – The enumeration literal.- Return type:
- VisitIntegerLiteral(literal)[source]
Write an integer literal.
Format:
42A negative value is written with a sign, so it binds like a sign.
- Parameters:
literal (
IntegerLiteral) – The integer literal.- Return type:
- _Enter(precedence)[source]
Enter an operand and write a left parenthesis, if it binds looser than its position allows.
- Parameters:
precedence (
OperatorPrecedence) – The precedence level of the operand.- Return type:
- DepartIntegerLiteral(literal)[source]
Leave an integer literal.
- Parameters:
literal (
IntegerLiteral) – The integer literal.- Return type:
- _Leave()[source]
Leave an operand and write a right parenthesis, if it was entered with a left parenthesis.
- Return type:
- VisitFloatingPointLiteral(literal)[source]
Write a floating-point literal.
Format:
3.5A negative value is written with a sign, so it binds like a sign.
- Parameters:
literal (
FloatingPointLiteral) – The floating-point literal.- Return type:
- DepartFloatingPointLiteral(literal)[source]
Leave a floating-point literal.
- Parameters:
literal (
FloatingPointLiteral) – The floating-point literal.- Return type:
- static _PrecedenceOfReal(value)[source]
Determine how tight a floating-point value binds as an operand.
A negative value,
-0.0included, is written with a sign, so it binds like a sign.- Parameters:
value (
float) – The floating-point value.- Return type:
- Returns:
The precedence level.
- _FormatReal(element, value)[source]
Format a floating-point value as VHDL abstract literal with a decimal point.
Format:
1.0e-09- Parameters:
element (
ModelEntity) – The model element carrying the value.value (
float) – The floating-point value.
- Return type:
- Returns:
The VHDL source text.
- Raises:
VHDLWriterError – If the value is infinite or not a number.
- VisitPhysicalIntegerLiteral(literal)[source]
Write a physical literal with an integer value.
Format:
10 ns- Parameters:
literal (
PhysicalIntegerLiteral) – The physical literal.- Return type:
- DepartPhysicalIntegerLiteral(literal)[source]
Leave a physical literal with an integer value.
- Parameters:
literal (
PhysicalIntegerLiteral) – The physical literal.- Return type:
- VisitPhysicalFloatingLiteral(literal)[source]
Write a physical literal with a floating-point value.
Format:
1.5 ns- Parameters:
literal (
PhysicalFloatingLiteral) – The physical literal.- Return type:
- DepartPhysicalFloatingLiteral(literal)[source]
Leave a physical literal with a floating-point value.
- Parameters:
literal (
PhysicalFloatingLiteral) – The physical literal.- Return type:
- VisitCharacterLiteral(literal)[source]
Write a character literal.
Format:
'a'- Parameters:
literal (
CharacterLiteral) – The character literal.- Raises:
VHDLWriterError – If the value is not a single graphic character.
- Return type:
- static _IsGraphic(text)[source]
Check if all characters are VHDL graphic characters (ISO/IEC 8859-1 without control characters).
- VisitStringLiteral(literal)[source]
Write a string literal and double each enclosed quotation mark.
Format:
"say ""hi"" twice"- Parameters:
literal (
StringLiteral) – The string literal.- Raises:
VHDLWriterError – If the value contains a non-graphic character.
- Return type:
- VisitBitStringLiteral(literal)[source]
Write a bit string literal.
Format:
8ux"A0"- Parameters:
literal (
BitStringLiteral) – The bit string literal.- Raises:
VHDLWriterError – If the literal’s class has no base specifier.
VHDLWriterError – If a decimal bit string literal is signed or unsigned.
VHDLWriterError – If the value contains a quotation mark or a non-graphic character.
- Return type:
- VisitUnaryExpression(expression)[source]
Write the operator of a unary expression with a reserved word as operator; its operand is a primary.
Format:
not (a and b)- Parameters:
expression (
UnaryExpression) – The unary expression.- Return type:
- DepartUnaryExpression(expression)[source]
Leave a unary expression with a reserved word as operator.
- Parameters:
expression (
UnaryExpression) – The unary expression.- Return type:
- VisitNegationExpression(expression)[source]
Write the sign of a negation; its operand is a term.
Format:
-a- Parameters:
expression (
NegationExpression) – The negation.- Return type:
- DepartNegationExpression(expression)[source]
Leave a negation.
- Parameters:
expression (
NegationExpression) – The negation.- Return type:
- VisitIdentityExpression(expression)[source]
Write the sign of an identity; its operand is a term.
Format:
+a- Parameters:
expression (
IdentityExpression) – The identity.- Return type:
- DepartIdentityExpression(expression)[source]
Leave an identity.
- Parameters:
expression (
IdentityExpression) – The identity.- Return type:
- DepartTypeConversion(conversion)[source]
Write the right parenthesis closing the operand of a type conversion.
Format:
integer(r)- Parameters:
conversion (
TypeConversion) – The type conversion.- Return type:
- VisitSubExpression(expression)[source]
Write the left parenthesis of a parenthesized sub-expression from the source.
Format:
(a + b)- Parameters:
expression (
SubExpression) – The sub-expression.- Return type:
- DepartSubExpression(expression)[source]
Write the right parenthesis of a parenthesized sub-expression from the source.
- Parameters:
expression (
SubExpression) – The sub-expression.- Return type:
- VisitLogicalExpression(expression)[source]
Enter a binary logical expression; its left operand is a relation or a chain of the same associative operator.
The associative operators are
and,or,xorandxnor.Format:
a and b and cor(a and b) or c- Parameters:
expression (
LogicalExpression) – The logical expression.- Return type:
- DepartLogicalExpression(expression)[source]
Leave a binary logical expression.
- Parameters:
expression (
LogicalExpression) – The logical expression.- Return type:
- VisitRelationalExpression(expression)[source]
Enter a relational expression; its left operand is a shift expression.
Format:
a = b- Parameters:
expression (
RelationalExpression) – The relational expression.- Return type:
- DepartRelationalExpression(expression)[source]
Leave a relational expression.
- Parameters:
expression (
RelationalExpression) – The relational expression.- Return type:
- VisitShiftExpression(expression)[source]
Enter a shift or rotate expression; its left operand is a simple expression.
Format:
a sll 2- Parameters:
expression (
ShiftExpression) – The shift or rotate expression.- Return type:
- DepartShiftExpression(expression)[source]
Leave a shift or rotate expression.
- Parameters:
expression (
ShiftExpression) – The shift or rotate expression.- Return type:
- VisitAddingExpression(expression)[source]
Enter an adding expression; it associates to the left.
Format:
a - b - cora - (b - c)- Parameters:
expression (
AddingExpression) – The adding expression.- Return type:
- DepartAddingExpression(expression)[source]
Leave an adding expression.
- Parameters:
expression (
AddingExpression) – The adding expression.- Return type:
- VisitMultiplyingExpression(expression)[source]
Enter a multiplying expression; it associates to the left.
Format:
(a + b) * c- Parameters:
expression (
MultiplyingExpression) – The multiplying expression.- Return type:
- DepartMultiplyingExpression(expression)[source]
Leave a multiplying expression.
- Parameters:
expression (
MultiplyingExpression) – The multiplying expression.- Return type:
- VisitExponentiationExpression(expression)[source]
Enter an exponentiation; both operands are primaries.
Format:
a ** (b ** c)- Parameters:
expression (
ExponentiationExpression) – The exponentiation.- Return type:
- DepartExponentiationExpression(expression)[source]
Leave an exponentiation.
- Parameters:
expression (
ExponentiationExpression) – The exponentiation.- Return type:
- VisitRangeExpression(expression)[source]
Enter a range expression; its bounds are simple expressions.
Format:
7 downto 0- Parameters:
expression (
RangeExpression) – The range expression.- Return type:
- DepartRangeExpression(expression)[source]
Leave a range expression.
- Parameters:
expression (
RangeExpression) – The range expression.- Return type:
- VisitWhenElseExpression(expression)[source]
Enter a conditional expression; its value and condition are logical expressions.
Format:
a when c else b- Parameters:
expression (
WhenElseExpression) – The conditional expression.- Return type:
- DepartWhenElseExpression(expression)[source]
Leave a conditional expression.
- Parameters:
expression (
WhenElseExpression) – The conditional expression.- Return type:
- DepartQualifiedExpression(expression)[source]
Write the right parenthesis closing the operand of a qualified expression, unless the operand brings its own.
Format:
byte'(others => '0')- Parameters:
expression (
QualifiedExpression) – The qualified expression.- Return type:
- VisitSubtypeAllocation(allocation)[source]
Write the reserved word
newof an allocation of a subtype.Format:
new node- Parameters:
allocation (
SubtypeAllocation) – The allocation.- Return type:
- VisitQualifiedExpressionAllocation(allocation)[source]
Write the reserved word
newof an allocation initialized by a qualified expression.Format:
new integer'(5)- Parameters:
allocation (
QualifiedExpressionAllocation) – The allocation.- Return type:
- VisitAggregate(aggregate)[source]
Write the left parenthesis of an aggregate.
Format:
(0 => '1', others => '0')- Parameters:
aggregate (
Aggregate) – The aggregate.- Raises:
VHDLWriterError – If the aggregate has no elements.
VHDLWriterError – If the aggregate has a single positional element (it would read as parentheses).
Use a named element, e.g.others => value.
- Return type:
- VisitIndexedAggregateElement(element)[source]
Enter an aggregate element chosen by an index; the index is a simple expression.
Format:
0 => '1'- Parameters:
element (
IndexedAggregateElement) – The aggregate element.- Return type:
- VisitOthersAggregateElement(element)[source]
Write the choice
othersof an aggregate element.Format:
others => '0'- Parameters:
element (
OthersAggregateElement) – The aggregate element.- Return type:
- VisitSimpleRange(rng)[source]
Enter a range given by its bounds; its bounds are simple expressions.
Format:
0 to 7- Parameters:
rng (
SimpleRange) – The range.- Return type:
- DepartSimpleRange(rng)[source]
Leave a range given by its bounds.
- Parameters:
rng (
SimpleRange) – The range.- Return type:
- VisitRangeFromName(rng)[source]
Enter a range denoted by a name.
Format:
v'range- Parameters:
rng (
RangeFromName) – The range.- Return type:
- DepartRangeFromName(rng)[source]
Leave a range denoted by a name.
- Parameters:
rng (
RangeFromName) – The range.- Return type:
- VisitSimpleName(name)[source]
Write a simple name.
Format:
clk- Parameters:
name (
SimpleName) – The simple name.- Return type:
- DepartSelectedName(name)[source]
Write the suffix of a selected name after its prefix.
Format:
ieee.numeric_std- Parameters:
name (
SelectedName) – The selected name.- Return type:
- DepartAllName(name)[source]
Write the suffix
allof a selected name after its prefix, or the reserved wordallwithout a prefix.Format:
ieee.numeric_std.allorall
- DepartAttributeName(name)[source]
Write the attribute designator of an attribute name after its prefix.
Format:
v'range- Parameters:
name (
AttributeName) – The attribute name.- Return type:
- DepartIndexedName(name)[source]
Write the right parenthesis closing the indices of an indexed name.
Format:
m(i, j)- Parameters:
name (
IndexedName) – The indexed name.- Return type:
- DepartParenthesisName(name)[source]
Write the right parenthesis closing the associations of a parenthesis name (index, slice or function call).
Format:
resize(a, 8)- Parameters:
name (
ParenthesisName) – The parenthesis name.- Return type:
- VisitSlicedName(name)[source]
Reject a sliced name, because it carries no discrete range.
- Parameters:
name (
SlicedName) – The sliced name.- Raises:
VHDLWriterError – Always, because a sliced name carries no discrete range.
Use aParenthesisNamewith a range expression as association.- Return type:
- VisitAssociationItem(item)[source]
Check an association item before its formal and actual are written.
Format:
formal => actualoractual- Parameters:
item (
AssociationItem) – The association item.- Raises:
VHDLWriterError – If the association item has no actual.
- Return type:
- VisitSemicolon(element)[source]
Write the semicolon between two items of an interface list; the next item starts on a new line.
- Parameters:
element (
WithGenericsMixin|WithPortsMixin|WithParametersMixin) – The element containing the interface list.- Return type:
- VisitVariableAssignment(element)[source]
Write the variable assignment delimiter (
:=) before a default expression or the value of a variable assignment.- Parameters:
element (
WithDefaultExpressionMixin|AssignmentMixin) – The element with the default expression or the variable assignment.- Return type:
- VisitIs(element)[source]
Write the reserved word
isending the header of a declaration; its body is indented.In an alias declaration and an attribute specification, the name or the expression follows on the same line. A subprogram without declared items and statements is a subprogram declaration, which has no
is.- Parameters:
element (
ModeViewDeclaration|Alias|AttributeSpecification|Subprogram|Architecture|Configuration|ProcessStatement|CaseStatement) – The declaration.- Return type:
- VisitRangeConstraint(symbol)[source]
Write the reserved word
rangeof a range constraint.Format:
integer range 0 to 7- Parameters:
symbol (
ConstrainedScalarSubtypeSymbol) – The constrained subtype symbol.- Return type:
- VisitIndexConstraint(element)[source]
Write the left parenthesis of an index constraint.
Format:
bit_vector(7 downto 0)- Parameters:
element (
ConstrainedArraySubtypeSymbol|ConstrainedRecordSubtypeSymbol|ArrayType) – The constrained subtype symbol or the array type.- Return type:
- DepartIndexConstraint(element)[source]
Write the right parenthesis of an index constraint.
- Parameters:
element (
ConstrainedArraySubtypeSymbol|ConstrainedRecordSubtypeSymbol|ArrayType) – The constrained subtype symbol or the array type.- Return type:
- VisitRecordConstraint(symbol)[source]
Write the left parenthesis of a record constraint.
Format:
frame(data(7 downto 0), mask(3 downto 0))- Parameters:
symbol (
ConstrainedRecordSubtypeSymbol) – The constrained subtype symbol.- Return type:
- DepartRecordConstraint(symbol)[source]
Write the right parenthesis of a record constraint.
- Parameters:
symbol (
ConstrainedRecordSubtypeSymbol) – The constrained subtype symbol.- Return type:
- VisitGenericClause(element)[source]
Write the reserved word
genericand the left parenthesis of a generic clause; each generic is on its own line.Format:
generic (…);The generic clause of a subprogram follows its designator on the same line and ends without a semicolon.
- Parameters:
element (
WithGenericsMixin) – The element with generics.- Return type:
- DepartGenericClause(element)[source]
Write the right parenthesis of a generic clause on its own line.
- Parameters:
element (
WithGenericsMixin) – The element with generics.- Return type:
- _WriteClosingParenthesis(terminator)[source]
Write the right parenthesis closing a list on its own line, one indentation level up.
- VisitPortClause(element)[source]
Write the reserved word
portand the left parenthesis of a port clause; each port is on its own line.Format:
port (…);- Parameters:
element (
WithPortsMixin) – The element with ports.- Return type:
- DepartPortClause(element)[source]
Write the right parenthesis of a port clause on its own line.
- Parameters:
element (
WithPortsMixin) – The element with ports.- Return type:
- VisitConstant(constant)[source]
Write the reserved word
constantand the identifiers of a constant declaration.Format:
constant BITS : positive := 8;
- _WriteObjectDeclaration(obj)[source]
Write the indentation, the object class reserved word and the identifiers of an object declaration.
- VisitDeferredConstant(constant)[source]
Write the reserved word
constantand the identifiers of a deferred constant declaration.Format:
constant BITS : positive;- Parameters:
constant (
DeferredConstant) – The deferred constant declaration.- Return type:
- DepartDeferredConstant(constant)[source]
Write the semicolon ending a deferred constant declaration.
- Parameters:
constant (
DeferredConstant) – The deferred constant declaration.- Return type:
- VisitVariable(variable)[source]
Write the reserved word
variableand the identifiers of a variable declaration.Format:
variable count : natural := 0;
Write the reserved words
shared variableand the identifiers of a shared variable declaration.Format:
shared variable counter : counter_t;- Parameters:
variable (
SharedVariable) – The shared variable declaration.- Return type:
Write the semicolon ending a shared variable declaration.
- Parameters:
variable (
SharedVariable) – The shared variable declaration.- Return type:
- VisitSignal(signal)[source]
Write the reserved word
signaland the identifiers of a signal declaration.Format:
signal a, b : bit := '0';
- VisitFile(file)[source]
Write the reserved word
fileand the identifiers of a file declaration.Format:
file input : text;The model carries no file open information, so none is written.
- VisitGenericConstantInterfaceItem(item)[source]
Write the identifiers and the mode of a generic constant.
Format:
BITS : positive := 8- Parameters:
item (
GenericConstantInterfaceItem) – The generic constant.- Return type:
- _WriteInterfaceItem(item, keywords, mode)[source]
Write the object class reserved words (if any), the identifiers and the mode (if any) of an interface item.
- VisitGenericTypeInterfaceItem(item)[source]
Write a generic type.
Format:
type T- Parameters:
item (
GenericTypeInterfaceItem) – The generic type.- Return type:
- VisitPortSimpleSignalInterfaceItem(item)[source]
Write the identifiers and the mode of a port.
Format:
clk : in std_logic- Parameters:
item (
PortSimpleSignalInterfaceItem) – The port.- Return type:
- VisitPortViewSignalInterfaceItem(item)[source]
Write the identifiers and the reserved word
viewof a port with a mode view.Format:
link : view master- Parameters:
item (
PortViewSignalInterfaceItem) – The port.- Return type:
- VisitParameterConstantInterfaceItem(item)[source]
Write the reserved word
constant, the identifiers and the mode of a constant parameter.Format:
constant value : in integer- Parameters:
item (
ParameterConstantInterfaceItem) – The constant parameter.- Return type:
- VisitParameterVariableInterfaceItem(item)[source]
Write the reserved word
variable, the identifiers and the mode of a variable parameter.Format:
variable result : out integer- Parameters:
item (
ParameterVariableInterfaceItem) – The variable parameter.- Return type:
- VisitParameterSimpleSignalInterfaceItem(item)[source]
Write the reserved word
signal, the identifiers and the mode of a signal parameter.Format:
signal clk : in std_logic- Parameters:
item (
ParameterSimpleSignalInterfaceItem) – The signal parameter.- Return type:
- VisitParameterViewSignalInterfaceItem(item)[source]
Write the reserved word
signal, the identifiers and the reserved wordviewof a signal parameter.Format:
signal link : view master- Parameters:
item (
ParameterViewSignalInterfaceItem) – The signal parameter.- Return type:
- VisitParameterFileInterfaceItem(item)[source]
Write the reserved word
fileand the identifiers of a file parameter.Format:
file input : text- Parameters:
item (
ParameterFileInterfaceItem) – The file parameter.- Return type:
- VisitModeViewDeclaration(declaration)[source]
Write the reserved word
view, the identifier and the reserved wordofof a mode view declaration.Format:
view master of bus_t is…end view master;- Parameters:
declaration (
ModeViewDeclaration) – The mode view declaration.- Return type:
- DepartModeViewDeclaration(declaration)[source]
Write the end of a mode view declaration.
- Parameters:
declaration (
ModeViewDeclaration) – The mode view declaration.- Return type:
- _WriteEnd(keywords, identifier)[source]
Leave the indented body and write the reserved word
end, the given reserved words and the identifier.
- _WriteEndLine(keywords, identifier)[source]
Write the reserved word
end, the given reserved words and the identifier on a line of the current level.
- VisitSimpleModeViewElement(element)[source]
Write an element of a mode view with a mode.
Format:
valid, data : out;- Parameters:
element (
SimpleModeViewElement) – The mode view element.- Raises:
VHDLWriterError – If the mode view element has no mode.
- Return type:
- VisitCompositeModeViewElement(element)[source]
Write the identifiers and the reserved word
viewof an element of a mode view with a mode view.Format:
request : view master;- Parameters:
element (
CompositeModeViewElement) – The mode view element.- Return type:
- DepartCompositeModeViewElement(element)[source]
Write the semicolon ending an element of a mode view with a mode view.
- Parameters:
element (
CompositeModeViewElement) – The mode view element.- Return type:
- VisitComponent(component)[source]
Write the header of a component declaration; its generic and port clauses are indented.
Format:
component counter is…end component counter;
- VisitBox(arrayType)[source]
Write the reserved word
rangeand the box (<>) of an unbounded index of an array type.Format:
natural range <>
- VisitUnits(physicalType)[source]
Write the reserved word
unitsand the primary unit of a physical type on their own lines.- Parameters:
physicalType (
PhysicalType) – The physical type.- Return type:
- VisitSecondaryUnitDeclaration(physicalType, identifier)[source]
Write the identifier of a secondary unit declaration.
Format:
mm = 1000 um;- Parameters:
physicalType (
PhysicalType) – The physical type.identifier (
str) – The identifier of the secondary unit.
- Return type:
- DepartSecondaryUnitDeclaration(physicalType, identifier)[source]
Write the semicolon ending a secondary unit declaration.
- Parameters:
physicalType (
PhysicalType) – The physical type.identifier (
str) – The identifier of the secondary unit.
- Return type:
- VisitEntitySpecification(specification)[source]
Write the reserved word
ofbefore the names of an attribute specification.- Parameters:
specification (
AttributeSpecification) – The attribute specification.- Return type:
- DepartEntitySpecification(specification)[source]
Write the entity class after the names of an attribute specification.
- Parameters:
specification (
AttributeSpecification) – The attribute specification.- Return type:
- VisitAnonymousType(declaration)[source]
Write an incomplete type declaration.
Format:
type node;- Parameters:
declaration (
AnonymousType) – The incomplete type declaration.- Return type:
- VisitSubtype(subtype)[source]
Write the reserved word
subtype, the identifier and the reserved wordisof a subtype declaration.Format:
subtype byte is bit_vector(7 downto 0);The model’s resolution function of a subtype is not written.
- VisitEnumeratedType(enumeratedType)[source]
Write the header and the left parenthesis of an enumerated type declaration.
Format:
type state is (Idle, Busy, Done);- Parameters:
enumeratedType (
EnumeratedType) – The enumerated type.- Return type:
- _WriteTypeHeader(declaration)[source]
Write the indentation, the reserved word
type, the identifier and the reserved wordisof a type.
- DepartEnumeratedType(enumeratedType)[source]
Write the right parenthesis ending an enumerated type declaration.
- Parameters:
enumeratedType (
EnumeratedType) – The enumerated type.- Return type:
- VisitIntegerType(integerType)[source]
Write the header and the reserved word
rangeof an integer type declaration.Format:
type nibble is range 0 to 15;- Parameters:
integerType (
IntegerType) – The integer type.- Return type:
- DepartIntegerType(integerType)[source]
Write the semicolon ending an integer type declaration.
- Parameters:
integerType (
IntegerType) – The integer type.- Return type:
- VisitRealType(realType)[source]
Write the header and the reserved word
rangeof a floating-point type declaration.Format:
type fraction is range 0.0 to 1.0;
- VisitPhysicalType(physicalType)[source]
Write the header and the reserved word
rangeof a physical type declaration; its units are indented.Format:
type distance is range 0 to 1000000…units…end units distance;- Parameters:
physicalType (
PhysicalType) – The physical type.- Return type:
- DepartPhysicalType(physicalType)[source]
Write the end of the units of a physical type declaration.
- Parameters:
physicalType (
PhysicalType) – The physical type.- Return type:
- VisitArrayType(arrayType)[source]
Write the header and the reserved word
arrayof an array type declaration.Format:
type memory is array (0 to 255) of byte;ortype bits is array (natural range <>) of bit;
- VisitRecordType(recordType)[source]
Write the header of a record type declaration; its element declarations are indented.
Format:
type frame is record…end record frame;- Parameters:
recordType (
RecordType) – The record type.- Return type:
- DepartRecordType(recordType)[source]
Write the end of a record type declaration.
- Parameters:
recordType (
RecordType) – The record type.- Return type:
- VisitRecordTypeElement(element)[source]
Write the identifiers of an element declaration of a record type.
Format:
valid, last : bit;- Parameters:
element (
RecordTypeElement) – The record element declaration.- Return type:
- DepartRecordTypeElement(element)[source]
Write the semicolon ending an element declaration of a record type.
- Parameters:
element (
RecordTypeElement) – The record element declaration.- Return type:
- VisitAccessType(accessType)[source]
Write the header and the reserved word
accessof an access type declaration.Format:
type pointer is access node;- Parameters:
accessType (
AccessType) – The access type.- Return type:
- DepartAccessType(accessType)[source]
Write the semicolon ending an access type declaration.
- Parameters:
accessType (
AccessType) – The access type.- Return type:
- VisitFileType(fileType)[source]
Write the header and the reserved words
file ofof a file type declaration.Format:
type text_file is file of string;
- VisitAlias(alias)[source]
Write the reserved word
aliasand the identifier of an alias declaration.Format:
alias low : bit_vector(3 downto 0) is data(3 downto 0);oralias clock is clk;
- VisitAttribute(attribute)[source]
Write the reserved word
attributeand the identifier of an attribute declaration.Format:
attribute keep : boolean;
- VisitAttributeSpecification(specification)[source]
Write the reserved word
attributeof an attribute specification.Format:
attribute keep of valid, ready : signal is true;- Parameters:
specification (
AttributeSpecification) – The attribute specification.- Raises:
VHDLWriterError – If the entity class is
EntityClass.Others.- Return type:
- DepartAttributeSpecification(specification)[source]
Write the semicolon ending an attribute specification.
- Parameters:
specification (
AttributeSpecification) – The attribute specification.- Return type:
- VisitBegin(element)[source]
Write the reserved word
beginbefore the statement part on its own line.A subprogram declaration, an entity without statements and the body of a generate statement without declared items have no
begin.- Parameters:
element (
Subprogram|Entity|Architecture|ProcessStatement|ConcurrentBlockStatement|GenerateBranch|ConcurrentCase|ForGenerateStatement) – The element with a statement part.- Return type:
- static _IsSubprogramBody(subprogram)[source]
Check if a subprogram is written as a subprogram body.
A subprogram is a body, if it has declared items or statements, or if its parent is neither a package declaration nor a protected type declaration (e.g. a package body or an architecture).
- Parameters:
subprogram (
Subprogram) – The subprogram.- Return type:
- Returns:
True, if the subprogram is written as a subprogram body.
- VisitReturn(function)[source]
Write the reserved word
returnbefore the return type of a function.- Parameters:
function (
Function|GenericFunctionInterfaceItem) – The function.- Return type:
- VisitFormalParameterList(element)[source]
Write the left parenthesis of a formal parameter list; each parameter is on its own line.
Format:
procedure p (…)After a generic clause, the reserved word
parameterprecedes the left parenthesis.- Parameters:
element (
WithParametersMixin) – The element with parameters.- Return type:
- DepartFormalParameterList(element)[source]
Write the right parenthesis of a formal parameter list on its own line.
- Parameters:
element (
WithParametersMixin) – The element with parameters.- Return type:
- VisitGenericMapAspect(element)[source]
Write the reserved words
generic mapand the left parenthesis on a new line; each association is on its own line.Format:
generic map (…)The generic map aspect of a block statement is written like its generic clause and ends with a semicolon.
- Parameters:
element (
GenericMapAspectMixin) – The element with a generic map aspect.- Return type:
- _WriteMapAspect(keyword, element)[source]
Write the reserved words of a map aspect and the left parenthesis on a new line, one indentation level deeper.
In a block statement, the map aspect starts its own line at the block header’s indentation level.
- Parameters:
keyword (
ReservedWord) – The reserved wordgenericorport.element (
GenericMapAspectMixin|PortMapAspectMixin) – The element with the map aspect.
- Return type:
- DepartGenericMapAspect(element)[source]
Write the right parenthesis of a generic map aspect on its own line.
- Parameters:
element (
GenericMapAspectMixin) – The element with a generic map aspect.- Return type:
- _WriteMapAspectEnd(element)[source]
Write the right parenthesis of a map aspect on its own line and leave its indentation level.
In a block statement, a semicolon follows the right parenthesis.
- Parameters:
element (
GenericMapAspectMixin|PortMapAspectMixin) – The element with the map aspect.- Return type:
- VisitProcedure(procedure)[source]
Write the reserved word
procedureand the designator of a procedure declaration or body.Format:
procedure reset;orprocedure reset is…begin…end procedure reset;A procedure without declared items and statements is written as a procedure declaration.
- DepartProcedure(procedure)[source]
Write the semicolon ending a procedure declaration, or the end of a procedure body.
- VisitFunction(function)[source]
Write the reserved word
impure, if impure,functionand the designator of a function declaration or body.Format:
function parity return bit;orfunction parity return bit is…end function parity;A function without declared items and statements is written as a function declaration.
- _WriteFunctionDesignator(function)[source]
Write the reserved word
impure, if impure, the reserved wordfunctionand the designator of a function.
- DepartFunction(function)[source]
Write the semicolon ending a function declaration, or the end of a function body.
- VisitGenericProcedureInterfaceItem(item)[source]
Write the reserved word
procedureand the designator of a generic procedure.Format:
procedure log (…)- Parameters:
item (
GenericProcedureInterfaceItem) – The generic procedure.- Return type:
- VisitGenericFunctionInterfaceItem(item)[source]
Write the reserved word
impure, if impure,functionand the designator of a generic function.Format:
function compare (…) return boolean- Parameters:
item (
GenericFunctionInterfaceItem) – The generic function.- Return type:
- VisitProcedureInstantiation(instantiation)[source]
Write the reserved word
procedure, the designator and the reserved wordsis newof a procedure instantiation.Format:
procedure log_byte is new log…;- Parameters:
instantiation (
ProcedureInstantiation) – The procedure instantiation.- Return type:
- DepartProcedureInstantiation(instantiation)[source]
Write the semicolon ending a procedure instantiation.
- Parameters:
instantiation (
ProcedureInstantiation) – The procedure instantiation.- Return type:
- VisitFunctionInstantiation(instantiation)[source]
Write the reserved word
function, the designator and the reserved wordsis newof a function instantiation.Format:
function maximum_byte is new maximum…;- Parameters:
instantiation (
FunctionInstantiation) – The function instantiation.- Return type:
- DepartFunctionInstantiation(instantiation)[source]
Write the semicolon ending a function instantiation.
- Parameters:
instantiation (
FunctionInstantiation) – The function instantiation.- Return type:
- VisitProtectedType(protectedType)[source]
Write the header of a protected type declaration; its methods are indented.
Format:
type counter is protected…end protected counter;- Parameters:
protectedType (
ProtectedType) – The protected type.- Return type:
- DepartProtectedType(protectedType)[source]
Write the end of a protected type declaration.
- Parameters:
protectedType (
ProtectedType) – The protected type.- Return type:
- VisitProtectedTypeBody(body)[source]
Write the header of a protected type body; its declared items are indented.
Format:
type counter is protected body…end protected body counter;- Parameters:
body (
ProtectedTypeBody) – The protected type body.- Return type:
- DepartProtectedTypeBody(body)[source]
Write the end of a protected type body.
- Parameters:
body (
ProtectedTypeBody) – The protected type body.- Return type:
- VisitPortMapAspect(element)[source]
Write the reserved words
port mapand the left parenthesis on a new line; each association is on its own line.Format:
port map (…)- Parameters:
element (
PortMapAspectMixin) – The element with a port map aspect.- Return type:
- DepartPortMapAspect(element)[source]
Write the right parenthesis of a port map aspect on its own line.
- Parameters:
element (
PortMapAspectMixin) – The element with a port map aspect.- Return type:
- VisitContextClause(designUnit)[source]
Separate a design unit by a blank line from the text written before it.
- Parameters:
designUnit (
DesignUnit) – The design unit.- Return type:
- DepartContextClause(designUnit)[source]
Separate the context items of a design unit by a blank line from the design unit.
- Parameters:
designUnit (
DesignUnit) – The design unit.- Return type:
- VisitLibraryClause(clause)[source]
Write the reserved word
libraryof a library clause.Format:
library ieee;- Parameters:
clause (
LibraryClause) – The library clause.- Return type:
- DepartLibraryClause(clause)[source]
Write the semicolon ending a library clause.
- Parameters:
clause (
LibraryClause) – The library clause.- Return type:
- VisitUseClause(clause)[source]
Write the reserved word
useof a use clause.Format:
use ieee.numeric_std.all;
- VisitContextReference(reference)[source]
Write the reserved word
contextof a context reference.Format:
context ieee.ieee_std_context;- Parameters:
reference (
ContextReference) – The context reference.- Return type:
- DepartContextReference(reference)[source]
Write the semicolon ending a context reference.
- Parameters:
reference (
ContextReference) – The context reference.- Return type:
- VisitContext(context)[source]
Write the header of a context declaration; its context items are indented.
Format:
context project is…end context project;
- _WriteUnitHeader(keywords, identifier)[source]
Write the reserved words, the identifier and the reserved word
isof a header; the body is indented.- Parameters:
keywords (
tuple[ReservedWord,...]) – The reserved words before the identifier.identifier (
str) – The identifier.
- Return type:
- VisitPackage(package)[source]
Write the header of a package declaration; its generic clause and declared items are indented.
Format:
package utilities is…end package utilities;
- VisitPackageBody(body)[source]
Write the header of a package body; its declared items are indented.
Format:
package body utilities is…end package body utilities;- Parameters:
body (
PackageBody) – The package body.- Return type:
- DepartPackageBody(body)[source]
Write the end of a package body.
- Parameters:
body (
PackageBody) – The package body.- Return type:
- VisitPackageInstantiation(instantiation)[source]
Write the reserved word
package, the identifier and the reserved wordsis newof a package instantiation.Format:
package fifo_byte is new work.fifo…;- Parameters:
instantiation (
PackageInstantiation) – The package instantiation.- Return type:
- DepartPackageInstantiation(instantiation)[source]
Write the semicolon ending a package instantiation.
- Parameters:
instantiation (
PackageInstantiation) – The package instantiation.- Return type:
- VisitEntity(entity)[source]
Write the header of an entity declaration; its generic and port clauses and its declared items are indented.
Format:
entity counter is…end entity counter;
- VisitArchitecture(architecture)[source]
Write the reserved word
architecture, the identifier and the reserved wordofof an architecture body.Format:
architecture rtl of counter is…begin…end architecture rtl;- Parameters:
architecture (
Architecture) – The architecture body.- Return type:
- DepartArchitecture(architecture)[source]
Write the end of an architecture body.
- Parameters:
architecture (
Architecture) – The architecture body.- Return type:
- VisitConfiguration(configuration)[source]
Write the reserved word
configuration, the identifier and the reserved wordofof a configuration.Format:
configuration counter_cfg of counter is…end configuration counter_cfg;- Parameters:
configuration (
Configuration) – The configuration declaration.- Return type:
- DepartConfiguration(configuration)[source]
Write the end of a configuration declaration.
- Parameters:
configuration (
Configuration) – The configuration declaration.- Return type:
- VisitBlockConfiguration(configuration)[source]
Write the reserved word
forof a block configuration; its nested configurations are indented.Format:
for rtl…end for;- Parameters:
configuration (
BlockConfiguration) – The block configuration.- Return type:
- DepartBlockSpecification(configuration)[source]
End the line of a block specification; the nested configurations are indented.
- Parameters:
configuration (
BlockConfiguration) – The block configuration.- Return type:
- DepartBlockConfiguration(configuration)[source]
Write the end of a block configuration.
- Parameters:
configuration (
BlockConfiguration) – The block configuration.- Return type:
- VisitComponentConfiguration(configuration)[source]
Write the reserved word
forof a component configuration.Format:
for all : counter use entity work.counter(rtl);…end for;- Parameters:
configuration (
ComponentConfiguration) – The component configuration.- Return type:
- DepartInstantiationList(configuration)[source]
Write the colon between the instantiation list and the component name of a component configuration.
- Parameters:
configuration (
ComponentConfiguration) – The component configuration.- Return type:
- DepartComponentConfiguration(configuration)[source]
Write the end of a component configuration on its own line.
- Parameters:
configuration (
ComponentConfiguration) – The component configuration.- Return type:
- VisitBindingIndication(indication)[source]
Write the reserved word
useof a binding indication on a new line, one indentation level deeper.Format:
use entity work.counter(rtl)…;- Parameters:
indication (
BindingIndication) – The binding indication.- Return type:
- DepartBindingIndication(indication)[source]
Write the semicolon ending a binding indication.
- Parameters:
indication (
BindingIndication) – The binding indication.- Return type:
- VisitEntityAspectEntity(aspect)[source]
Write the reserved word
entityof an entity aspect naming an entity.Format:
entity work.counter(rtl)- Parameters:
aspect (
EntityAspectEntity) – The entity aspect.- Return type:
- VisitEntityAspectConfiguration(aspect)[source]
Write the reserved word
configurationof an entity aspect naming a configuration.Format:
configuration work.counter_cfg- Parameters:
aspect (
EntityAspectConfiguration) – The entity aspect.- Return type:
- VisitEntityAspectOpen(aspect)[source]
Write the reserved word
openof an open entity aspect.Format:
open- Parameters:
aspect (
EntityAspectOpen) – The entity aspect.- Return type:
- VisitAllInstantiationList(instantiationList)[source]
Write the reserved word
allof an instantiation list.Format:
all- Parameters:
instantiationList (
AllInstantiationList) – The instantiation list.- Return type:
- VisitOthersInstantiationList(instantiationList)[source]
Write the reserved word
othersof an instantiation list.Format:
others- Parameters:
instantiationList (
OthersInstantiationList) – The instantiation list.- Return type:
- VisitSignalAssignment(element)[source]
Write the signal assignment delimiter (
<=) between the target and the waveform of a signal assignment.In a force assignment, the reserved word
forcefollows.- Parameters:
element (
SignalAssignmentMixin) – The signal assignment.- Return type:
- VisitAfter(element)[source]
Write the reserved word
afterbefore the delay of a waveform element.- Parameters:
element (
WaveformElement) – The waveform element.- Return type:
- VisitSelect(element)[source]
Write the reserved word
selectbetween the selector and the target of a selected assignment.- Parameters:
element (
ConcurrentSelectedSignalAssignment|SequentialSelectedVariableAssignment|SequentialSelectedSignalAssignment) – The selected assignment.- Return type:
- VisitBar(element)[source]
Write the vertical line (
|) between two choices.- Parameters:
element (
SelectedWaveform|GenerateCase|SelectedExpression|Case) – The element with the choices.- Return type:
- VisitReport(element)[source]
Write the reserved word
reportbefore the message of an assertion or report.A report statement starts with the reserved word.
- Parameters:
element (
ReportStatementMixin) – The assertion or report.- Return type:
- VisitSeverity(element)[source]
Write the reserved word
severitybefore the severity level of an assertion or report.- Parameters:
element (
ReportStatementMixin) – The assertion or report.- Return type:
- VisitSensitivityList(process)[source]
Write the left parenthesis of the sensitivity list of a process.
Format:
process (clk, rst)orprocess (all)- Parameters:
process (
ProcessStatement) – The process.- Return type:
- DepartSensitivityList(process)[source]
Write the right parenthesis of the sensitivity list of a process.
- Parameters:
process (
ProcessStatement) – The process.- Return type:
- VisitActualParameterPart(call)[source]
Write the left parenthesis of the actual parameter part of a procedure call.
- Parameters:
call (
ProcedureCallMixin) – The procedure call.- Return type:
- DepartActualParameterPart(call)[source]
Write the right parenthesis of the actual parameter part of a procedure call.
- Parameters:
call (
ProcedureCallMixin) – The procedure call.- Return type:
- DepartOthersSelectedWaveform(waveform)[source]
Write the choice
othersof theothersselected waveform.Format:
'0' when others- Parameters:
waveform (
OthersSelectedWaveform) – The selected waveform.- Return type:
- VisitIndexedChoice(choice)[source]
Enter a choice given by a value; the value is a simple expression.
Format:
'0'- Parameters:
choice (
IndexedChoice) – The choice.- Return type:
- VisitProcessStatement(process)[source]
Write the label, if any, and the reserved word
processof a process statement.Format:
count : process (clk) is…begin…end process count;A process with
allas sensitivity list has a singleAllNamewithout prefix in its sensitivity list.- Parameters:
process (
ProcessStatement) – The process.- Return type:
- _WriteStatementStart(statement)[source]
Write the indentation and the label, if any, of a statement.
- DepartProcessStatement(process)[source]
Write the end of a process statement.
- Parameters:
process (
ProcessStatement) – The process.- Return type:
- VisitConcurrentProcedureCall(call)[source]
Write the label, if any, of a concurrent procedure call.
Format:
check(clk, rst);- Parameters:
call (
ConcurrentProcedureCall) – The procedure call.- Return type:
- DepartConcurrentProcedureCall(call)[source]
Write the semicolon ending a concurrent procedure call.
- Parameters:
call (
ConcurrentProcedureCall) – The procedure call.- Return type:
- VisitConcurrentSimpleSignalAssignment(assignment)[source]
Write the label, if any, of a concurrent simple signal assignment.
Format:
q <= d after 1 ns;- Parameters:
assignment (
ConcurrentSimpleSignalAssignment) – The signal assignment.- Return type:
- DepartConcurrentSimpleSignalAssignment(assignment)[source]
Write the semicolon ending a concurrent simple signal assignment.
- Parameters:
assignment (
ConcurrentSimpleSignalAssignment) – The signal assignment.- Return type:
- VisitConcurrentSelectedSignalAssignment(assignment)[source]
Write the label, if any, and the reserved word
withof a concurrent selected signal assignment.Format:
with sel select q <= a when '0', b when others;- Parameters:
assignment (
ConcurrentSelectedSignalAssignment) – The signal assignment.- Return type:
- DepartConcurrentSelectedSignalAssignment(assignment)[source]
Write the semicolon ending a concurrent selected signal assignment.
- Parameters:
assignment (
ConcurrentSelectedSignalAssignment) – The signal assignment.- Return type:
- VisitConcurrentConditionalSignalAssignment(assignment)[source]
Write the label, if any, of a concurrent conditional signal assignment.
Format:
q <= a when sel = '0' else b;- Parameters:
assignment (
ConcurrentConditionalSignalAssignment) – The signal assignment.- Return type:
- DepartConcurrentConditionalSignalAssignment(assignment)[source]
Write the semicolon ending a concurrent conditional signal assignment.
- Parameters:
assignment (
ConcurrentConditionalSignalAssignment) – The signal assignment.- Return type:
- VisitConcurrentAssertStatement(assertion)[source]
Write the label, if any, and the reserved word
assertof a concurrent assertion.Format:
assert BITS > 0 report "no bits" severity failure;- Parameters:
assertion (
ConcurrentAssertStatement) – The assertion.- Return type:
- DepartConcurrentAssertStatement(assertion)[source]
Write the semicolon ending a concurrent assertion.
- Parameters:
assertion (
ConcurrentAssertStatement) – The assertion.- Return type:
- VisitRightParenthesis(element)[source]
Write the right parenthesis after the architecture name of an entity aspect or entity instantiation.
- Parameters:
element (
EntityAspectEntity|EntityInstantiation) – The element enclosing the architecture name.- Return type:
- VisitGenerate(element)[source]
Write the reserved word
generate; the body of the generate statement or branch is indented.- Parameters:
element (
GenerateBranch|CaseGenerateStatement|ForGenerateStatement) – The generate statement or branch.- Return type:
- VisitComponentInstantiation(instantiation)[source]
Write the label and the reserved word
componentof a component instantiation.Format:
u1 : component counter…;- Parameters:
instantiation (
ComponentInstantiation) – The component instantiation.- Raises:
VHDLWriterError – If the component instantiation has no label.
- Return type:
- DepartComponentInstantiation(instantiation)[source]
Write the semicolon ending a component instantiation.
- Parameters:
instantiation (
ComponentInstantiation) – The component instantiation.- Return type:
- VisitEntityInstantiation(instantiation)[source]
Write the label and the reserved word
entityof an entity instantiation.Format:
u1 : entity work.counter(rtl)…;- Parameters:
instantiation (
EntityInstantiation) – The entity instantiation.- Raises:
VHDLWriterError – If the entity instantiation has no label.
- Return type:
- DepartEntityInstantiation(instantiation)[source]
Write the semicolon ending an entity instantiation.
- Parameters:
instantiation (
EntityInstantiation) – The entity instantiation.- Return type:
- VisitConfigurationInstantiation(instantiation)[source]
Write the label and the reserved word
configurationof a configuration instantiation.Format:
u1 : configuration work.counter_cfg…;- Parameters:
instantiation (
ConfigurationInstantiation) – The configuration instantiation.- Raises:
VHDLWriterError – If the configuration instantiation has no label.
- Return type:
- DepartConfigurationInstantiation(instantiation)[source]
Write the semicolon ending a configuration instantiation.
- Parameters:
instantiation (
ConfigurationInstantiation) – The configuration instantiation.- Return type:
- VisitConcurrentBlockStatement(block)[source]
Write the label and the reserved word
blockof a block statement; its header and declarations are indented.Format:
inner : block…begin…end block inner;- Parameters:
block (
ConcurrentBlockStatement) – The block statement.- Raises:
VHDLWriterError – If the block statement has no label.
- Return type:
- DepartConcurrentBlockStatement(block)[source]
Write the end of a block statement.
- Parameters:
block (
ConcurrentBlockStatement) – The block statement.- Return type:
- VisitIfGenerateStatement(statement)[source]
Write the label of an if-generate statement; its branches follow.
Format:
gen : if BITS > 8 generate…elsif…else generate…end generate gen;- Parameters:
statement (
IfGenerateStatement) – The if-generate statement.- Raises:
VHDLWriterError – If the if-generate statement has no label.
- Return type:
- DepartIfGenerateStatement(statement)[source]
Write the end of an if-generate statement.
- Parameters:
statement (
IfGenerateStatement) – The if-generate statement.- Return type:
- VisitIfGenerateBranch(branch)[source]
Write the reserved word
ifand the alternative label, if any, of the if branch of an if-generate statement.- Parameters:
branch (
IfGenerateBranch) – The generate branch.- Return type:
- _WriteAlternativeLabel(branch)[source]
Write the alternative label, if any, of a generate branch, followed by a colon.
- Parameters:
branch (
GenerateBranch) – The generate branch.- Return type:
- DepartIfGenerateBranch(branch)[source]
Leave the body of the if branch of an if-generate statement.
- Parameters:
branch (
IfGenerateBranch) – The generate branch.- Return type:
- VisitElsifGenerateBranch(branch)[source]
Write the reserved word
elsifand the alternative label, if any, of an elsif branch of an if-generate statement.- Parameters:
branch (
ElsifGenerateBranch) – The generate branch.- Return type:
- DepartElsifGenerateBranch(branch)[source]
Leave the body of an elsif branch of an if-generate statement.
- Parameters:
branch (
ElsifGenerateBranch) – The generate branch.- Return type:
- VisitElseGenerateBranch(branch)[source]
Write the reserved word
elseand the alternative label, if any, of the else branch of an if-generate statement.- Parameters:
branch (
ElseGenerateBranch) – The generate branch.- Return type:
- DepartElseGenerateBranch(branch)[source]
Leave the body of the else branch of an if-generate statement.
- Parameters:
branch (
ElseGenerateBranch) – The generate branch.- Return type:
- VisitCaseGenerateStatement(statement)[source]
Write the label and the reserved word
caseof a case-generate statement; its alternatives are indented.Format:
gen : case MODE generate…when 0 =>…end generate gen;- Parameters:
statement (
CaseGenerateStatement) – The case-generate statement.- Raises:
VHDLWriterError – If the case-generate statement has no label.
- Return type:
- DepartCaseGenerateStatement(statement)[source]
Write the end of a case-generate statement.
- Parameters:
statement (
CaseGenerateStatement) – The case-generate statement.- Return type:
- VisitGenerateCase(case)[source]
Write the reserved word
whenand the alternative label, if any, of an alternative of a case-generate statement.Format:
when 1 | 2 =>- Parameters:
case (
GenerateCase) – The case-generate alternative.- Return type:
- DepartGenerateCase(case)[source]
Leave the body of an alternative of a case-generate statement.
- Parameters:
case (
GenerateCase) – The case-generate alternative.- Return type:
- VisitOthersGenerateCase(case)[source]
Write the reserved words
whenandothersof theothersalternative of a case-generate statement.Format:
when others =>- Parameters:
case (
OthersGenerateCase) – The case-generate alternative.- Return type:
- DepartOthersGenerateCase(case)[source]
Leave the body of the
othersalternative of a case-generate statement.- Parameters:
case (
OthersGenerateCase) – The case-generate alternative.- Return type:
- VisitIndexedGenerateChoice(choice)[source]
Enter a case-generate choice given by a value; the value is a simple expression.
Format:
8- Parameters:
choice (
IndexedGenerateChoice) – The choice.- Return type:
- VisitForGenerateStatement(statement)[source]
Write the label, the reserved word
for, the loop index andinof a for-generate statement.Format:
gen : for i in 0 to 3 generate…end generate gen;- Parameters:
statement (
ForGenerateStatement) – The for-generate statement.- Raises:
VHDLWriterError – If the for-generate statement has no label.
- Return type:
- DepartForGenerateStatement(statement)[source]
Write the end of a for-generate statement.
- Parameters:
statement (
ForGenerateStatement) – The for-generate statement.- Return type:
- VisitOn(statement)[source]
Write the reserved word
onbefore the sensitivity list of a wait statement.- Parameters:
statement (
WaitStatement) – The wait statement.- Return type:
- VisitUntil(statement)[source]
Write the reserved word
untilbefore the condition of a wait statement.- Parameters:
statement (
WaitStatement) – The wait statement.- Return type:
- VisitFor(statement)[source]
Write the reserved word
forbefore the timeout of a wait statement.- Parameters:
statement (
WaitStatement) – The wait statement.- Return type:
- DepartOthersSelectedExpression(expression)[source]
Write the choice
othersof theothersselected expression.Format:
'0' when others- Parameters:
expression (
OthersSelectedExpression) – The selected expression.- Return type:
- VisitSequentialProcedureCall(call)[source]
Write the label, if any, of a procedure call.
Format:
check(value, limit => 4);- Parameters:
call (
SequentialProcedureCall) – The procedure call.- Return type:
- DepartSequentialProcedureCall(call)[source]
Write the semicolon ending a procedure call.
- Parameters:
call (
SequentialProcedureCall) – The procedure call.- Return type:
- VisitSequentialSimpleSignalAssignment(assignment)[source]
Write the label, if any, of a signal assignment.
Format:
q <= d after 1 ns;- Parameters:
assignment (
SequentialSimpleSignalAssignment) – The signal assignment.- Return type:
- DepartSequentialSimpleSignalAssignment(assignment)[source]
Write the semicolon ending a signal assignment.
- Parameters:
assignment (
SequentialSimpleSignalAssignment) – The signal assignment.- Return type:
- VisitSequentialVariableAssignment(assignment)[source]
Write the label, if any, of a variable assignment.
Format:
count := count + 1;- Parameters:
assignment (
SequentialVariableAssignment) – The variable assignment.- Return type:
- DepartSequentialVariableAssignment(assignment)[source]
Write the semicolon ending a variable assignment.
- Parameters:
assignment (
SequentialVariableAssignment) – The variable assignment.- Return type:
- VisitSequentialConditionalVariableAssignment(assignment)[source]
Write the label, if any, of a conditional variable assignment.
Format:
v := a when sel = '0' else b;- Parameters:
assignment (
SequentialConditionalVariableAssignment) – The conditional variable assignment.- Return type:
- DepartSequentialConditionalVariableAssignment(assignment)[source]
Write the semicolon ending a conditional variable assignment.
- Parameters:
assignment (
SequentialConditionalVariableAssignment) – The conditional variable assignment.- Return type:
- VisitSequentialConditionalSignalAssignment(assignment)[source]
Write the label, if any, of a conditional signal assignment.
Format:
q <= a when sel = '0' else b;- Parameters:
assignment (
SequentialConditionalSignalAssignment) – The conditional signal assignment.- Return type:
- DepartSequentialConditionalSignalAssignment(assignment)[source]
Write the semicolon ending a conditional signal assignment.
- Parameters:
assignment (
SequentialConditionalSignalAssignment) – The conditional signal assignment.- Return type:
- VisitSequentialSelectedVariableAssignment(assignment)[source]
Write the label, if any, and the reserved word
withof a selected variable assignment.Format:
with sel select v := a when '0', b when others;- Parameters:
assignment (
SequentialSelectedVariableAssignment) – The selected variable assignment.- Return type:
- DepartSequentialSelectedVariableAssignment(assignment)[source]
Write the semicolon ending a selected variable assignment.
- Parameters:
assignment (
SequentialSelectedVariableAssignment) – The selected variable assignment.- Return type:
- VisitSequentialSelectedSignalAssignment(assignment)[source]
Write the label, if any, and the reserved word
withof a selected signal assignment.Format:
with sel select q <= a when '0', b when others;- Parameters:
assignment (
SequentialSelectedSignalAssignment) – The selected signal assignment.- Return type:
- DepartSequentialSelectedSignalAssignment(assignment)[source]
Write the semicolon ending a selected signal assignment.
- Parameters:
assignment (
SequentialSelectedSignalAssignment) – The selected signal assignment.- Return type:
- VisitSignalForceAssignment(assignment)[source]
Write the label, if any, of a force assignment.
Format:
q <= force '1';- Parameters:
assignment (
SignalForceAssignment) – The force assignment.- Return type:
- DepartSignalForceAssignment(assignment)[source]
Write the semicolon ending a force assignment.
- Parameters:
assignment (
SignalForceAssignment) – The force assignment.- Return type:
- VisitSignalReleaseAssignment(assignment)[source]
Write the label, if any, of a release assignment.
Format:
q <= release;- Parameters:
assignment (
SignalReleaseAssignment) – The release assignment.- Return type:
- DepartSignalReleaseAssignment(assignment)[source]
Write the reserved word
releaseand the semicolon ending a release assignment.- Parameters:
assignment (
SignalReleaseAssignment) – The release assignment.- Return type:
- VisitSequentialReportStatement(statement)[source]
Write the label, if any, of a report statement.
Format:
report "done" severity note;- Parameters:
statement (
SequentialReportStatement) – The report statement.- Return type:
- DepartSequentialReportStatement(statement)[source]
Write the semicolon ending a report statement.
- Parameters:
statement (
SequentialReportStatement) – The report statement.- Return type:
- VisitSequentialAssertStatement(assertion)[source]
Write the label, if any, and the reserved word
assertof an assertion.Format:
assert count < 8 report "overflow" severity error;- Parameters:
assertion (
SequentialAssertStatement) – The assertion.- Return type:
- DepartSequentialAssertStatement(assertion)[source]
Write the semicolon ending an assertion.
- Parameters:
assertion (
SequentialAssertStatement) – The assertion.- Return type:
- VisitNullStatement(statement)[source]
Write a null statement.
Format:
null;- Parameters:
statement (
NullStatement) – The null statement.- Return type:
- VisitReturnStatement(statement)[source]
Write the label, if any, and the reserved word
returnof a return statement.Format:
return count;- Parameters:
statement (
ReturnStatement) – The return statement.- Return type:
- DepartReturnStatement(statement)[source]
Write the semicolon ending a return statement.
- Parameters:
statement (
ReturnStatement) – The return statement.- Return type:
- VisitWaitStatement(statement)[source]
Write the label, if any, and the reserved word
waitof a wait statement.Format:
wait on clk until clk = '1' for 10 ns;- Parameters:
statement (
WaitStatement) – The wait statement.- Return type:
- DepartWaitStatement(statement)[source]
Write the semicolon ending a wait statement.
- Parameters:
statement (
WaitStatement) – The wait statement.- Return type:
- VisitThen(branch)[source]
Write the reserved word
thenof an if or elsif branch; its statements are indented.- Parameters:
branch (
IfBranch|ElsifBranch) – The branch.- Return type:
- VisitLoop(statement)[source]
Write the reserved word
loopof a loop statement; its statements are indented.- Parameters:
statement (
LoopStatement) – The loop statement.- Return type:
- VisitIfStatement(statement)[source]
Write the label, if any, of an if statement; its branches follow.
Format:
if count = 0 then…elsif…else…end if;- Parameters:
statement (
IfStatement) – The if statement.- Return type:
- DepartIfStatement(statement)[source]
Write the end of an if statement.
- Parameters:
statement (
IfStatement) – The if statement.- Return type:
- VisitElsifBranch(branch)[source]
Write the reserved word
elsifof an elsif branch of an if statement.- Parameters:
branch (
ElsifBranch) – The branch.- Return type:
- DepartElsifBranch(branch)[source]
Leave the statements of an elsif branch of an if statement.
- Parameters:
branch (
ElsifBranch) – The branch.- Return type:
- VisitElseBranch(branch)[source]
Write the reserved word
elseof the else branch of an if statement; its statements are indented.- Parameters:
branch (
ElseBranch) – The branch.- Return type:
- DepartElseBranch(branch)[source]
Leave the statements of the else branch of an if statement.
- Parameters:
branch (
ElseBranch) – The branch.- Return type:
- VisitCaseStatement(statement)[source]
Write the label, if any, and the reserved word
caseof a case statement; its alternatives are indented.Format:
case state is…when Idle =>…end case;- Parameters:
statement (
CaseStatement) – The case statement.- Return type:
- DepartCaseStatement(statement)[source]
Write the end of a case statement.
- Parameters:
statement (
CaseStatement) – The case statement.- Return type:
- VisitCase(case)[source]
Write the reserved word
whenof an alternative of a case statement.Format:
when 1 | 2 =>
- VisitOthersCase(case)[source]
Write the reserved words
whenandothersof theothersalternative of a case statement.Format:
when others =>- Parameters:
case (
OthersCase) – The case alternative.- Return type:
- DepartOthersCase(case)[source]
Leave the statements of the
othersalternative of a case statement.- Parameters:
case (
OthersCase) – The case alternative.- Return type:
- VisitEndlessLoopStatement(statement)[source]
Write the label, if any, of a loop statement without iteration scheme.
Format:
loop…end loop;- Parameters:
statement (
EndlessLoopStatement) – The loop statement.- Return type:
- DepartEndlessLoopStatement(statement)[source]
Write the end of a loop statement without iteration scheme.
- Parameters:
statement (
EndlessLoopStatement) – The loop statement.- Return type:
- DepartAllInstantiationList(instantiationList)
Depart from an
allinstantiation list.- Parameters:
instantiationList (
AllInstantiationList) – The instantiation list.- Return type:
- DepartAnonymousType(declaration)
Depart from an incomplete type declaration.
- Parameters:
declaration (
AnonymousType) – The incomplete type declaration.- Return type:
- DepartAssociationItem(item)
Depart from an association item, after its actual.
- Parameters:
item (
AssociationItem) – The association item.- Return type:
- DepartBitStringLiteral(literal)
Depart from a bit string literal.
- Parameters:
literal (
BitStringLiteral) – The bit string literal.- Return type:
- DepartCharacterLiteral(literal)
Depart from a character literal.
- Parameters:
literal (
CharacterLiteral) – The character literal.- Return type:
- DepartConditionalExpression(expression)
Depart from a conditional expression of a conditional variable assignment, after its condition.
- Parameters:
expression (
ConditionalExpression) – The conditional expression.- Return type:
- DepartConditionalWaveform(waveform)
Depart from a conditional waveform, after its condition.
- Parameters:
waveform (
ConditionalWaveform) – The conditional waveform.- Return type:
- DepartConstrainedArraySubtypeSymbol(symbol)
Depart from a constrained array subtype symbol, after its index constraint.
- Parameters:
symbol (
ConstrainedArraySubtypeSymbol) – The constrained subtype symbol.- Return type:
- DepartConstrainedRecordSubtypeSymbol(symbol)
Depart from a constrained record subtype symbol, after its record constraint.
- Parameters:
symbol (
ConstrainedRecordSubtypeSymbol) – The constrained subtype symbol.- Return type:
- DepartConstrainedScalarSubtypeSymbol(symbol)
Depart from a constrained scalar subtype symbol, after its range constraint.
- Parameters:
symbol (
ConstrainedScalarSubtypeSymbol) – The constrained subtype symbol.- Return type:
- DepartDocument(document)
Depart from a document, after its last design unit.
- DepartEntityAspectConfiguration(aspect)
Depart from an entity aspect naming a configuration, after its configuration name.
- Parameters:
aspect (
EntityAspectConfiguration) – The entity aspect.- Return type:
- DepartEntityAspectEntity(aspect)
Depart from an entity aspect naming an entity, after its architecture name.
- Parameters:
aspect (
EntityAspectEntity) – The entity aspect.- Return type:
- DepartEntityAspectOpen(aspect)
Depart from an open entity aspect.
- Parameters:
aspect (
EntityAspectOpen) – The entity aspect.- Return type:
- DepartEnumerationLiteral(literal)
Depart from an enumeration literal.
- Parameters:
literal (
EnumerationLiteral) – The enumeration literal.- Return type:
- DepartGenericConstantInterfaceItem(item)
Depart from a generic constant, after its default expression.
- Parameters:
item (
GenericConstantInterfaceItem) – The generic constant.- Return type:
- DepartGenericFunctionInterfaceItem(item)
Depart from a generic function, after its return type.
- Parameters:
item (
GenericFunctionInterfaceItem) – The generic function.- Return type:
- DepartGenericProcedureInterfaceItem(item)
Depart from a generic procedure, after its parameters.
- Parameters:
item (
GenericProcedureInterfaceItem) – The generic procedure.- Return type:
- DepartGenericTypeInterfaceItem(item)
Depart from a generic type.
- Parameters:
item (
GenericTypeInterfaceItem) – The generic type.- Return type:
- DepartIndexedAggregateElement(element)
Depart from an aggregate element chosen by an index, after its expression.
- Parameters:
element (
IndexedAggregateElement) – The aggregate element chosen by an index.- Return type:
- DepartIndexedChoice(choice)
Depart from a choice given by a value, after its value.
- Parameters:
choice (
IndexedChoice) – The choice.- Return type:
- DepartIndexedGenerateChoice(choice)
Depart from a case-generate choice given by a value, after its value.
- Parameters:
choice (
IndexedGenerateChoice) – The choice.- Return type:
- DepartNamedAggregateElement(element)
Depart from an aggregate element chosen by a record element name, after its expression.
- Parameters:
element (
NamedAggregateElement) – The aggregate element chosen by a record element name.- Return type:
- DepartNullLiteral(literal)
Depart from a null literal.
- Parameters:
literal (
NullLiteral) – The null literal.- Return type:
- DepartNullStatement(statement)
Depart from a null statement.
- Parameters:
statement (
NullStatement) – The null statement.- Return type:
- DepartOpenName(name)
Depart from the reserved word
open.
- DepartOthersAggregateElement(element)
Depart from the
otherselement of an aggregate, after its expression.- Parameters:
element (
OthersAggregateElement) – Theotherselement of an aggregate.- Return type:
- DepartOthersInstantiationList(instantiationList)
Depart from an
othersinstantiation list.- Parameters:
instantiationList (
OthersInstantiationList) – The instantiation list.- Return type:
- DepartParameterConstantInterfaceItem(item)
Depart from a constant parameter, after its default expression.
- Parameters:
item (
ParameterConstantInterfaceItem) – The constant parameter.- Return type:
- DepartParameterFileInterfaceItem(item)
Depart from a file parameter, after its subtype.
- Parameters:
item (
ParameterFileInterfaceItem) – The file parameter.- Return type:
- DepartParameterSimpleSignalInterfaceItem(item)
Depart from a signal parameter with a mode, after its default expression.
- Parameters:
item (
ParameterSimpleSignalInterfaceItem) – The signal parameter.- Return type:
- DepartParameterVariableInterfaceItem(item)
Depart from a variable parameter, after its default expression.
- Parameters:
item (
ParameterVariableInterfaceItem) – The variable parameter.- Return type:
- DepartParameterViewSignalInterfaceItem(item)
Depart from a signal parameter with a mode view, after its mode view indication.
- Parameters:
item (
ParameterViewSignalInterfaceItem) – The signal parameter.- Return type:
- DepartPortSimpleSignalInterfaceItem(item)
Depart from a port with a mode, after its default expression.
- Parameters:
item (
PortSimpleSignalInterfaceItem) – The port.- Return type:
- DepartPortViewSignalInterfaceItem(item)
Depart from a port with a mode view, after its mode view indication.
- Parameters:
item (
PortViewSignalInterfaceItem) – The port.- Return type:
- DepartQualifiedExpressionAllocation(allocation)
Depart from an allocation initialized by a qualified expression, after its qualified expression.
- Parameters:
allocation (
QualifiedExpressionAllocation) – The allocation initialized by a qualified expression.- Return type:
- DepartRangeConstraint(symbol)
Depart from the range constraint of a subtype indication, after its range.
- Parameters:
symbol (
ConstrainedScalarSubtypeSymbol) – The constrained subtype symbol.- Return type:
- DepartRangedAggregateElement(element)
Depart from an aggregate element chosen by a range, after its expression.
- Parameters:
element (
RangedAggregateElement) – The aggregate element chosen by a range.- Return type:
- DepartRangedChoice(choice)
Depart from a choice given by a range, after its range.
- Parameters:
choice (
RangedChoice) – The choice.- Return type:
- DepartRangedGenerateChoice(choice)
Depart from a case-generate choice given by a range, after its range.
- Parameters:
choice (
RangedGenerateChoice) – The choice.- Return type:
- DepartSelectedExpression(expression)
Depart from a selected expression of a selected variable assignment, after its last choice.
- Parameters:
expression (
SelectedExpression) – The selected expression.- Return type:
- DepartSelectedWaveform(waveform)
Depart from a selected waveform, after its last choice.
- Parameters:
waveform (
SelectedWaveform) – The selected waveform.- Return type:
- DepartSimpleAggregateElement(element)
Depart from a positional aggregate element, after its expression.
- Parameters:
element (
SimpleAggregateElement) – The positional aggregate element.- Return type:
- DepartSimpleModeViewElement(element)
Depart from an element of a mode view with a mode.
- Parameters:
element (
SimpleModeViewElement) – The mode view element.- Return type:
- DepartSimpleName(name)
Depart from a simple name.
- Parameters:
name (
SimpleName) – The simple name.- Return type:
- DepartSlicedName(name)
Depart from a sliced name, after its prefix.
- Parameters:
name (
SlicedName) – The sliced name.- Return type:
- DepartStringLiteral(literal)
Depart from a string literal.
- Parameters:
literal (
StringLiteral) – The string literal.- Return type:
- DepartSubtypeAllocation(allocation)
Depart from an allocation of a subtype, after its subtype.
- Parameters:
allocation (
SubtypeAllocation) – The allocation of a subtype.- Return type:
- DepartSymbol(symbol)
Depart from a symbol, after its name.
- DepartWaveformElement(element)
Depart from a waveform element, after its delay.
- Parameters:
element (
WaveformElement) – The waveform element.- Return type:
- classmethod GetMethodsWithAttributes(predicate=None)
Return the class’ methods that carry at least one matching attribute.
- Parameters:
predicate (
type[TAttr] |Iterable[type[TAttr]] |None) – Optional, an attribute class, an iterable of attribute classes, orNoneto accept every attribute.- Return type:
- 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.
- VisitAllName(name)
Visit a selected name with suffix
all, before its prefix.
- VisitAttributeName(name)
Visit an attribute name, before its prefix.
- Parameters:
name (
AttributeName) – The attribute name.- Return type:
- VisitBlockSpecification(configuration)
Visit the block specification of a block configuration, before its block name.
- Parameters:
configuration (
BlockConfiguration) – The block configuration.- Return type:
- VisitConditionalExpression(expression)
Visit a conditional expression of a conditional variable assignment, before its value.
- Parameters:
expression (
ConditionalExpression) – The conditional expression.- Return type:
- VisitConditionalWaveform(waveform)
Visit a conditional waveform, before its waveform.
- Parameters:
waveform (
ConditionalWaveform) – The conditional waveform.- Return type:
- VisitConstrainedArraySubtypeSymbol(symbol)
Visit a constrained array subtype symbol, before its name.
- Parameters:
symbol (
ConstrainedArraySubtypeSymbol) – The constrained subtype symbol.- Return type:
- VisitConstrainedRecordSubtypeSymbol(symbol)
Visit a constrained record subtype symbol, before its name.
- Parameters:
symbol (
ConstrainedRecordSubtypeSymbol) – The constrained subtype symbol.- Return type:
- VisitConstrainedScalarSubtypeSymbol(symbol)
Visit a constrained scalar subtype symbol, before its name.
- Parameters:
symbol (
ConstrainedScalarSubtypeSymbol) – The constrained subtype symbol.- Return type:
- VisitDocument(document)
Visit a document, before its first design unit.
- VisitForLoopStatement(statement)[source]
Write the label, if any, the reserved word
for, the loop index andinof a for-loop statement.Format:
for i in 0 to 7 loop…end loop;- Parameters:
statement (
ForLoopStatement) – The loop statement.- Return type:
- VisitIndexedName(name)
Visit an indexed name, before its prefix.
- Parameters:
name (
IndexedName) – The indexed name.- Return type:
- VisitInstantiationList(configuration)
Visit the instantiation list of a component configuration, before its first label.
- Parameters:
configuration (
ComponentConfiguration) – The component configuration.- Return type:
- VisitNamedAggregateElement(element)
Visit an aggregate element chosen by a record element name, before its name.
- Parameters:
element (
NamedAggregateElement) – The aggregate element chosen by a record element name.- Return type:
- VisitOthersSelectedExpression(expression)
Visit the
othersselected expression of a selected variable assignment, before its value.- Parameters:
expression (
OthersSelectedExpression) – The selected expression.- Return type:
- VisitOthersSelectedWaveform(waveform)
Visit the
othersselected waveform, before its waveform.- Parameters:
waveform (
OthersSelectedWaveform) – The selected waveform.- Return type:
- VisitParenthesisName(name)
Visit a name followed by a parenthesized association list, before its prefix.
- Parameters:
name (
ParenthesisName) – The parenthesis name.- Return type:
- VisitQualifiedExpression(expression)
Visit a qualified expression, before its subtype.
- Parameters:
expression (
QualifiedExpression) – The qualified expression.- Return type:
- VisitRangedAggregateElement(element)
Visit an aggregate element chosen by a range, before its range.
- Parameters:
element (
RangedAggregateElement) – The aggregate element chosen by a range.- Return type:
- VisitRangedChoice(choice)
Visit a choice given by a range, before its range.
- Parameters:
choice (
RangedChoice) – The choice.- Return type:
- VisitRangedGenerateChoice(choice)
Visit a case-generate choice given by a range, before its range.
- Parameters:
choice (
RangedGenerateChoice) – The choice.- Return type:
- VisitSelectedExpression(expression)
Visit a selected expression of a selected variable assignment, before its value.
- Parameters:
expression (
SelectedExpression) – The selected expression.- Return type:
- VisitSelectedName(name)
Visit a selected name, before its prefix.
- Parameters:
name (
SelectedName) – The selected name.- Return type:
- VisitSelectedWaveform(waveform)
Visit a selected waveform, before its waveform.
- Parameters:
waveform (
SelectedWaveform) – The selected waveform.- Return type:
- VisitSimpleAggregateElement(element)
Visit a positional aggregate element, before its expression.
- Parameters:
element (
SimpleAggregateElement) – The positional aggregate element.- Return type:
- VisitSymbol(symbol)
Visit a symbol, before its name.
- VisitTypeConversion(conversion)
Visit a type conversion, before its target subtype.
- Parameters:
conversion (
TypeConversion) – The type conversion.- Return type:
- VisitWaveformElement(element)
Visit a waveform element, before its value.
- Parameters:
element (
WaveformElement) – The waveform element.- Return type:
- __getstate__()
Return the object’s state for pickling, collecting every slot of the class hierarchy.
- __new__(**kwargs)
- __setstate__(state)
Restore the object’s state from unpickling, requiring exactly the slots of the class hierarchy.
- DepartForLoopStatement(statement)[source]
Write the end of a for-loop statement.
- Parameters:
statement (
ForLoopStatement) – The loop statement.- Return type:
- VisitWhileLoopStatement(statement)[source]
Write the label, if any, and the reserved word
whileof a while-loop statement.Format:
while count < 8 loop…end loop;- Parameters:
statement (
WhileLoopStatement) – The loop statement.- Return type:
- DepartWhileLoopStatement(statement)[source]
Write the end of a while-loop statement.
- Parameters:
statement (
WhileLoopStatement) – The loop statement.- Return type:
- VisitNextStatement(statement)[source]
Write the label, if any, and the reserved word
nextof a next statement.Format:
next when skip;The model keeps no loop label, so none is written.
- Parameters:
statement (
NextStatement) – The next statement.- Return type:
- DepartNextStatement(statement)[source]
Write the semicolon ending a next statement.
- Parameters:
statement (
NextStatement) – The next statement.- Return type:
- VisitExitStatement(statement)[source]
Write the label, if any, and the reserved word
exitof an exit statement.Format:
exit when done;The model keeps no loop label, so none is written.
- Parameters:
statement (
ExitStatement) – The exit statement.- Return type:
- DepartExitStatement(statement)[source]
Write the semicolon ending an exit statement.
- Parameters:
statement (
ExitStatement) – The exit statement.- Return type: