Main loop for creating real vl-portdecls.
(vl-build-portdecls x &key dir nettype type atts) → portdecls
Function:
(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:
(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:
(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:
(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:
(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:
(defthm vl-build-portdecls-under-iff (b* ((portdecls (vl-build-portdecls-fn x dir nettype type atts))) (iff portdecls (consp x))) :rule-classes :rewrite)