• 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
              • Vl-build-netdecls
              • Vl-parse-net-declaration-finish
              • Vl-parse-net-declaration
              • Vl-build-netdecls-aux
                • Vl-parse-list-of-net-identifiers
                • Vl-parse-netdecltype
                • Vl-netdecls-error
                • Vl-parse-optional-nettype
                • Vl-atomify-assignpairs
                • Vl-rangelist-list
                • Vl-netdeclassigns-check-array-assigns
                • Vl-netdeclassigns-characterize
              • 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-netdecls

    Vl-build-netdecls-aux

    Signature
    (vl-build-netdecls-aux x basedecl baseassign) 
      → 
    (mv nets assigns)
    Arguments
    x — Guard (vl-vardeclassignlist-p x).
    basedecl — Guard (vl-vardecl-p basedecl).
    baseassign — Guard (vl-assign-p baseassign).
    Returns
    nets — Type (vl-vardecllist-p nets).
    assigns — Type (vl-assignlist-p assigns).

    Definitions and Theorems

    Function: vl-build-netdecls-aux

    (defun vl-build-netdecls-aux (x basedecl baseassign)
     (declare (xargs :guard (and (vl-vardeclassignlist-p x)
                                 (vl-vardecl-p basedecl)
                                 (vl-assign-p baseassign))))
     (declare (xargs :guard (vl-vardeclassignlist-newfree-p x)))
     (let ((__function__ 'vl-build-netdecls-aux))
      (declare (ignorable __function__))
      (b*
       (((when (atom x)) (mv nil nil))
        ((vl-vardeclassign x1) (car x))
        (type (vl-vardecl->type basedecl))
        (type (if (consp x1.dims)
                  (vl-datatype-update-udims x1.dims type)
                type))
        (vardecl
         (change-vl-vardecl basedecl
                            :name x1.id
                            :type type
                            :delay (and (not x1.rhs)
                                        (vl-assign->delay baseassign))))
        (assign
             (and x1.rhs
                  (change-vl-assign baseassign
                                    :lvalue (vl-idexpr x1.id)
                                    :expr (vl-rhsexpr->guts x1.rhs))))
        ((mv rest-decls rest-assigns)
         (vl-build-netdecls-aux (cdr x)
                                basedecl baseassign)))
       (mv (cons vardecl rest-decls)
           (if assign (cons assign rest-assigns)
             rest-assigns)))))

    Theorem: vl-vardecllist-p-of-vl-build-netdecls-aux.nets

    (defthm vl-vardecllist-p-of-vl-build-netdecls-aux.nets
      (b* (((mv ?nets ?assigns)
            (vl-build-netdecls-aux x basedecl baseassign)))
        (vl-vardecllist-p nets))
      :rule-classes :rewrite)

    Theorem: vl-assignlist-p-of-vl-build-netdecls-aux.assigns

    (defthm vl-assignlist-p-of-vl-build-netdecls-aux.assigns
      (b* (((mv ?nets ?assigns)
            (vl-build-netdecls-aux x basedecl baseassign)))
        (vl-assignlist-p assigns))
      :rule-classes :rewrite)

    Theorem: vl-build-netdecls-aux-mvtypes-0

    (defthm vl-build-netdecls-aux-mvtypes-0
     (true-listp (mv-nth 0
                         (vl-build-netdecls-aux x basedecl baseassign)))
     :rule-classes :type-prescription)

    Theorem: vl-build-netdecls-aux-mvtypes-1

    (defthm vl-build-netdecls-aux-mvtypes-1
     (true-listp (mv-nth 1
                         (vl-build-netdecls-aux x basedecl baseassign)))
     :rule-classes :type-prescription)