• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
          • Preprocessor
            • Vl-iframe
            • Preprocessor-ifdef-minutia
            • Vl-preprocess
            • Vl-preprocess-loop
            • Vl-includeskips
            • Vl-read-until-end-of-define
            • Vl-define-formallist->defaults
            • Vl-define
            • Vl-expand-define
            • Vl-read-include
            • Vl-substitute-into-macro-text
            • Vl-process-ifdef
            • Ppst
              • Vl-saved-ppst
              • Ppst-accessors
              • Ppst-mutators
              • Vl-ppst-fatal
              • Vl-restore-ppst
              • Vl-maybe-ppst-warn
              • Vl-save-ppst
              • Vl-ppst-warn
              • Vl-ppst-maybe-write1
              • Vl-ppst-maybe-write
              • Vl-ppst-write
            • Vl-read-define-default-text
            • Vl-process-define
            • Preprocessor-include-minutia
            • Vl-trim-for-preproc
            • Vl-line-up-define-formals-and-actuals
            • Vl-process-undef
            • Vl-split-define-text
            • Vl-def-context
            • Vl-process-endif
            • Scan-backward-for-non-whitespace
            • Vl-ifdef-context
            • Scan-backward-for-whitespace
            • Vl-atvl-atts-text
            • Scan-for-non-whitespace
            • Vl-check-remaining-formals-all-have-defaults
            • Vl-process-else
            • Vl-is-compiler-directive-p
            • Vl-includeskips-controller-lookup
            • Vl-ifdef-use-map
            • Vl-defines
            • Vl-def-use-map
            • Vl-nice-bytes
            • Vl-safe-previous-n
            • Vl-safe-next-n
            • Vl-ppst-pad
            • Vl-filename-to-string-literal
            • Vl-maybe-update-filemap
            • *vl-preprocess-clock*
            • Vl-ppst->warnings
            • Vl-ppst->iskips
            • Vl-ppst->ifdefmap
            • Vl-ppst->idcache
            • Vl-istack
            • Vl-ppst->istack
            • Vl-ppst->includes
            • Vl-ppst->filemap
            • Vl-ppst->defmap
            • Vl-ppst->defines
            • Vl-ppst->config
            • Vl-ppst->bytes
            • Vl-ppst->activep
            • Vl-ppst->acc
            • Vl-ppst-record-ifdef-use
            • Vl-ppst-record-def-use
            • Vl-ifdef-context-list
            • Vl-def-context-list
            • Vl-ppst-update-warnings
            • Vl-ppst-update-istack
            • Vl-ppst-update-iskips
            • Vl-ppst-update-includes
            • Vl-ppst-update-ifdefmap
            • Vl-ppst-update-idcache
            • Vl-ppst-update-filemap
            • Vl-ppst-update-defmap
            • Vl-ppst-update-defines
            • Vl-ppst-update-config
            • Vl-ppst-update-activep
            • Vl-ppst-update-bytes
            • Vl-ppst-update-acc
            • Vl-ppst-unsound-nreverse-acc
          • Vl-loadconfig
          • Vl-loadstate
          • Lexer
          • Parser
          • Vl-load-merge-descriptions
          • Vl-find-basename/extension
          • Vl-load-file
          • Vl-loadresult
          • Scope-of-defines
          • Vl-find-file
          • Vl-flush-out-descriptions
          • Vl-description
          • Vl-read-file
          • Vl-includeskips-report-gather
          • Vl-load-main
          • Extended-characters
          • Vl-load
          • Vl-load-description
          • Vl-descriptions-left-to-load
          • Inject-warnings
          • Vl-preprocess-debug
          • Vl-write-preprocessor-debug-file
          • Vl-read-file-report-gather
          • Vl-load-descriptions
          • Vl-load-files
          • Translate-off
          • Vl-load-read-file-hook
          • Vl-read-file-report
          • Vl-loadstate-pad
          • Vl-load-summary
          • Vl-collect-modules-from-descriptions
          • Vl-loadstate->warnings
          • Vl-iskips-report
          • Vl-descriptionlist
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
        • Mlib
        • Transforms
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Preprocessor

Ppst

Preprocessor state object.

Our preprocessor deals with a lot of state, and needs to mutate it a lot, so we stick its fields together in a stobj.

Definition: ppst

(defstobj ppst
  (vl-ppst-acc :type (satisfies vl-echarlist-p)
               :initially nil)
  (vl-ppst-istack :type (satisfies vl-istack-p)
                  :initially nil)
  (vl-ppst-activep :type (satisfies booleanp)
                   :initially nil)
  (vl-ppst-defines :type (satisfies vl-defines-p)
                   :initially nil)
  (vl-ppst-filemap :type (satisfies vl-filemap-p)
                   :initially nil)
  (vl-ppst-config
       :type (satisfies vl-loadconfig-p)
       :initially (:vl-loadconfig (edition . :system-verilog-2012)
                                  (strictp)
                                  (start-files)
                                  (start-names)
                                  (search-path)
                                  (search-exts "v")
                                  (include-dirs)
                                  (defines)
                                  (plusargs)
                                  (filemapp . t)
                                  (debugp)
                                  (flush-tries . 10000)
                                  (mintime . 1)))
  (vl-ppst-iskips :type (satisfies vl-includeskips-p)
                  :initially nil)
  (vl-ppst-warnings :type (satisfies vl-warninglist-p)
                    :initially nil)
  (vl-ppst-includes :type (satisfies string-listp)
                    :initially nil)
  (vl-ppst-bytes :type unsigned-byte
                 :initially 0)
  (vl-ppst-idcache :type (satisfies vl-dirlist-cache-p)
                   :initially nil)
  (vl-ppst-ifdefmap :type (satisfies vl-ifdef-use-map-p)
                    :initially nil)
  (vl-ppst-defmap :type (satisfies vl-def-use-map-p)
                  :initially nil)
  :inline t
  :non-memoizable t
  :renaming ((ppstp vl-ppst-p)
             (vl-ppst-acc vl-ppst->acc-raw)
             (update-vl-ppst-acc vl-ppst-update-acc-raw)
             (vl-ppst-istack vl-ppst->istack-raw)
             (update-vl-ppst-istack vl-ppst-update-istack-raw)
             (vl-ppst-activep vl-ppst->activep-raw)
             (update-vl-ppst-activep vl-ppst-update-activep-raw)
             (vl-ppst-defines vl-ppst->defines-raw)
             (update-vl-ppst-defines vl-ppst-update-defines-raw)
             (vl-ppst-filemap vl-ppst->filemap-raw)
             (update-vl-ppst-filemap vl-ppst-update-filemap-raw)
             (vl-ppst-config vl-ppst->config-raw)
             (update-vl-ppst-config vl-ppst-update-config-raw)
             (vl-ppst-iskips vl-ppst->iskips-raw)
             (update-vl-ppst-iskips vl-ppst-update-iskips-raw)
             (vl-ppst-warnings vl-ppst->warnings-raw)
             (update-vl-ppst-warnings vl-ppst-update-warnings-raw)
             (vl-ppst-includes vl-ppst->includes-raw)
             (update-vl-ppst-includes vl-ppst-update-includes-raw)
             (vl-ppst-bytes vl-ppst->bytes-raw)
             (update-vl-ppst-bytes vl-ppst-update-bytes-raw)
             (vl-ppst-idcache vl-ppst->idcache-raw)
             (update-vl-ppst-idcache vl-ppst-update-idcache-raw)
             (vl-ppst-ifdefmap vl-ppst->ifdefmap-raw)
             (update-vl-ppst-ifdefmap vl-ppst-update-ifdefmap-raw)
             (vl-ppst-defmap vl-ppst->defmap-raw)
             (update-vl-ppst-defmap vl-ppst-update-defmap-raw)))

Subtopics

Vl-saved-ppst
A saved ppst, useful for backtracking in case of bad includes.
Ppst-accessors
Replacement accessors for ppst with unconditional types and automatic ppst.
Ppst-mutators
Replacement mutators for ppst with automatic ppst.
Vl-ppst-fatal
Add a fatal warning to the ppst.
Vl-restore-ppst
Restore a saved vl-saved-ppst into the ppst stobj.
Vl-maybe-ppst-warn
Add a non-fatal warning to the ppst.
Vl-save-ppst
Save the contents of a ppst into a vl-saved-ppst.
Vl-ppst-warn
Add a non-fatal warning to the ppst.
Vl-ppst-maybe-write1
Add some preprocessor output unless we're currently ifdef'd out.
Vl-ppst-maybe-write
Add some preprocessor output unless we're currently ifdef'd out.
Vl-ppst-write
Unconditionally add some preprocessor output.