• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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-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
    • Preprocessor

    Vl-is-compiler-directive-p

    List of Verilog-2005 compiler directives.

    This list is taken directly from Section 19. We do not support some of these, but we need to recognize all of them so that we can complain when we run into ones we don't support, etc.

    Centaur Extension. We also add `centaur_define, which we treat exactly as `define.

    This is an ordinary defenum.

    Function: vl-is-compiler-directive-p

    (defun vl-is-compiler-directive-p (x)
      (declare (xargs :guard t))
      (or (equal x '"begin_keywords")
          (equal x '"celldefine")
          (equal x '"default_nettype")
          (equal x '"define")
          (equal x '"else")
          (equal x '"elsif")
          (equal x '"end_keywords")
          (equal x '"endcelldefine")
          (equal x '"endif")
          (equal x '"ifdef")
          (equal x '"ifndef")
          (equal x '"include")
          (equal x '"line")
          (equal x '"nounconnected_drive")
          (equal x '"pragma")
          (equal x '"resetall")
          (equal x '"timescale")
          (equal x '"unconnected_drive")
          (equal x '"undef")
          (equal x '"centaur_define")))

    Theorem: type-when-vl-is-compiler-directive-p

    (defthm type-when-vl-is-compiler-directive-p
      (implies (vl-is-compiler-directive-p x)
               (stringp x))
      :rule-classes :compound-recognizer)