• 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
          • Preprocessor
            • Vl-iframe-p
            • Preprocessor-ifdef-minutia
            • Vl-preprocess-loop
            • Vl-read-until-end-of-define
            • Vl-expand-define
            • Vl-read-include
            • Vl-process-ifdef
            • Vl-substitute-into-macro-text
            • Vl-preprocess
            • Vl-define
              • Vl-define-formallist->defaults
              • Vl-define-formallist->names
              • Vl-define-fix
              • Vl-define-formal
              • Vl-define-equiv
              • Make-vl-define
                • Vl-add-define
                • Vl-define->formals
                • Vl-define-p
                • Change-vl-define
                • Vl-define->name
                • Vl-define->loc
                • Vl-define->body
                • Vl-pp-define
                • Vl-define-formallist
              • Vl-process-define
              • Vl-process-undef
              • Preprocessor-include-minutia
              • Vl-split-define-text
              • Vl-read-timescale
              • Vl-line-up-define-formals-and-actuals
              • Vl-process-else
              • Vl-process-endif
              • Vl-istack-p
              • Vl-is-compiler-directive-p
              • Vl-check-remaining-formals-all-have-defaults
              • Vl-safe-previous-n
              • Vl-safe-next-n
              • Vl-defines
              • *vl-preprocess-clock*
            • Vl-loadconfig
            • Lexer
            • Vl-loadstate
            • Parser
            • Vl-load-merge-descriptions
            • Scope-of-defines
            • Vl-load-file
            • Vl-flush-out-descriptions
            • Vl-description
            • Vl-loadresult
            • Vl-read-file
            • Vl-find-basename/extension
            • Vl-find-file
            • Vl-read-files
            • Extended-characters
            • Vl-load
            • Vl-load-main
            • Vl-load-description
            • Vl-descriptions-left-to-load
            • Inject-warnings
            • Vl-load-descriptions
            • Vl-load-files
            • Vl-load-summary
            • Vl-collect-modules-from-descriptions
            • Vl-descriptionlist
          • Transforms
          • Lint
          • Mlib
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-define

    Make-vl-define

    Basic constructor macro for vl-define structures.

    Syntax
    (make-vl-define [:name <name>] 
                    [:formals <formals>] 
                    [:body <body>] 
                    [:loc <loc>]) 
    

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

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

    Definition

    This is an ordinary make- macro introduced by defprod.

    Macro: make-vl-define

    (defmacro make-vl-define (&rest args)
      (std::make-aggregate 'vl-define
                           args
                           '((:name) (:formals) (:body) (:loc))
                           'make-vl-define
                           nil))

    Function: vl-define

    (defun vl-define (name formals body loc)
      (declare (xargs :guard (and (stringp name)
                                  (vl-define-formallist-p formals)
                                  (stringp body)
                                  (vl-location-p loc))))
      (declare (xargs :guard t))
      (let ((__function__ 'vl-define))
        (declare (ignorable __function__))
        (b* ((name (mbe :logic (str-fix name) :exec name))
             (formals (mbe :logic (vl-define-formallist-fix formals)
                           :exec formals))
             (body (mbe :logic (str-fix body) :exec body))
             (loc (mbe :logic (vl-location-fix loc)
                       :exec loc)))
          (list (cons 'name name)
                (cons 'formals formals)
                (cons 'body body)
                (cons 'loc loc)))))