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.

../../_images/add_port_quick_fix.gif

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.

../../_images/add_signal_to_sensitivity_list.gif

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.

../../_images/create_file_from_build_config.gif

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.

../../_images/declare_variable.gif

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.

../../_images/did_you_mean.gif

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.

../../_images/fully_qualify_type.gif

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.

../../_images/import_type.gif

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.

../../_images/remove_signal_from_sensitivity_list.gif

Remove Signal Never Use

Signals never used are flagged with warnings.

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

../../_images/remove_signal_never_used.gif

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.

../../_images/compilation_waivers.gif

Add Case Choice

A warning is triggered when a case statement is missing a case alternative.

To fix it, select Add case choice … from the list of proposals.

The missing case alternative is added at the end of the case construct.

../../_images/add_case_choice.gif

Add Generic to Entity

An error is triggered when assigning a value to a generic that is not defined in an entity.

To fix it, select Add generic … from the list of proposals and the Refactor Add Generic Quick Pick is opened.

../../_images/add_generic_to_entity.gif

Declare Enum Value

An error is triggered when accessing an enumerated type value which does not exist.

To fix it, select Declare enum type value … from the list of proposals.

The new value is inserted in the type declaration.

../../_images/declare_enum_val.gif

Replace Deprecated Package

A warning is triggered when importing a deprecated package (for example, the ‘eee.std_logic_arith’ package).

To fix it, select Replace deprecated package … with … from the list of proposals.

The non standard package will be replaced with the indicated equivalent.

../../_images/replace_deprecated_package.gif

Remove Library Clause

A warning is triggered when importing a library with implicit access (for example, the ‘work’ library). DVT provides a quick way to fix it.

To fix it, select Remove clause library … from the list of proposals.

The unnecessary library clause is removed.

../../_images/remove_library_clause.gif

Update Entity Instance

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

To fix them, select Update instance to match entity 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.

../../_images/update_entity_instance.gif

Note

The quick fix only works for named port connections.