DVT IDE for VS Code SystemVerilog User Guide
Rev. 24.1.8, 24 April 2024

Chapter 6. Quick Fix Proposals

Quick Fix Proposals are available for problems indicated with a light-bulb on the left side of the editing area.

To display the list of proposals, place the cursor inside the problem highlight range (squiggle underline) and select the "Quick Fix..." command, click on the light-bulb or trigger the context menu of an entry from the Problems View.


Add Port

An error is triggered when connecting a non-existing port in a module instantiation or an entity.

To fix it, select "Add port ..." from the list of proposals and the Refactor Add Port Quick Pick is opened.


Add Signal to Sensitivity List

When the sensitivity list of an always block is incomplete, warnings are triggered for all missing signals.

To fix it, select "Add signal ... to sensitivity list" from the list of proposals.


Create File From Build Configuration Editor

A build configuration error is triggered when a non-existing file is specified for compilation or included as an argument file (for example using -f).

To fix it, select "Create file ... in ..." from the list of proposals. The file is created in the chosen location and opened in a new editor.


Declare Variable

An error is triggered when using an identifier that does not exist, for example, a variable that you did not declare yet.

To fix it, select "Declare variable ..." from the list of proposals. Depending on context, several quick fix proposals might be available:

  1. declare variable

  2. declare argument (if inside a method)

  3. declare field (if inside a class)

  4. declare signal (if inside a module)

The type of the new variable declaration is automatically detected from context and the variable declaration is placed in such a way that it is visible for all usages.


Did You Mean

Typos represent a common source of compilation errors.

To fix such an error, select "Did you mean ..." from the list of proposals. The list may contain up to 3 relevant proposals, available only for unknown identifiers at least 3 characters long.

The undeclared identifier is replaced by a proposal of your choice.


Fully Qualify Type

An error is triggered when accessing a type that is not visible in the current scope, for example, a class defined inside some other package.

To fix it, select "Fully qualify ..." from the list of proposals.


Import Type

An error is triggered when accessing a type declared in a package that was not imported in the current scope.

To fix it, select the "Import ..." from the list of proposals. When the missing type name is provided by multiple packages, all possible imports are proposed.

An "import::*" statement is added at the beginning of the enclosing package (or module, program, etc.). If there are multiple nested modules where the import statement could be inserted, all possible insertion points are proposed.


Remove Signal from Sensitivity List

Unnecessary signals in an always block's sensitivity list are flagged with warnings.

To fix it, select "Remove signal ... from sensitivity list" from the list of proposals.


Remove Signal Never Use

Signals never used are flagged with warnings.

To fix it, select "Remove signal never used ..." from the list of proposals.


Waive Compilation Problems

DVT provides a quick and easy way to waive compilation problems from the editor.

Select "Waive ..." from the list of proposals.

You can change the default waiver severity, description, path, and message in the dialog view. When done, the new waiver is automatically added to the .dvt/waivers.xml file and applied.


Add Parameter to Module

An error is triggered when assigning a value to a non-existing module parameter.

To fix it, select "Add parameter ..." from the list of proposals and the Refactor Add Parameter Quick Pick is opened.


Add Virtual Qualifier to Interface Type

When declaring a method argument of interface type without using the virtual qualifier, DVT raises an error.

To fix it, select "Add 'virtual' qualifier" from the list of proposals.

The 'virtual' qualifier is automatically added to the argument declaration.


Create Class In New File

An error is triggered when trying to extend a non existing class.

To fix it, select "Create class '...' in new file" from the list of proposals.

The class is created in the current directory and the new file opens. If the extended class is parameterizable, the definition is computed accordingly with its value or type parameter.

Also, an include statement is added inside the scope of the child class.


Create Included File

An error is triggered when including a file that does not exist.

To fix it, select "Create file ... in ..." from the list of proposals.

The file is created in the chosen location and opened in a new editor.


Create Interface Class In New File

An error is triggered when trying to implement a non existing interface class.

To fix it, select "Create interface class '...' in new file" from the list of proposals.

The interface class is created in the current directory and the new file opens. If the implemented interface class is parameterizable, the definition is computed accordingly with its value or type parameters.

Also, an include statement is added inside the scope of the child class.


Declare Method

An error is triggered when calling a method that does not exist.

To fix it, select "Declare function ..." or "Declare task ..." from the list of proposals.

The method signature (return type, argument names, and types) is automatically detected from context and the method stub declaration is inserted in the appropriate scope.


Implement Extern Method

A warning is triggered for extern methods which are not implemented.

To fix it, select "Implement extern function ..." or "Implement extern task ..." from the list of proposals.

The extern task or function implementation is inserted outside the class scope.


Implement Missing Pure Virtual Methods

An error is triggered when a non-virtual class does not implement all the inherited pure virtual methods.

To fix it, select "Implement Missing Pure Virtual Methods" from the list of proposals.

All missing implementations are created.


Remove 'local' or 'protected' Qualifier

An error is triggered when accessing hidden API, for example, local fields of a super class, or protected functions of another object.

To fix it, select "Remove 'local' qualifier" or "Remove 'protected' qualifier" from the list of proposals.

The declaration of the field is revealed in the editor and the local qualifier is removed.


Update Extern Prototype/Implementation

An error is triggered when the implementation of an extern method doesn't match its prototype.

To fix it, select "Update implementation to match extern prototype" or "Update extern prototype to match implementation" from the list of proposals.

The method signature (return type, argument names, and types) is updated accordingly to match the prototype.


Update Module Instance

Problems are reported when a module instance does not match the module definition (has missing or extra port connections).

To fix it, select "Update instance to match module definition" from the list of proposals.

The extra ports are removed and all the missing ports are added at the end of the instance port list. This quick fix only works for named port connections.


Update Virtual Method Signature

An error is triggered when the signature of a method override differs from the signature of the overridden virtual method.

To fix it, select "Update ... signature to match ... definition" from the list of proposals.

The method signature (return type, argument names, types, directions, and default values) is updated accordingly to match the parent class definition.


Explicitly Declare

A warning is triggered when the net declaration is implicit.

To fix it, select "Explicitly declare ..." from the list of proposals.. The type of the new net declaration is automatically detected from context.