• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
          • Expression-sizing
          • Occform
          • Oprewrite
          • Expand-functions
            • Vl-expr-expand-function-calls
            • Vl-expand-function-call
            • Vl-module-expand-functions
            • Vl-modulelist-expand-functions
            • Vl-check-bad-funcalls
            • Vl-funtemplate
              • Vl-funtemplate-p
              • Vl-funtemplate-fix
              • Vl-funtemplate-equiv
              • Make-vl-funtemplate
                • Vl-funtemplate->locals
                • Vl-funtemplate->inputs
                • Vl-funtemplate->assigns
                • Change-vl-funtemplate
                • Vl-funtemplate->out
                • Vl-funtemplate->name
              • Vl-funbody-to-assignments
              • Vl-assignlist->rhses
              • Vl-fundecl-expand-params
              • Vl-fun-stmt-okp
              • Vl-fundecllist-expand-params
              • Vl-remove-fake-function-vardecls
              • Vl-design-expand-functions
            • Delayredux
            • Unparameterization
            • Caseelim
            • Split
            • Selresolve
            • Weirdint-elim
            • Vl-delta
            • Replicate-insts
            • Rangeresolve
            • Propagate
            • Clean-selects
            • Clean-params
            • Blankargs
            • Inline-mods
            • Expr-simp
            • Trunc
            • Always-top
            • Gatesplit
            • Gate-elim
            • Expression-optimization
            • Elim-supplies
            • Wildelim
            • Drop-blankports
            • Clean-warnings
            • Addinstnames
            • Custom-transform-hooks
            • Annotate
            • Latchcode
            • Elim-unused-vars
            • Problem-modules
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-funtemplate

    Make-vl-funtemplate

    Basic constructor macro for vl-funtemplate structures.

    Syntax
    (make-vl-funtemplate [:name <name>] 
                         [:inputs <inputs>] 
                         [:locals <locals>] 
                         [:out <out>] 
                         [:assigns <assigns>]) 
    

    This is the usual way to construct vl-funtemplate structures. It simply conses together a structure with the specified fields.

    This macro generates a new vl-funtemplate structure from scratch. See also change-vl-funtemplate, which can "change" an existing structure, instead.

    Definition

    This is an ordinary make- macro introduced by defprod.

    Macro: make-vl-funtemplate

    (defmacro make-vl-funtemplate (&rest args)
      (std::make-aggregate 'vl-funtemplate
                           args
                           '((:name)
                             (:inputs)
                             (:locals)
                             (:out)
                             (:assigns))
                           'make-vl-funtemplate
                           nil))

    Function: vl-funtemplate

    (defun vl-funtemplate (name inputs locals out assigns)
      (declare (xargs :guard (and (stringp name)
                                  (vl-vardecllist-p inputs)
                                  (vl-vardecllist-p locals)
                                  (vl-vardecl-p out)
                                  (vl-assignlist-p assigns))))
      (declare (xargs :guard t))
      (let ((__function__ 'vl-funtemplate))
        (declare (ignorable __function__))
        (b* ((name (mbe :logic (str-fix name) :exec name))
             (inputs (mbe :logic (vl-vardecllist-fix inputs)
                          :exec inputs))
             (locals (mbe :logic (vl-vardecllist-fix locals)
                          :exec locals))
             (out (mbe :logic (vl-vardecl-fix out)
                       :exec out))
             (assigns (mbe :logic (vl-assignlist-fix assigns)
                           :exec assigns)))
          (cons :vl-funtemplate
                (std::prod-cons
                     (std::prod-cons name inputs)
                     (std::prod-cons locals
                                     (std::prod-cons out assigns)))))))