CIRCT  19.0.0git
Public Types | Public Attributes | List of all members
circt::ImportVerilogOptions Struct Reference

Options that control how Verilog input files are parsed and processed. More...

#include <ImportVerilog.h>

Collaboration diagram for circt::ImportVerilogOptions:
Collaboration graph
[legend]

Public Types

enum class  Mode { OnlyLint , OnlyParse , Full }
 Limit importing to linting or parsing only. More...
 

Public Attributes

Mode mode = Mode::Full
 
std::vector< std::string > includeDirs
 A list of include directories in which to search for files. More...
 
std::vector< std::string > includeSystemDirs
 A list of system include directories in which to search for files. More...
 
std::vector< std::string > libDirs
 A list of library directories in which to search for missing modules. More...
 
std::vector< std::string > libExts
 A list of extensions that will be used to search for library files. More...
 
std::vector< std::string > excludeExts
 A list of extensions that will be used to exclude files. More...
 
std::vector< std::string > ignoreDirectives
 A list of preprocessor directives to be ignored. More...
 
std::optional< uint32_t > maxIncludeDepth
 The maximum depth of included files before an error is issued. More...
 
std::vector< std::string > defines
 A list of macros that should be defined in each compilation unit. More...
 
std::vector< std::string > undefines
 A list of macros that should be undefined in each compilation unit. More...
 
std::optional< bool > librariesInheritMacros
 If true, library files will inherit macro definitions from primary source files. More...
 
std::optional< std::string > timeScale
 A string that indicates the default time scale to use for any design elements that don't specify one explicitly. More...
 
std::optional< bool > allowUseBeforeDeclare
 If true, allow various to be referenced before they are declared. More...
 
std::optional< bool > ignoreUnknownModules
 If true, ignore errors about unknown modules. More...
 
std::vector< std::string > topModules
 If non-empty, specifies the list of modules that should serve as the top modules in the design. More...
 
std::vector< std::string > paramOverrides
 A list of top-level module parameters to override, of the form <name>=<value>. More...
 
std::optional< uint32_t > errorLimit
 The maximum number of errors to print before giving up. More...
 
std::vector< std::string > warningOptions
 A list of warning options that will be passed to the DiagnosticEngine. More...
 
std::vector< std::string > suppressWarningsPaths
 A list of paths in which to suppress warnings. More...
 
std::optional< bool > singleUnit
 If set to true, all source files will be treated as part of a single compilation unit, meaning all of their text will be merged together. More...
 
std::vector< std::string > libraryFiles
 A list of library files to include in the compilation. More...
 

Detailed Description

Options that control how Verilog input files are parsed and processed.

See slang::driver::Driver::Options for inspiration. Also check out Driver::addStandardArgs() for some inspiration on how to expose these on the command line.

Definition at line 36 of file ImportVerilog.h.

Member Enumeration Documentation

◆ Mode

Limit importing to linting or parsing only.

Enumerator
OnlyLint 

Only lint the input, without elaboration and lowering to CIRCT IR.

OnlyParse 

Only parse and elaborate the input, without mapping to CIRCT IR.

Full 

Perform a full import and mapping to CIRCT IR.

Definition at line 38 of file ImportVerilog.h.

Member Data Documentation

◆ allowUseBeforeDeclare

std::optional<bool> circt::ImportVerilogOptions::allowUseBeforeDeclare

If true, allow various to be referenced before they are declared.

Definition at line 96 of file ImportVerilog.h.

◆ defines

std::vector<std::string> circt::ImportVerilogOptions::defines

A list of macros that should be defined in each compilation unit.

Definition at line 78 of file ImportVerilog.h.

◆ errorLimit

std::optional<uint32_t> circt::ImportVerilogOptions::errorLimit

The maximum number of errors to print before giving up.

Definition at line 115 of file ImportVerilog.h.

◆ excludeExts

std::vector<std::string> circt::ImportVerilogOptions::excludeExts

A list of extensions that will be used to exclude files.

Definition at line 65 of file ImportVerilog.h.

◆ ignoreDirectives

std::vector<std::string> circt::ImportVerilogOptions::ignoreDirectives

A list of preprocessor directives to be ignored.

Definition at line 68 of file ImportVerilog.h.

◆ ignoreUnknownModules

std::optional<bool> circt::ImportVerilogOptions::ignoreUnknownModules

If true, ignore errors about unknown modules.

Definition at line 99 of file ImportVerilog.h.

◆ includeDirs

std::vector<std::string> circt::ImportVerilogOptions::includeDirs

A list of include directories in which to search for files.

Definition at line 53 of file ImportVerilog.h.

◆ includeSystemDirs

std::vector<std::string> circt::ImportVerilogOptions::includeSystemDirs

A list of system include directories in which to search for files.

Definition at line 56 of file ImportVerilog.h.

◆ libDirs

std::vector<std::string> circt::ImportVerilogOptions::libDirs

A list of library directories in which to search for missing modules.

Definition at line 59 of file ImportVerilog.h.

◆ libExts

std::vector<std::string> circt::ImportVerilogOptions::libExts

A list of extensions that will be used to search for library files.

Definition at line 62 of file ImportVerilog.h.

◆ librariesInheritMacros

std::optional<bool> circt::ImportVerilogOptions::librariesInheritMacros

If true, library files will inherit macro definitions from primary source files.

Definition at line 85 of file ImportVerilog.h.

◆ libraryFiles

std::vector<std::string> circt::ImportVerilogOptions::libraryFiles

A list of library files to include in the compilation.

Definition at line 132 of file ImportVerilog.h.

◆ maxIncludeDepth

std::optional<uint32_t> circt::ImportVerilogOptions::maxIncludeDepth

The maximum depth of included files before an error is issued.

Definition at line 75 of file ImportVerilog.h.

◆ mode

Mode circt::ImportVerilogOptions::mode = Mode::Full

Definition at line 46 of file ImportVerilog.h.

◆ paramOverrides

std::vector<std::string> circt::ImportVerilogOptions::paramOverrides

A list of top-level module parameters to override, of the form <name>=<value>.

Definition at line 108 of file ImportVerilog.h.

◆ singleUnit

std::optional<bool> circt::ImportVerilogOptions::singleUnit

If set to true, all source files will be treated as part of a single compilation unit, meaning all of their text will be merged together.

Definition at line 129 of file ImportVerilog.h.

◆ suppressWarningsPaths

std::vector<std::string> circt::ImportVerilogOptions::suppressWarningsPaths

A list of paths in which to suppress warnings.

Definition at line 121 of file ImportVerilog.h.

◆ timeScale

std::optional<std::string> circt::ImportVerilogOptions::timeScale

A string that indicates the default time scale to use for any design elements that don't specify one explicitly.

Definition at line 93 of file ImportVerilog.h.

◆ topModules

std::vector<std::string> circt::ImportVerilogOptions::topModules

If non-empty, specifies the list of modules that should serve as the top modules in the design.

If empty, this will be automatically determined based on which modules are unreferenced elsewhere.

Definition at line 104 of file ImportVerilog.h.

◆ undefines

std::vector<std::string> circt::ImportVerilogOptions::undefines

A list of macros that should be undefined in each compilation unit.

Definition at line 81 of file ImportVerilog.h.

◆ warningOptions

std::vector<std::string> circt::ImportVerilogOptions::warningOptions

A list of warning options that will be passed to the DiagnosticEngine.

Definition at line 118 of file ImportVerilog.h.


The documentation for this struct was generated from the following file: