• 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
        • Lint
        • Mlib
        • Server
        • Kit
          • Vl-model
            • Vl-model-opts-p
          • Vl-json
          • Vl-gather
          • Vl-server
          • Vl-pp
          • Vl-lint
          • Vl-main
          • Vl-toolkit-other-command
          • Vl-help
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Kit

Vl-model

The vl model command.

Signature
(vl-model argv &key (state 'state)) → state
Arguments
argv — Guard (string-listp argv).

Definitions and Theorems

Function: vl-model-fn

(defun vl-model-fn (argv state)
  (declare (xargs :stobjs (state)))
  (declare (xargs :guard (string-listp argv)))
  (let ((__function__ 'vl-model))
    (declare (ignorable __function__))
    (b* (((mv errmsg opts start-files)
          (parse-vl-model-opts argv))
         ((when errmsg)
          (die "~@0~%" errmsg)
          state)
         (opts (change-vl-model-opts opts
                                     :start-files start-files))
         ((vl-model-opts opts) opts)
         ((when opts.help)
          (vl-cw-ps-seq (vl-print *vl-model-help*))
          (exit-ok)
          state)
         ((when opts.readme)
          (vl-cw-ps-seq (vl-print *vl-model-readme*))
          (exit-ok)
          state)
         ((unless (consp opts.start-files))
          (die "No files to process.")
          state)
         (- (cw "Building ACL2 model for:~%"))
         (- (cw " - start files: ~x0~%"
                opts.start-files))
         (state (must-be-regular-files! opts.start-files))
         (- (cw " - search path: ~x0~%"
                opts.search-path))
         (state (must-be-directories! opts.search-path))
         (- (cw " - include directories: ~x0~%"
                opts.include-dirs))
         (state (must-be-directories! opts.include-dirs))
         (- (and opts.defines
                 (cw "; defines: ~x0~%" opts.defines)))
         (- (cw "Writing output to ~x0:~%" opts.outdir))
         (state (must-be-directories! (list opts.outdir)))
         ((when (and (equal opts.model-file "")
                     (equal opts.esims-file "")
                     (equal opts.verilog-file "")))
          (die "No model file or esims file, so nothing to do?")
          state)
         (- (or (equal opts.model-file "")
                (cw " - model file: ~x0~%"
                    opts.model-file)))
         (- (or (equal opts.esims-file "")
                (cw " - esims file: ~x0~%"
                    opts.esims-file)))
         (- (or (equal opts.verilog-file "")
                (cw " - verilog file: ~x0~%"
                    opts.verilog-file)))
         (- (cw "Soft heap size ceiling: ~x0 GB~%"
                opts.mem))
         (- (acl2::set-max-mem (* (expt 2 30) opts.mem)))
         (state (vl-model-main opts)))
      (exit-ok)
      state)))

Subtopics

Vl-model-opts-p
Options for running vl model.