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