• 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
            • Parse-property
            • Vl-genelements
            • Parse-paramdecls
            • Parse-blockitems
            • Parse-utils
            • Parse-insts
              • Special-note-about-blank-ports
              • Vl-parse-list-of-named-port-connections-2012
              • Vl-parse-udp-or-module-instantiation
              • Vl-parse-udp-instance
              • Vl-parse-module-instance-2012
              • Vl-parse-module-instance-2005
              • Vl-parse-list-of-ordered-port-connections
              • Vl-parse-list-of-named-port-connections-2005
              • Vl-parse-1+-udp-instances
              • Vl-parse-1+-module-instances
              • Vl-parse-udp-instantiation
                • Vl-parse-named-port-connection
                • Vl-parse-module-instantiation
                • Vl-parse-list-of-named-port-connections
                • Vl-parse-bind-directive-scopeless
                • Vl-parse-bind-directive-scoped
                • Vl-parse-module-instance
                • Vl-parse-list-of-port-connections
                • Vl-parse-bind-directive
              • 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-insts

    Vl-parse-udp-instantiation

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

    Definitions and Theorems

    Function: vl-parse-udp-instantiation-fn

    (defun vl-parse-udp-instantiation-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-udp-instantiation))
      (declare (ignorable __function__))
      (seq
       tokstream
       (modname := (vl-match-token :vl-idtoken))
       (when
        (and (vl-is-token? :vl-lparen)
             (vl-lookahead-is-some-token? *vl-all-drivestr-kwds*
                                          (cdr (vl-tokstream->tokens))))
        (str := (vl-parse-drive-strength)))
       (when (vl-is-token? :vl-pound)
             (delay := (vl-parse-delay2)))
       (insts := (vl-parse-1+-udp-instances (vl-token->loc modname)
                                            (vl-idtoken->name modname)
                                            str delay atts))
       (:= (vl-match-token :vl-semi))
       (return insts))))

    Theorem: vl-parse-udp-instantiation-fails-gracefully

    (defthm vl-parse-udp-instantiation-fails-gracefully
      (implies (mv-nth 0 (vl-parse-udp-instantiation atts))
               (not (mv-nth 1 (vl-parse-udp-instantiation atts)))))

    Theorem: vl-warning-p-of-vl-parse-udp-instantiation

    (defthm vl-warning-p-of-vl-parse-udp-instantiation
      (iff (vl-warning-p (mv-nth 0 (vl-parse-udp-instantiation atts)))
           (mv-nth 0 (vl-parse-udp-instantiation atts))))

    Theorem: vl-parse-udp-instantiation-result

    (defthm vl-parse-udp-instantiation-result
     (implies
       (and (force (vl-atts-p atts)))
       (vl-modinstlist-p (mv-nth 1 (vl-parse-udp-instantiation atts)))))

    Theorem: vl-parse-udp-instantiation-true-listp

    (defthm vl-parse-udp-instantiation-true-listp
      (true-listp (mv-nth 1 (vl-parse-udp-instantiation atts)))
      :rule-classes :type-prescription)

    Theorem: vl-parse-udp-instantiation-count-strong

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