DVT SystemVerilog IDE User Guide
Rev. 24.1.5, 13 March 2024

40.13 Syntax Coloring

Source code is colored in the DVT editor. Some language constructs are colored based on a syntactical analysis of the code, while others require a more elaborate semantic analysis, as detailed in the table below. Semantic coloring is only performed when the source code is compiled.

Category Requires compilation Details
ArgumentsyFunction and task arguments
Comment Hyperlinks  
Comment PragmasyCompilation is required for Custom Pragmas
Comments  
Compiler Directives  
ConstantsyConst fields, enum members, value parameters
Constraintsy 
Default Any word which does not belong to other categories
End Labelsy 
Escaped Identifiers  
Eventsy 
FieldsyClass variables, struct fields, module and interface signals
Functions, Tasksy 
Javadoc Tags  
Keywords  
LabelsyNamed blocks, generate blocks, assert names
Local VariablesyVariables declared in methods and named blocks
Macros  
Numbers  
Object ArgumentsyFunction and task arguments of class type
Object FieldsyClass variables, struct fields, module and interface signals of class type
Object Local VariablesyVariables of class type declared in methods and named blocks
OVM, UVM, VMM, AVM Macros  
Parameterized types  
Ports - Input, Inout, Refy 
Ports - Outputy 
Static Functions, Tasksy 
Static Object VariablesyStatic variables of class type
Static Variablesy 
Strings  
System Tasks  
Task Tags  
Template Identifiers  
TypesyClasses, interfaces, modules, coverpoints, covergroups, modports, packages, type parameters, typedefs
UVM Static Object VariablesyStatic variables of UVM class type
UVM Object ArgumentsyFunction and task arguments of UVM class type
UVM Object FieldsyClass variables, struct fields, module and interface signals of UVM class type
UVM Object Local VariablesyVariables of UVM class type declared in methods and named blocks

You can change the coloring style for each of the categories defined in the table above. Go to Window > Preferences > DVT > SystemVerilog > Editor > Syntax Coloring, select the category you wish to modify from the list and set the color and font style.

A code sample in the Syntax Coloring preference page helps you preview the changes instantly. The default style is shown below:

Note: Inside macro definitions, macro calls and PSL vunits, only syntactic coloring is performed.