• 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
              • Vl-sort-clocking-block-items
              • Vl-parse-normal-clocking-declaration
              • Vl-parse-list-of-clocking-decl-assigns
              • Vl-clocking-direction-head
              • Vl-parse-default-skew-item
              • Vl-parse-clocking-block-item
                • Vl-parse-global-clocking-declaration
                • Vl-parse-clocking-direction
                • Vl-parse-clocking-block-items-until-endclocking
                • Vl-defaultskew-item
                • Vl-parse-clocking-skew
                • Vl-parse-defaultdisable
                • Vl-maybe-parse-clocking-skew
                • Vl-clocking-block-item
                • Vl-clocking-block-item-list
                • Vl-defaultskew-item-list
              • 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-clocking

    Vl-parse-clocking-block-item

    Match a clocking_item.

    Signature
    (vl-parse-clocking-block-item &key (tokstream 'tokstream) 
                                  (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).

    SystemVerilog-2012 Grammar:

    clocking_item ::=
       'default' default_skew ';'
     | clocking_direction list_of_clocking_decl_assign ';'
     | { attribute_instance } assertion_item_declaration

    Definitions and Theorems

    Function: vl-parse-clocking-block-item-fn

    (defun vl-parse-clocking-block-item-fn (tokstream config)
     (declare (xargs :stobjs (tokstream)))
     (declare (xargs :guard (vl-loadconfig-p config)))
     (declare (ignorable config))
     (let ((__function__ 'vl-parse-clocking-block-item))
      (declare (ignorable __function__))
      (cond
       ((vl-is-token? :vl-kwd-default)
        (vl-parse-default-skew-item))
       ((vl-is-some-token?
             '(:vl-kwd-input :vl-kwd-output :vl-kwd-inout))
        (seq tokstream
             (head := (vl-parse-clocking-direction))
             (items := (vl-parse-list-of-clocking-decl-assigns head))
             (:= (vl-match-token :vl-semi))
             (return items)))
       (t
        (seq
         tokstream
         (atts := (vl-parse-0+-attribute-instances))
         (when (vl-is-token? :vl-kwd-property)
               (property := (vl-parse-property-declaration))
               (return (let ((stupid-hack-to-use-atts atts))
                         (declare (ignore stupid-hack-to-use-atts))
                         (list property))))
         (when (vl-is-token? :vl-kwd-sequence)
               (sequence := (vl-parse-sequence-declaration))
               (return (list sequence)))
         (when (vl-is-token? :vl-kwd-let)
               (return-raw
                    (vl-parse-error
                         "BOZO not yet implemented: let declarations")))
         (return-raw
          (vl-parse-error
           "Expected default, clocking assignment, or assertion item")))))))

    Theorem: vl-parse-clocking-block-item-fails-gracefully

    (defthm vl-parse-clocking-block-item-fails-gracefully
      (implies (mv-nth 0 (vl-parse-clocking-block-item))
               (not (mv-nth 1 (vl-parse-clocking-block-item)))))

    Theorem: vl-warning-p-of-vl-parse-clocking-block-item

    (defthm vl-warning-p-of-vl-parse-clocking-block-item
      (iff (vl-warning-p (mv-nth 0 (vl-parse-clocking-block-item)))
           (mv-nth 0 (vl-parse-clocking-block-item))))

    Theorem: vl-parse-clocking-block-item-result

    (defthm vl-parse-clocking-block-item-result
      (implies (and t)
               (vl-clocking-block-item-list-p
                    (mv-nth 1 (vl-parse-clocking-block-item)))))

    Theorem: vl-parse-clocking-block-item-true-listp

    (defthm vl-parse-clocking-block-item-true-listp
      (true-listp (mv-nth 1 (vl-parse-clocking-block-item)))
      :rule-classes :type-prescription)

    Theorem: vl-parse-clocking-block-item-count-strong

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