• 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-genvar-declaration
            • Vl-parse
            • Parse-netdecls
            • Parse-asserts
              • Vl-parse-0+-assertion-variable-declarations
              • Vl-parse-property-formal-type-and-id
              • Vl-parse-assertion-item
              • Vl-parse-sequence-declaration
              • Vl-parse-property-declaration
              • Vl-parse-sequence-port-item
                • Vl-parse-property-port-item
                • Vl-parse-1+-sequence-port-items
                • Vl-parse-1+-property-port-items
                • Vl-make-assertion-vardecls
                • Vl-plausible-start-of-assertion-item-p
                • Vl-parse-assertion-item-looks-concurrent-p
              • 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-asserts

    Vl-parse-sequence-port-item

    Parse sequence_port_item.

    Signature
    (vl-parse-sequence-port-item &key (tokstream 'tokstream) 
                                 (config 'config)) 
     
      → 
    (mv errmsg? value new-tokstream)
    Arguments
    config — Guard (vl-loadconfig-p config).
    sequence_port_item ::= { attribute_instance }
                              [ 'local' [ sequence_lvar_port_direction ] ]
                              sequence_formal_type
                              formal_port_identifier {variable_dimension}
                              [ '=' sequence_actual_arg ]
    
    sequence_lvar_port_direction ::= 'input' | 'inout' | 'output'
    formal_port_identifier ::= identifier

    Definitions and Theorems

    Function: vl-parse-sequence-port-item-fn

    (defun vl-parse-sequence-port-item-fn (tokstream config)
     (declare (xargs :stobjs (tokstream)))
     (declare (xargs :guard (vl-loadconfig-p config)))
     (declare (ignorable config))
     (let ((__function__ 'vl-parse-sequence-port-item))
      (declare (ignorable __function__))
      (seq
       tokstream
       (atts := (vl-parse-0+-attribute-instances))
       (when (vl-is-token? :vl-kwd-local)
             (local := (vl-match))
             (dir := (vl-parse-optional-port-direction)))
       ((type . name)
        := (vl-parse-property-formal-type-and-id))
       (dims := (vl-parse-0+-variable-dimensions))
       (when
        (vl-is-token? :vl-equalsign)
        (:= (vl-match))
        (arg := (vl-parse-property-actual-arg (vl-idtoken->name name))))
       (return
        (make-vl-propport
           :name (vl-idtoken->name name)
           :localp (if local t nil)
           :dir (or dir :vl-input)
           :type (vl-datatype-update-udims dims type)
           :arg
           (or arg
               (make-vl-propactual-blank :name (vl-idtoken->name name)))
           :atts atts
           :loc (vl-token->loc name))))))

    Theorem: vl-parse-sequence-port-item-fails-gracefully

    (defthm vl-parse-sequence-port-item-fails-gracefully
      (implies (mv-nth 0 (vl-parse-sequence-port-item))
               (not (mv-nth 1 (vl-parse-sequence-port-item)))))

    Theorem: vl-warning-p-of-vl-parse-sequence-port-item

    (defthm vl-warning-p-of-vl-parse-sequence-port-item
      (iff (vl-warning-p (mv-nth 0 (vl-parse-sequence-port-item)))
           (mv-nth 0 (vl-parse-sequence-port-item))))

    Theorem: vl-parse-sequence-port-item-result

    (defthm vl-parse-sequence-port-item-result
     (implies
         (and t)
         (equal (vl-propport-p (mv-nth 1 (vl-parse-sequence-port-item)))
                (not (mv-nth 0 (vl-parse-sequence-port-item))))))

    Theorem: vl-parse-sequence-port-item-count-strong

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