• 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-maybe-parse-lifetime
            • Parse-dpi-import-export
            • Parse-ports
              • Parse-port-types
              • Creating-portdecls/vardecls
                • Vl-make-ports-and-maybe-nets
                • Vl-parsed-port-identifier-p
                • Vl-build-netdecls-for-ports
                  • Vl-build-subsequent-netdecls-for-ports
                • Vl-build-portdecls
                • Vl-parsed-port-identifier-list-from-idtokenlist
                • Vl-parsed-port-identifier-list-p
              • Verilog-2005-ports
              • Sv-non-ansi-portdecls
              • Vl-parse-ansi-port-declaration-2005
              • Vl-parse-1+-port-declarations-separated-by-commas-2005
              • Vl-parse-ansi-port-declaration
              • Vl-parse-1+-ansi-port-declarations
              • Verilog-2005-portdecls
            • 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
  • Creating-portdecls/vardecls

Vl-build-netdecls-for-ports

Main loop for creating the associated vl-vardecls.

Signature
(vl-build-netdecls-for-ports x &key nettype type atts) 
  → 
netdecls
Arguments
x — Guard (vl-parsed-port-identifier-list-p x).
nettype — Guard (vl-maybe-nettypename-p nettype).
type — Guard (vl-datatype-p type).
atts — Guard (vl-atts-p atts).
Returns
netdecls — Type (vl-vardecllist-p netdecls).

Definitions and Theorems

Function: vl-build-netdecls-for-ports-fn

(defun vl-build-netdecls-for-ports-fn (x nettype type atts)
 (declare (xargs :guard (and (vl-parsed-port-identifier-list-p x)
                             (vl-maybe-nettypename-p nettype)
                             (vl-datatype-p type)
                             (vl-atts-p atts))))
 (let ((__function__ 'vl-build-netdecls-for-ports))
  (declare (ignorable __function__))
  (b*
   (((when (atom x)) nil)
    ((vl-parsed-port-identifier x1) (car x))
    (-
      (or (not (vl-datatype->udims type))
          (raise "Base datatype already has unpacked dimensions?")))
    (basedecl (make-vl-vardecl :name (vl-idtoken->name x1.name)
                               :loc (vl-token->loc x1.name)
                               :nettype nettype
                               :type type
                               :atts atts
                               :varp nil
                               :constp nil
                               :lifetime nil
                               :vectoredp nil
                               :scalaredp nil
                               :delay nil
                               :cstrength nil))
    ((when (consp x1.udims))
     (vl-build-subsequent-netdecls-for-ports x basedecl)))
   (cons basedecl
         (vl-build-subsequent-netdecls-for-ports (cdr x)
                                                 basedecl)))))

Theorem: vl-vardecllist-p-of-vl-build-netdecls-for-ports

(defthm vl-vardecllist-p-of-vl-build-netdecls-for-ports
  (b*
   ((netdecls (vl-build-netdecls-for-ports-fn x nettype type atts)))
   (vl-vardecllist-p netdecls))
  :rule-classes :rewrite)

Theorem: true-listp-of-vl-build-netdecls-for-ports

(defthm true-listp-of-vl-build-netdecls-for-ports
  (b*
   ((netdecls (vl-build-netdecls-for-ports-fn x nettype type atts)))
   (true-listp netdecls))
  :rule-classes :type-prescription)

Theorem: len-of-vl-build-netdecls

(defthm len-of-vl-build-netdecls
  (b*
   ((netdecls (vl-build-netdecls-for-ports-fn x nettype type atts)))
   (equal (len netdecls) (len x)))
  :rule-classes :rewrite)

Theorem: consp-of-vl-build-netdecls

(defthm consp-of-vl-build-netdecls
  (b*
   ((netdecls (vl-build-netdecls-for-ports-fn x nettype type atts)))
   (equal (consp netdecls) (consp x)))
  :rule-classes :rewrite)

Theorem: vl-build-netdecls-under-iff

(defthm vl-build-netdecls-under-iff
  (b*
   ((netdecls (vl-build-netdecls-for-ports-fn x nettype type atts)))
   (iff netdecls (consp x)))
  :rule-classes :rewrite)

Subtopics

Vl-build-subsequent-netdecls-for-ports
See vl-build-subsequent-portdecls. This is identical but for the vardecls instead of the portdecls.