DVT IDE for VS Code SystemVerilog User Guide
Rev. 23.2.28, 28 November 2023

19.2 Indentation

  • Optional Begin - Controls the placement of optional `begin`:

    • Leave as is

    • On a new line - begin is moved on a new line

    • On the same line - begin is moved on the same line with it's construct

    • On a new line and indent - begin is moved on a new line and indented

Initial code Leave as is On a new line On the same line On a new line and indent
  • Else - Controls the placement of `else`:

    • Leave as is

    • On a new line - else is moved on a new line

    • On the same line - if end precedes it else is moved on the same line with end

Initial code Leave as is On a new line On the same line
  • Parameters - Controls the placement of module ports and parameters, function and task arguments, class parameters:

    • Leave as is

    • One per line (open parenthesis on the same line) - each parameter/argument is placed on it's own line and the open parentheses is placed on the same line with the parameter/argument receiver

    • One per line (open parenthesis on the next line) - each parameter/argument is placed on it's own line and the open parentheses is placed on the next line after the parameter/argument receiver

    • More per line - more are placed on the same line, as fit when line wrapping is enabled

Initial code Leave as is One per line (open parenthesis on the same line) One per line (open parenthesis on the next line) More per line
  • Preprocessing - Controls the indentation of preprocessing blocks:

    • Leave as is

    • Indent - indent the preprocessing block according to the enclosing scope without increasing the enclosed code indentation

    • Indent and increase indentation level - indent the preprocessing block according to the enclosing scope and increase the enclosed code indentation

    • Indent and increase indentation level - except first - indent the preprocessing block according to the enclosing scope and increase the enclosed code indentation with the exception of the first nested preprocessing block

    • Move at first column - reset the preprocessing block indentation

Initial code Leave as is Indent Indent and increase indentation level Indent and increase indentation level - except first Move at first column
  • Do Not Indent Single Line Comments At Beginning Of Line - Controls whether to indent single line comments starting at the beginning of a line.

Before After
  • Indent Multi Line Comments - Controls whether to indent multi-line comments.

Before After
  • Indent Multi-line Assigns - Controls whether to indent multi-line assigns.

Before After
  • Add New Line After Begin And Before End - Controls whether to add a new line after `begin` and before `end`.

Before After
  • Add New Line After End - Controls whether to add a new line after `end`.

Before After
  • Ignore Lines Starting With - List of line prefixes matching lines that will be ignored while indenting.

Before After
  • No Indent Keywords - Selection of language keywords that will not increase indentation.

Before After ("assert" keyword)
  • Implicit Semi Macros - List of macros encapsulating *semicolon* or *end* delimiters.

Before After
  • Open Scope Macros - List of macros that open a scope and increase the indentation of subsequent code.

Before After
  • Close Scope Macros - List of macros that close a scope and decrease the indentation of subsequent code.

Before After