Generate variable declarations for ports that don't have corresponding variable declarations.
(vl-make-port-implicit-wires items decls newitems) → newitems
Function:
(defun vl-make-port-implicit-wires (items decls newitems) (declare (xargs :guard (and (vl-genelementlist-p items) (vl-genelementlist-p newitems)))) (let ((__function__ 'vl-make-port-implicit-wires)) (declare (ignorable __function__)) (b* (((when (atom items)) (vl-genelementlist-fix newitems)) (item (vl-genelement-fix (car items))) ((unless (and (vl-genelement-case item :vl-genbase) (eq (tag (vl-genbase->item item)) :vl-portdecl))) (vl-make-port-implicit-wires (cdr items) decls (cons item newitems))) ((vl-portdecl portdecl) (vl-genbase->item item)) ((when (hons-get portdecl.name decls)) (vl-make-port-implicit-wires (cdr items) decls (cons item newitems))) (new-decl (make-vl-genbase :item (make-vl-vardecl :name portdecl.name :type portdecl.type :nettype portdecl.nettype :atts (cons '("VL_PORT_IMPLICIT") portdecl.atts) :loc portdecl.loc)))) (vl-make-port-implicit-wires (cdr items) decls (list* item new-decl newitems)))))
Theorem:
(defthm vl-genelementlist-p-of-vl-make-port-implicit-wires (b* ((newitems (vl-make-port-implicit-wires items decls newitems))) (vl-genelementlist-p newitems)) :rule-classes :rewrite)
Theorem:
(defthm vl-make-port-implicit-wires-of-vl-genelementlist-fix-items (equal (vl-make-port-implicit-wires (vl-genelementlist-fix items) decls newitems) (vl-make-port-implicit-wires items decls newitems)))
Theorem:
(defthm vl-make-port-implicit-wires-vl-genelementlist-equiv-congruence-on-items (implies (vl-genelementlist-equiv items items-equiv) (equal (vl-make-port-implicit-wires items decls newitems) (vl-make-port-implicit-wires items-equiv decls newitems))) :rule-classes :congruence)
Theorem:
(defthm vl-make-port-implicit-wires-of-vl-genelementlist-fix-newitems (equal (vl-make-port-implicit-wires items decls (vl-genelementlist-fix newitems)) (vl-make-port-implicit-wires items decls newitems)))
Theorem:
(defthm vl-make-port-implicit-wires-vl-genelementlist-equiv-congruence-on-newitems (implies (vl-genelementlist-equiv newitems newitems-equiv) (equal (vl-make-port-implicit-wires items decls newitems) (vl-make-port-implicit-wires items decls newitems-equiv))) :rule-classes :congruence)