• 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-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
  • Vl2014

Loader

Finds and loads Verilog source files.

Most Verilog designs involve many files spread out across multiple directories. To really load a high-level module top, we typically need to:

  • start by parsing its file, say top.v, then
  • figure out which supporting descriptions are used within top and
  • use a search procedure to load these supporting descriptions from library directories.

Our top-level function for loading Verilog files, vl-load, implements such a scheme. It has various options (see vl-loadconfig-p) that allow you to specify the search paths and extensions to use when looking for files, etc.

VL-Only Comments

VL supports a special comment syntax:

//+VL single-line version
/*+VL multi-line version */

Which can be used to hide VL-specific code from other tools, e.g., if you need your modules to work with an older Verilog implementation that doesn't support Verilog-2005 style attributes, you might write something like:

//+VL (* my_attribute *)
assign foo = bar;

There is also a special, more concise syntax for attributes:

//@VL my_attribute

Subtopics

Preprocessor
Limited preprocessor for Verilog.
Vl-loadconfig
Options for how to load Verilog modules.
Lexer
A lexer for Verilog and SystemVerilog.
Vl-loadstate
Internal state object used throughout the VL loading routines.
Parser
A parser for a subset of Verilog and SystemVerilog.
Vl-load-merge-descriptions
Merge newly found Verilog descriptions with previously loaded descriptions, warning about any multiply defined descriptions.
Scope-of-defines
How VL and other tools handle the scope of `defines.
Vl-load-file
Main function for loading a single Verilog file.
Vl-flush-out-descriptions
Attempt to find and load any missing modules.
Vl-description
Representation of an arbitrary, top-level element.
Vl-loadresult
Return value from vl-load.
Vl-read-file
Read an entire file into a list of extended characters.
Vl-find-basename/extension
Alternative to vl-find-file that can take a list of extensions.
Vl-find-file
Determine where to load a file from, given its (absolute or relative) name and a list of directories to search.
Vl-read-files
Read an entire list of files into a list of extended characters.
Extended-characters
Characters with additional annotations.
Vl-load
Wrapper for vl-load-main that also reports errors or (with some configuration) can print other information.
Vl-load-main
Top level interface for loading Verilog sources.
Vl-load-description
Try to load a description from the search path.
Vl-descriptions-left-to-load
Determine which descriptions we still need to load.
Inject-warnings
Mechanism for attaching warnings to particular modules or other design elements.
Vl-load-descriptions
Extend vl-load-description to try to load a list of descriptions.
Vl-load-files
Load a list of files.
Vl-load-summary
Print summary information (e.g., warnings, numbers of modules loaded, etc.) after modules have been loaded.
Vl-collect-modules-from-descriptions
Vl-descriptionlist
A list of vl-description-p objects.