Class VerilogLoopStatement


  • public final class VerilogLoopStatement
    extends VerilogStatement
    VerilogLoopStatement represents loop statements.

    There are the following loop types:

    • forever;
    • repeat;
    • while;
    • for.
    • Constructor Detail

      • VerilogLoopStatement

        public VerilogLoopStatement​(VerilogNode parent)
        Creates a loop statement.
        Parameters:
        parent - the node parent.
      • VerilogLoopStatement

        public VerilogLoopStatement​(VerilogLoopStatement other,
                                    VerilogNode parent)
        Creates a copy of the loop statement.
        Parameters:
        other - the loop statement to be copied.
        parent - the parent node.
    • Method Detail

      • setType

        public void setType​(VerilogLoopStatement.Type type)
        Sets the type of the loop.
        Parameters:
        type - the type to be set.
      • isForever

        public boolean isForever()
        Checks whether the loop is FOREVER.
        Returns:
        true iff the loop is FOREVER.
      • isRepeat

        public boolean isRepeat()
        Checks whether the loop is REPEAT.
        Returns:
        true iff the loop is REPEAT.
      • isWhile

        public boolean isWhile()
        Checks whether the loop is WHILE.
        Returns:
        true iff the loop is WHILE.
      • isFor

        public boolean isFor()
        Checks whether the loop is FOR.
        Returns:
        true iff the loop is FOR.
      • setForever

        public void setForever()
        Sets the type of loop to FOREVER.
      • setRepeat

        public void setRepeat()
        Sets the type of loop to REPEAT.
      • setWhile

        public void setWhile()
        Sets the type of loop to WHILE.
      • setFor

        public void setFor()
        Sets the type of loop to FOR.
      • getInitialization

        public VerilogAssignment getInitialization()
        Returns the initialization assignment of the FOR loop.
        Returns:
        the initialization assignment.
      • setInitialization

        public void setInitialization​(VerilogAssignment initialization)
        Sets the initialization assignment of the FOR loop.
        Parameters:
        initialization - the assignment to be set.
      • getExpression

        public VerilogExpression getExpression()
        Returns the expression of the loop.
        Returns:
        the expression.
      • setExpression

        public void setExpression​(VerilogExpression expression)
        Sets the expression of the loop.
        Parameters:
        expression - the expression to be set.
      • getIteration

        public VerilogAssignment getIteration()
        Returns the iteration assignment of the FOR loop.
        Returns:
        the iteration assignment.
      • setIteration

        public void setIteration​(VerilogAssignment iteration)
        Sets the iteration assignment of the FOR loop.
        Parameters:
        iteration - the assignment to be set.
      • getStatement

        public VerilogStatement getStatement()
        Returns the loop body.
        Returns:
        the loop body.
      • setStatement

        public void setStatement​(VerilogStatement statement)
        Sets the loop body.
        Parameters:
        statement - the body to be set.