• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
            • Parse-expressions
            • Parse-udps
            • Parse-statements
              • Vl-parse-procedural-continuous-assignments
                • Vl-parse-task-enable
                • Vl-parse-event-trigger
                • Vl-parse-blocking-or-nonblocking-assignment
                • Vl-parse-tf-call
                • Vl-parse-subroutine-call-statement
                • Vl-parse-system-tf-call
                • Vl-make-case-statement
                • Vl-parse-system-task-enable
                • Vl-parse-operator-assignment/inc/dec
                • Vl-parse-disable-statement
                • Vl-filter-parsed-caseitemlist
                • Vl-parse-subroutine-call
                • Vl-parse-1+-id=expr-pairs
                • Vl-parse-case-keyword
                • Vl-actionblock
                • Vl-parse-1+-for-variable-declarations
                • Vl-parse-1+-for-init-assignments
                • Vl-parse-foreach-statement-array-part
                • Vl-parse-for-variable-declaration
                • Vl-parse-1+-for-step-assigns
                • Vl-maybe-parse-assert-deferral
                • Vl-parse-statement-2012-aux
                • Vl-parse-return-statement
                • Vl-parse-for-initialization
                • Vl-parse-unique-priority
                • Vl-parse-statement-top
                • Vl-parse-foreach-loop-variables
                • Vl-parse-case-statement
                • Vl-assign-op-expr
                • Vl-maybe-inject-block-name-into-assertion
                • Vl-parse-for-step
                • Vl-parse-concurrent-assertion-statement
                • Vl-parse-statement-wrapped
                • Vl-parse-statement-2005-aux
                • Vl-foreach-vardecls-from-loopvars
                • Vl-parse-immediate-assertion-statement
                • Vl-inc-or-dec-expr
                • Vl-parse-par-block
                • Vl-parse-seq-block
                • Vl-parse-statement-or-null
                • Vl-parse-procedural-assertion-statement
                • Vl-parse-action-block
                • Vl-parse-case-item
                • Vl-parse-expect-property-statement
                • Vl-parse-statement
                • Vl-parse-statement-aux
                • Vl-parse-1+-case-items
                • *vl-assignment-operators*
              • Parse-property
              • Vl-genelements
              • Parse-paramdecls
              • Parse-blockitems
              • Parse-utils
              • Parse-insts
              • Parse-functions
              • Parse-assignments
              • Parse-clocking
              • Parse-strengths
              • Vl-parse-genvar-declaration
              • Vl-parse
              • Parse-netdecls
              • Parse-asserts
              • Vl-maybe-parse-lifetime
              • Parse-dpi-import-export
              • Parse-ports
              • Parse-timeunits
              • Seq
              • Parse-packages
              • Parse-eventctrl
            • Vl-load-merge-descriptions
            • Vl-find-basename/extension
            • Vl-load-file
            • Vl-loadresult
            • Scope-of-defines
            • Vl-find-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-read-file
            • Vl-includeskips-report-gather
            • Vl-load-main
            • Extended-characters
            • Vl-load
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-preprocess-debug
            • Vl-write-preprocessor-debug-file
            • Vl-read-file-report-gather
            • Vl-load-descriptions
            • Vl-load-files
            • Translate-off
            • Vl-load-read-file-hook
            • Vl-read-file-report
            • Vl-loadstate-pad
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-loadstate->warnings
            • Vl-iskips-report
            • Vl-descriptionlist
          • Warnings
          • Getting-started
          • Utilities
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Parse-statements

    Vl-parse-procedural-continuous-assignments

    Parse a procedural_continuous_assignment.

    Signature
    (vl-parse-procedural-continuous-assignments 
         atts &key (tokstream 'tokstream) 
         (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    For Verilog-2005:

    procedural_continuous_assignments ::= 'assign' variable_assignment
                                        | 'deassign' variable_lvalue
                                        | 'force' variable_assignment
                                        | 'force' net_assignment
                                        | 'release' variable_lvalue
                                        | 'release' net_lvalue

    SystemVerilog-2012 is identical. Note that a net_assignment is a subset of a variable_assignment, and a net_lvalue is a subset of a variable_lvalue, so we just use the variable versions in each case.

    Definitions and Theorems

    Function: vl-parse-procedural-continuous-assignments-fn

    (defun vl-parse-procedural-continuous-assignments-fn
           (atts tokstream config)
     (declare (xargs :stobjs (tokstream)))
     (declare (xargs :guard (vl-loadconfig-p config)))
     (declare (ignorable config))
     (declare (xargs :guard (vl-atts-p atts)))
     (let ((__function__ 'vl-parse-procedural-continuous-assignments))
      (declare (ignorable __function__))
      (seq
       tokstream
       (when
           (vl-is-some-token? '(:vl-kwd-assign :vl-kwd-force))
           (type := (vl-match))
           ((lvalue . expr)
            := (vl-parse-variable-assignment))
           (return (make-vl-assignstmt :type
                                       (if (eq (vl-token->type type)
                                               :vl-kwd-assign)
                                           :vl-assign
                                         :vl-force)
                                       :lvalue lvalue
                                       :rhs (make-vl-rhsexpr :guts expr)
                                       :ctrl nil
                                       :atts atts
                                       :loc (vl-token->loc type))))
       (type
           := (vl-match-some-token '(:vl-kwd-deassign :vl-kwd-release)))
       (lvalue := (vl-parse-variable-lvalue))
       (return (make-vl-deassignstmt :type
                                     (if (eq (vl-token->type type)
                                             :vl-kwd-deassign)
                                         :vl-deassign
                                       :vl-release)
                                     :lvalue lvalue
                                     :atts atts)))))

    Theorem: vl-parse-procedural-continuous-assignments-fails-gracefully

    (defthm vl-parse-procedural-continuous-assignments-fails-gracefully
     (implies
      (mv-nth 0
              (vl-parse-procedural-continuous-assignments atts))
      (not (mv-nth 1
                   (vl-parse-procedural-continuous-assignments atts)))))

    Theorem: vl-warning-p-of-vl-parse-procedural-continuous-assignments

    (defthm vl-warning-p-of-vl-parse-procedural-continuous-assignments
     (iff
        (vl-warning-p
             (mv-nth 0
                     (vl-parse-procedural-continuous-assignments atts)))
        (mv-nth 0
                (vl-parse-procedural-continuous-assignments atts))))

    Theorem: vl-parse-procedural-continuous-assignments-result

    (defthm vl-parse-procedural-continuous-assignments-result
     (implies
      (and (force (vl-atts-p atts)))
      (equal
       (vl-stmt-p
            (mv-nth 1
                    (vl-parse-procedural-continuous-assignments atts)))
       (not
          (mv-nth 0
                  (vl-parse-procedural-continuous-assignments atts))))))

    Theorem: vl-parse-procedural-continuous-assignments-count-strong

    (defthm vl-parse-procedural-continuous-assignments-count-strong
     (and
      (<=
        (vl-tokstream-measure
             :tokstream
             (mv-nth 2
                     (vl-parse-procedural-continuous-assignments atts)))
        (vl-tokstream-measure))
      (implies
       (not (mv-nth 0
                    (vl-parse-procedural-continuous-assignments atts)))
       (<
        (vl-tokstream-measure
             :tokstream
             (mv-nth 2
                     (vl-parse-procedural-continuous-assignments atts)))
        (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))