• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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-portdecls
                  • Vl-build-subsequent-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-portdecls

Main loop for creating real vl-portdecls.

Signature
(vl-build-portdecls x &key dir nettype type atts) → portdecls
Arguments
x — Guard (vl-parsed-port-identifier-list-p x).
dir — Guard (vl-direction-p dir).
nettype — Guard (vl-maybe-nettypename-p nettype).
type — Guard (vl-datatype-p type).
atts — Guard (vl-atts-p atts).
Returns
portdecls — Type (vl-portdecllist-p portdecls).

Definitions and Theorems

Function: vl-build-portdecls-fn

(defun vl-build-portdecls-fn (x dir nettype type atts)
 (declare (xargs :guard (and (vl-parsed-port-identifier-list-p x)
                             (vl-direction-p dir)
                             (vl-maybe-nettypename-p nettype)
                             (vl-datatype-p type)
                             (vl-atts-p atts))))
 (let ((__function__ 'vl-build-portdecls))
  (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-portdecl :name (vl-idtoken->name x1.name)
                                :loc (vl-token->loc x1.name)
                                :type type
                                :dir dir
                                :nettype nettype
                                :atts atts))
    ((when (consp x1.udims))
     (vl-build-subsequent-portdecls x basedecl)))
   (cons basedecl
         (vl-build-subsequent-portdecls (cdr x)
                                        basedecl)))))

Theorem: vl-portdecllist-p-of-vl-build-portdecls

(defthm vl-portdecllist-p-of-vl-build-portdecls
  (b* ((portdecls (vl-build-portdecls-fn x dir nettype type atts)))
    (vl-portdecllist-p portdecls))
  :rule-classes :rewrite)

Theorem: true-listp-of-vl-build-portdecls

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

Theorem: len-of-vl-build-portdecls

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

Theorem: consp-of-vl-build-portdecls

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

Theorem: vl-build-portdecls-under-iff

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

Subtopics

Vl-build-subsequent-portdecls