Class VerilogProcedure

    • Constructor Detail

      • VerilogProcedure

        public VerilogProcedure​(VerilogNode parent)
        Creates a procedure.
        Parameters:
        parent - the parent node.
      • VerilogProcedure

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

      • getType

        public VerilogProcedure.Type getType()
        Returns the type of the procedure.
        Returns:
        the procedure type.
      • setType

        public void setType​(VerilogProcedure.Type type)
        Sets the type of the procedure.
        Parameters:
        type - the procedure type.
      • isTask

        public boolean isTask()
        Checks whether the procedure is TASK.
        Returns:
        true iff the procedure is TASK.
      • isFunction

        public boolean isFunction()
        Checks whether the procedure is FUNCTION.
        Returns:
        true iff the procedure is FUNCTION.
      • setTask

        public void setTask()
        Sets the type of the procedure to TASK.
      • setFunction

        public void setFunction()
        Sets the type of the procedure to FUNCTION.
      • isSystem

        public boolean isSystem()
        Checks whether the procedure is a system one.
        Returns:
        true iff the procedure is a system one.
      • getElementType

        public VerilogElementType getElementType()
        Returns the return value type of the procedure.
        Returns:
        the return value type of the procedure.
      • setOutput

        public void setOutput​(java.lang.String name,
                              VerilogElementType elementType)
        Sets the return value type of the procedure and declares the output.
        Parameters:
        name - the procedure name.
        elementType - the return value type.
      • setOutput

        public void setOutput​(VerilogDeclaration declaration)
        Set the output from the declaration.
        Parameters:
        declaration - the declaration, whose output to be set.
      • isAutomatic

        public boolean isAutomatic()
        Checks whether the procedure is automatic.
        Returns:
        true iff the procedure is automatic.
      • setAutomatic

        public void setAutomatic()
        Makes the procedure automatic.
      • getPorts

        public java.util.List<VerilogPort> getPorts()
        Returns the signature of the procedure (i.e., the list of its ports).
        Returns:
        the signature of the procedure.
      • addInput

        public void addInput​(VerilogPort port)
        Adds the port to the signature of the procedure.
        Parameters:
        port - the port to be added.
      • addPort

        public void addPort​(VerilogDeclaration declaration)
        Adds the port from the declaration to the signature of the procedure.
        Parameters:
        declaration - the declaration, whose port to be added.
      • getOutput

        public VerilogPort getOutput()
        Returns the output of the procedure.
        Returns:
        the output of the procedure.
      • getStatement

        public VerilogStatement getStatement()
        Returns the statement of the procedure.
        Returns:
        the procedure statement.
      • setStatement

        public void setStatement​(VerilogStatement statement)
        Sets the statement of the procedure.
        Parameters:
        statement - the statement to be added.