Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Lint

[lint] section specifies the configuration for linter like below:

[lint.naming]
case_enum = "snake"

Available configurations

The [lint.naming] section

This section contains configurations of naming conventions.

ConfigurationValueDescription
case_enumcase type1case style of enum
case_functioncase type1case style of function
case_function_inoutcase type1case style of inout argument
case_function_inputcase type1case style of input argument
case_function_outputcase type1case style of output argument
case_instancecase type1case style of instance
case_interfacecase type1case style of interface
case_modportcase type1case style of modport
case_modulecase type1case style of module
case_packagecase type1case style of package
case_parametercase type1case style of parameter
case_port_inoutcase type1case style of inout port
case_port_inputcase type1case style of input port
case_port_modportcase type1case style of modport port
case_port_outputcase type1case style of output port
case_regcase type1case style of register type variable2
case_structcase type1case style of struct
case_unioncase type1case style of union
case_varcase type1case style of variable
case_wirecase type1case style of wire type variable3
prefix_enumstringprefix of enum
prefix_functionstringprefix of function
prefix_function_inoutstringprefix of inout argument
prefix_function_inputstringprefix of input argument
prefix_function_outputstringprefix of output argument
prefix_instancestringprefix of instance
prefix_interfacestringprefix of interface
prefix_modportstringprefix of modport
prefix_modulestringprefix of module
prefix_packagestringprefix of package
prefix_parameterstringprefix of parameter
prefix_port_inoutstringprefix of inout port
prefix_port_inputstringprefix of input port
prefix_port_modportstringprefix of modport port
prefix_port_outputstringprefix of output port
prefix_regstringprefix of register type variable2
prefix_structstringprefix of struct
prefix_unionstringprefix of union
prefix_varstringprefix of variable
prefix_wirestringprefix of wire type variable3
suffix_enumstringsuffix of enum
suffix_functionstringsuffix of function
suffix_function_inoutstringsuffix of inout argument
suffix_function_inputstringsuffix of input argument
suffix_function_outputstringsuffix of output argument
suffix_instancestringsuffix of instance
suffix_interfacestringsuffix of interface
suffix_modportstringsuffix of modport
suffix_modulestringsuffix of module
suffix_packagestringsuffix of package
suffix_parameterstringsuffix of parameter
suffix_port_inoutstringsuffix of inout port
suffix_port_inputstringsuffix of input port
suffix_port_modportstringsuffix of modport port
suffix_port_outputstringsuffix of output port
suffix_regstringsuffix of register type variable2
suffix_structstringsuffix of struct
suffix_unionstringsuffix of union
suffix_varstringsuffix of variable
suffix_wirestringsuffix of wire type variable3
re_forbidden_enumregex4regex forbidden of enum
re_forbidden_functionregex4regex forbidden of function
re_forbidden_function_inoutregex4regex forbidden of inout argument
re_forbidden_function_inputregex4regex forbidden of input argument
re_forbidden_function_outputregex4regex forbidden of output argument
re_forbidden_instanceregex4regex forbidden of instance
re_forbidden_interfaceregex4regex forbidden of interface
re_forbidden_modportregex4regex forbidden of modport
re_forbidden_moduleregex4regex forbidden of module
re_forbidden_packageregex4regex forbidden of package
re_forbidden_parameterregex4regex forbidden of parameter
re_forbidden_port_inoutregex4regex forbidden of inout port
re_forbidden_port_inputregex4regex forbidden of input port
re_forbidden_port_modportregex4regex forbidden of modport port
re_forbidden_port_outputregex4regex forbidden of output port
re_forbidden_regregex4regex forbidden of register type variable2
re_forbidden_structregex4regex forbidden of struct
re_forbidden_unionregex4regex forbidden of union
re_forbidden_varregex4regex forbidden of variable
re_forbidden_wireregex4regex forbidden of wire type variable3
re_required_enumregex4regex required of enum
re_required_functionregex4regex required of function
re_required_function_inoutregex4regex required of inout argument
re_required_function_inputregex4regex required of input argument
re_required_function_outputregex4regex required of output argument
re_required_instanceregex4regex required of instance
re_required_interfaceregex4regex required of interface
re_required_modportregex4regex required of modport
re_required_moduleregex4regex required of module
re_required_packageregex4regex required of package
re_required_parameterregex4regex required of parameter
re_required_port_inoutregex4regex required of inout port
re_required_port_inputregex4regex required of input port
re_required_port_modportregex4regex required of modport port
re_required_port_outputregex4regex required of output port
re_required_regregex4regex required of register type variable2
re_required_structregex4regex required of struct
re_required_unionregex4regex required of union
re_required_varregex4regex required of variable
re_required_wireregex4regex required of wire type variable3

The [lint.portability] section

This section decides which non-portable constructs are accepted from dependencies.

ConfigurationValueDescription
allow_in_dependenciesarray of item5non-portable constructs accepted from dependencies

#[allow(initial_assign)] and #[allow(multiple_assign)] opt in to a construct which is not portable, that is, whether it works depends on the target device and the toolchain. In your own code the attribute is always honored. In the code of a dependency it is rejected unless it is listed here, so that a project can’t absorb a library which relies on a construct its own target does not support without noticing. The default is to accept nothing.

[lint.portability]
allow_in_dependencies = ["initial_assign"]
  • "initial_assign" – assignment in an initial block
  • "multiple_assign" – assignment from more than one process
  • "snake" – snake_case
  • "screaming_snake" – SCREAMING_SNAKE_CASE
  • "lower_camel" – lowerCamelCase
  • "upper_camel" – UpperCamelCase

  1. The available values are ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20

  2. Register type means that the variable is assigned in always_ff. It will be mapped to flip-flop in synthesis phase. ↩2 ↩3 ↩4 ↩5

  3. Wire type means that the variable is assigned in always_comb. It will be mapped to wire in synthesis phase. ↩2 ↩3 ↩4 ↩5

  4. Regular expression string like ".*". The available syntax is here. ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20 ↩21 ↩22 ↩23 ↩24 ↩25 ↩26 ↩27 ↩28 ↩29 ↩30 ↩31 ↩32 ↩33 ↩34 ↩35 ↩36 ↩37 ↩38 ↩39 ↩40

  5. The available values are