• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
          • Address
          • Wire
            • Wire-fix
            • Wire-p
            • Make-wire
              • Wire-equiv
              • Change-wire
              • Wire->name
              • Wire->low-idx
              • Wire->delay
              • Wire->width
              • Wire->type
              • Wire->atts
              • Wirelist
              • Wire->revp
              • Wiretype
            • Module
            • Lhs
            • Path
            • Svar-add-namespace
            • Design
            • Modinst
            • Lhs-add-namespace
            • Modalist
            • Path-add-namespace
            • Modname->submodnames
            • Name
            • Constraintlist-addr-p
            • Svex-alist-addr-p
            • Svar-map-addr-p
            • Lhspairs-addr-p
            • Modname
            • Assigns-addr-p
            • Lhs-addr-p
            • Lhatom-addr-p
            • Modhier-list-measure
            • Attributes
            • Modhier-measure
            • Modhier-list-measure-aux
            • Modhier-loopfreelist-p
            • Modhier-loopfree-p
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Wire

    Make-wire

    Basic constructor macro for wire structures.

    Syntax
    (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.

    Definition

    This is an ordinary make- macro introduced by defprod.

    Macro: make-wire

    (defmacro make-wire (&rest args)
      (std::make-aggregate 'wire
                           args
                           '((:name)
                             (:width)
                             (:low-idx)
                             (:delay)
                             (:revp)
                             (:type)
                             (:atts))
                           'make-wire
                           nil))

    Function: wire

    (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))))))