Construct basic ports corresponding to a list of portdecls.
(vl-ports-from-portdecls x) → ports
Function:
(defun vl-ports-from-portdecls (x) (declare (xargs :guard (vl-portdecllist-p x))) (let ((__function__ 'vl-ports-from-portdecls)) (declare (ignorable __function__)) (b* (((when (atom x)) nil) (name (vl-portdecl->name (car x))) (loc (vl-portdecl->loc (car x))) (expr (vl-idexpr name))) (cons (make-vl-regularport :name name :expr expr :loc loc) (vl-ports-from-portdecls (cdr x))))))
Theorem:
(defthm vl-portlist-p-of-vl-ports-from-portdecls (b* ((ports (vl-ports-from-portdecls x))) (vl-portlist-p ports)) :rule-classes :rewrite)
Theorem:
(defthm vl-ports-from-portdecls-of-vl-portdecllist-fix-x (equal (vl-ports-from-portdecls (vl-portdecllist-fix x)) (vl-ports-from-portdecls x)))
Theorem:
(defthm vl-ports-from-portdecls-vl-portdecllist-equiv-congruence-on-x (implies (vl-portdecllist-equiv x x-equiv) (equal (vl-ports-from-portdecls x) (vl-ports-from-portdecls x-equiv))) :rule-classes :congruence)