Basic constructor macro for wire structures.
(make-wire [:name <name>] [:width <width>] [:low-idx <low-idx>] [:delay <delay>] [:revp <revp>] [:type <type>] [:atts <atts>])
This is the usual way to construct wire structures. It simply conses together a structure with the specified fields.
This macro generates a new wire structure from scratch. See also change-wire, which can "change" an existing structure, instead.
This is an ordinary
Macro:
(defmacro make-wire (&rest args) (std::make-aggregate 'wire args '((:name) (:width) (:low-idx) (:delay) (:revp) (:type) (:atts)) 'make-wire nil))
Function:
(defun wire (name width low-idx delay revp type atts) (declare (xargs :guard (and (name-p name) (posp width) (integerp low-idx) (maybe-posp delay) (wiretype type) (attributes-p atts)))) (declare (xargs :guard t)) (let ((__function__ 'wire)) (declare (ignorable __function__)) (b* ((name (mbe :logic (name-fix name) :exec name)) (width (mbe :logic (pos-fix width) :exec width)) (low-idx (mbe :logic (ifix low-idx) :exec low-idx)) (delay (mbe :logic (acl2::maybe-posp-fix delay) :exec delay)) (type (mbe :logic (wiretype-fix type) :exec type)) (atts (mbe :logic (attributes-fix atts) :exec atts))) (std::prod-cons (std::prod-cons name (std::prod-cons width low-idx)) (std::prod-cons (std::prod-cons delay revp) (std::prod-cons type atts))))))