public final class VerilogProcedure extends VerilogNode
VerilogProcedure
represents functions and tasks.Modifier and Type | Class and Description |
---|---|
static class |
VerilogProcedure.Type
VerilogProcedure.Type contains the procedure types. |
VerilogNode.Tag
AbstractNode.NodeKind
Modifier and Type | Field and Description |
---|---|
static VerilogNode.Tag |
TAG |
static java.util.EnumSet<VerilogNode.Tag> |
TAGS_CHILDREN |
Constructor and Description |
---|
VerilogProcedure(VerilogNode parent)
Creates a procedure.
|
VerilogProcedure(VerilogProcedure other,
VerilogNode parent)
Creates a copy of the procedure.
|
Modifier and Type | Method and Description |
---|---|
void |
addInput(VerilogPort port)
Adds the port to the signature of the procedure.
|
void |
addPort(VerilogDeclaration declaration)
Adds the port from the declaration to the signature of the procedure.
|
VerilogProcedure |
clone()
Clones the symbol table.
|
VerilogElementType |
getElementType()
Returns the return value type of the procedure.
|
VerilogPort |
getOutput()
Returns the output of the procedure.
|
java.util.List<VerilogPort> |
getPorts()
Returns the signature of the procedure (i.e., the list of its ports).
|
VerilogStatement |
getStatement()
Returns the statement of the procedure.
|
VerilogProcedure.Type |
getType()
Returns the type of the procedure.
|
boolean |
isAutomatic()
Checks whether the procedure is automatic.
|
boolean |
isFunction()
Checks whether the procedure is
FUNCTION . |
boolean |
isSystem()
Checks whether the procedure is a system one.
|
boolean |
isTask()
Checks whether the procedure is
TASK . |
void |
setAutomatic()
Makes the procedure automatic.
|
void |
setFunction()
Sets the type of the procedure to
FUNCTION . |
void |
setOutput(java.lang.String name,
VerilogElementType elementType)
Sets the return value type of the procedure and declares the output.
|
void |
setOutput(VerilogDeclaration declaration)
Set the output from the declaration.
|
void |
setStatement(VerilogStatement statement)
Sets the statement of the procedure.
|
void |
setTask()
Sets the type of the procedure to
TASK . |
void |
setType(VerilogProcedure.Type type)
Sets the type of the procedure.
|
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 VerilogProcedure(VerilogNode parent)
parent
- the parent node.public VerilogProcedure(VerilogProcedure other, VerilogNode parent)
other
- the procedure to be copied.parent
- the parent node.public VerilogProcedure.Type getType()
public void setType(VerilogProcedure.Type type)
type
- the procedure type.public boolean isTask()
TASK
.true
iff the procedure is TASK
.public boolean isFunction()
FUNCTION
.true
iff the procedure is FUNCTION
.public void setTask()
TASK
.public void setFunction()
FUNCTION
.public boolean isSystem()
true
iff the procedure is a system one.public VerilogElementType getElementType()
public void setOutput(java.lang.String name, VerilogElementType elementType)
name
- the procedure name.elementType
- the return value type.public boolean isAutomatic()
true
iff the procedure is automatic.public void setAutomatic()
public java.util.List<VerilogPort> getPorts()
public void addInput(VerilogPort port)
port
- the port to be added.public void addPort(VerilogDeclaration declaration)
declaration
- the declaration, whose port to be added.public VerilogPort getOutput()
public void setOutput(VerilogDeclaration declaration)
declaration
- the declaration, whose output to be set.public VerilogStatement getStatement()
public void setStatement(VerilogStatement statement)
statement
- the statement to be added.public VerilogProcedure clone()
AbstractSymbolTable
clone
in class VerilogNode