Basic constructor macro for vl-genblock structures.
(make-vl-genblock [:name <name>] [:elems <elems>] [:loc <loc>])
This is the usual way to construct vl-genblock structures. It simply conses together a structure with the specified fields.
This macro generates a new vl-genblock structure from scratch. See also change-vl-genblock, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-vl-genblock (&rest args) (std::make-aggregate 'vl-genblock args '((:name) (:elems) (:loc)) 'make-vl-genblock nil))
Function:
(defun vl-genblock (name elems loc) (declare (xargs :guard (and (maybe-stringp name) (vl-genelementlist-p elems) (vl-location-p loc)))) (declare (xargs :guard t)) (let ((__function__ 'vl-genblock)) (declare (ignorable __function__)) (b* ((name (mbe :logic (maybe-string-fix name) :exec name)) (elems (mbe :logic (vl-genelementlist-fix elems) :exec elems)) (loc (mbe :logic (vl-location-fix loc) :exec loc))) (cons :vl-genblock (std::prod-cons name (std::prod-cons elems loc))))))