public final class VerilogLoopStatement extends VerilogStatement
VerilogLoopStatement
represents loop statements.
There are the following loop types:
forever
;repeat
;while
;for
.Modifier and Type | Class and Description |
---|---|
static class |
VerilogLoopStatement.Type
VerilogLoopStatement.Type contains the loop statement types. |
VerilogNode.Tag
AbstractNode.NodeKind
Modifier and Type | Field and Description |
---|---|
static VerilogNode.Tag |
TAG |
static java.util.EnumSet<VerilogNode.Tag> |
TAGS_CHILDREN |
TAGS
Constructor and Description |
---|
VerilogLoopStatement(VerilogLoopStatement other,
VerilogNode parent)
Creates a copy of the loop statement.
|
VerilogLoopStatement(VerilogNode parent)
Creates a loop statement.
|
Modifier and Type | Method and Description |
---|---|
VerilogLoopStatement |
clone()
Clones the symbol table.
|
VerilogExpression |
getExpression()
Returns the expression of the loop.
|
VerilogAssignment |
getInitialization()
Returns the initialization assignment of the
FOR loop. |
VerilogAssignment |
getIteration()
Returns the iteration assignment of the
FOR loop. |
VerilogStatement |
getStatement()
Returns the loop body.
|
VerilogLoopStatement.Type |
getType()
Returns the type of the loop.
|
boolean |
isFor()
Checks whether the loop is
FOR . |
boolean |
isForever()
Checks whether the loop is
FOREVER . |
boolean |
isRepeat()
Checks whether the loop is
REPEAT . |
boolean |
isWhile()
Checks whether the loop is
WHILE . |
void |
setExpression(VerilogExpression expression)
Sets the expression of the loop.
|
void |
setFor()
Sets the type of loop to
FOR . |
void |
setForever()
Sets the type of loop to
FOREVER . |
void |
setInitialization(VerilogAssignment initialization)
Sets the initialization assignment of the
FOR loop. |
void |
setIteration(VerilogAssignment iteration)
Sets the iteration assignment of the
FOR loop. |
void |
setRepeat()
Sets the type of loop to
REPEAT . |
void |
setStatement(VerilogStatement statement)
Sets the loop body.
|
void |
setType(VerilogLoopStatement.Type type)
Sets the type of the loop.
|
void |
setWhile()
Sets the type of loop to
WHILE . |
getAttributes, getParentNode, isActivity, isAssign, isAssignment, isAssignStatement, isAttribute, isBlockGenerate, isBlockStatement, isCaseGenerate, isCaseGenerateItem, isCaseStatement, isCaseStatementItem, isCode, isConnection, isDeclaration, isDelayedStatement, isDisableStatement, isGenerate, isIfGenerate, isIfGenerateBranch, isIfStatement, isIfStatementBranch, isInstantiation, isLoopGenerate, isLoopStatement, isModule, isNullStatement, isPathDeclaration, isPort, isPortConnection, isProcedure, isPulseStyle, isShowCancelled, isSpecify, isTable, isTableEntry, isTaskStatement, isTriggerStatement, isWaitStatement, setAttributes, union
add, find, getFullName, getName, getParent, getTag, hasName, hasScope, isTransparent, items, items, items, remove, replace, setName, setParent, setRedefinitionHandler, setTag, toString
addAll, findAroundRecursively, findAroundRecursively, findRecursively, findRecursively, getUpperTable, items, items, setUpperTable
public static final VerilogNode.Tag TAG
public static final java.util.EnumSet<VerilogNode.Tag> TAGS_CHILDREN
public VerilogLoopStatement(VerilogNode parent)
parent
- the node parent.public VerilogLoopStatement(VerilogLoopStatement other, VerilogNode parent)
other
- the loop statement to be copied.parent
- the parent node.public VerilogLoopStatement.Type getType()
public void setType(VerilogLoopStatement.Type type)
type
- the type to be set.public boolean isForever()
FOREVER
.true
iff the loop is FOREVER
.public boolean isRepeat()
REPEAT
.true
iff the loop is REPEAT
.public boolean isWhile()
WHILE
.true
iff the loop is WHILE
.public boolean isFor()
FOR
.true
iff the loop is FOR
.public void setForever()
FOREVER
.public void setRepeat()
REPEAT
.public void setWhile()
WHILE
.public void setFor()
FOR
.public VerilogAssignment getInitialization()
FOR
loop.public void setInitialization(VerilogAssignment initialization)
FOR
loop.initialization
- the assignment to be set.public VerilogExpression getExpression()
public void setExpression(VerilogExpression expression)
expression
- the expression to be set.public VerilogAssignment getIteration()
FOR
loop.public void setIteration(VerilogAssignment iteration)
FOR
loop.iteration
- the assignment to be set.public VerilogStatement getStatement()
public void setStatement(VerilogStatement statement)
statement
- the body to be set.public VerilogLoopStatement clone()
AbstractSymbolTable
clone
in class VerilogStatement