• 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
            • Parse-functions
            • Parse-assignments
            • Parse-clocking
            • Parse-strengths
              • Vl-parse-drive-strength-or-charge-strength
                • Vl-parse-drive-strength
                • Vl-parse-optional-drive-strength
                • Vl-parse-charge-strength
                • *vl-strength1-alist*
                • *vl-strength0-alist*
                • *vl-ds1-alist*
                • *vl-ds0/1-keywords*
                • *vl-ds0-alist*
                • *vl-charge-strengths-keywords*
                • *vl-charge-strengths-alist*
                • *vl-ds1-keywords*
                • *vl-ds0-keywords*
              • 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-strengths

    Vl-parse-drive-strength-or-charge-strength

    Match drive_strength or charge_strength, returning a vl-gatestrength-p or a vl-cstrength-p.

    Signature
    (vl-parse-drive-strength-or-charge-strength 
         &key (tokstream 'tokstream) 
         (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    Definitions and Theorems

    Function: vl-parse-drive-strength-or-charge-strength-fn

    (defun vl-parse-drive-strength-or-charge-strength-fn
           (tokstream config)
      (declare (xargs :stobjs (tokstream)))
      (declare (xargs :guard (vl-loadconfig-p config)))
      (declare (ignorable config))
      (let ((__function__ 'vl-parse-drive-strength-or-charge-strength))
        (declare (ignorable __function__))
        (b* (((mv ?erp val tokstream)
              (vl-parse-optional-drive-strength))
             ((when val) (mv nil val tokstream)))
          (vl-parse-charge-strength))))

    Theorem: vl-parse-drive-strength-or-charge-strength-fails-gracefully

    (defthm vl-parse-drive-strength-or-charge-strength-fails-gracefully
      (implies
           (mv-nth 0
                   (vl-parse-drive-strength-or-charge-strength))
           (not (mv-nth 1
                        (vl-parse-drive-strength-or-charge-strength)))))

    Theorem: vl-warning-p-of-vl-parse-drive-strength-or-charge-strength

    (defthm vl-warning-p-of-vl-parse-drive-strength-or-charge-strength
      (iff (vl-warning-p
                (mv-nth 0
                        (vl-parse-drive-strength-or-charge-strength)))
           (mv-nth 0
                   (vl-parse-drive-strength-or-charge-strength))))

    Theorem: vl-parse-drive-strength-or-charge-strength-count-strong

    (defthm vl-parse-drive-strength-or-charge-strength-count-strong
     (and
      (<= (vl-tokstream-measure
               :tokstream
               (mv-nth 2
                       (vl-parse-drive-strength-or-charge-strength)))
          (vl-tokstream-measure))
      (implies
          (not (mv-nth 0
                       (vl-parse-drive-strength-or-charge-strength)))
          (< (vl-tokstream-measure
                  :tokstream
                  (mv-nth 2
                          (vl-parse-drive-strength-or-charge-strength)))
             (vl-tokstream-measure))))
     :rule-classes ((:rewrite) (:linear)))

    Theorem: vl-parse-drive-strength-or-charge-strength-forward

    (defthm vl-parse-drive-strength-or-charge-strength-forward
     (or (vl-gatestrength-p
              (mv-nth 1
                      (vl-parse-drive-strength-or-charge-strength)))
         (vl-cstrength-p
              (mv-nth 1
                      (vl-parse-drive-strength-or-charge-strength)))
         (mv-nth 0
                 (vl-parse-drive-strength-or-charge-strength)))
     :rule-classes
     ((:forward-chaining
        :trigger-terms ((vl-parse-drive-strength-or-charge-strength)))))