Verissimo SystemVerilog Testbench Linter User Guide
Rev. 18.1.29, 13 September 2018

4.3.2 vcs.vlogan Compatibility Mode

The +dvt_init+vcs.vlogan directive resets the builder to the vcs.vlogan default state.

File Extension to Language Syntax Mapping

Syntax Extensions
C/C++.c, .cpp, .cc, .cxx
Shared objects (C/C++ libraries).so, .a, .o

Language Syntax for Unmapped Extensions: Verilog 1995

Language Syntax for Included Files: Included files are parsed using the syntax that was used for parsing the including file.

Mode Specific Directives

Directive Description
+verilog1995ext+<ext>All files with <ext> extension are parsed using the Verilog 1995 syntax.
+verilog2001ext+<ext>All files with <ext> extension are parsed using the Verilog 2001 syntax.
+systemverilogext+<ext>All files with <ext> extension are parsed using the SystemVerilog syntax.
-sverilogSets the syntax for unmapped extensions to SystemVerilog. This directive has precedence over +v2k.
-upf <upf_file>Specify a Unified Power Format file to be analyzed.
+v2kSets the syntax for unmapped extensions to Verilog 2001.
-extincludeThe included files are parsed using the syntax as specified by directives, that is using by ext syntax (if explicit) or the syntax for unmapped extensions. It overrides the default behavior.
-ntb_opts [ uvm / uvm-1.0 / uvm-1.1 / uvm-1.2 ]Compiles or references the UVM library. See more details below.
-ntb_opts [ rvm / vmm ]If $VCS_HOME is defined, equivalent with:


+incdir+$VCS_HOME/etc/[ rvm / vmm ]


$VCS_HOME/etc/[ rvm / vmm ]/vmm.sv


If $VCS_HOME is not defined, equivalent with:


+incdir+$DVT_VMM_HOME/sv/


$DVT_VMM_HOME/sv/vmm.sv

The dot (.) for specifying <ext> is optional. For example +verilog1995ext+.svh and +verilog1995ext+svh are equivalent.

You can specify more extensions at once, for example +verilog1995ext+.svh+svp.

When several directives change the syntax of a specific <ext>, the last one wins.

ntb_opts [ uvm / uvm-1.0 / uvm-1.1 / uvm-1.2 ]

Typical use-case #1 - single vcs command

Command:

vcs -ntb_opts uvm top1.sv top2.sv [other compilation directives]

Build config:

// The UVM library is compiled from $VCS_UVM_HOME or $VCS_HOME/etc/uvm or $DVT_UVM_HOME
// (in this order of precedence, depending on which environment variables are defined).
+dvt_init+vcs.vlogan -ntb_opts uvm top_file1.sv top_file2.sv [other compilation directives]

Typical use-case #2 - multiple vlogan commands

Commands:

vlogan -ntb_opts uvm

vlogan -ntb_opts uvm top1.sv top2.sv [other compilation directives]

vlogan -ntb_opts uvm top3.sv top4.sv [other compilation directives]

Build config:

// The UVM library is compiled from $VCS_UVM_HOME or $VCS_HOME/etc/uvm or $DVT_UVM_HOME
// (in this order of precedence, depending on which environment variables are defined).
+dvt_init+vcs.vlogan -ntb_opts uvm

// The UVM library is not recompiled. It is "referenced" by adding the relevant incdirs.
+dvt_init+vcs.vlogan -ntb_opts uvm top1.sv top2.sv [other compilation directives]

// The UVM library is not recompiled. It is "referenced" by adding the relevant incdirs.
+dvt_init+vcs.vlogan -ntb_opts uvm top3.sv top4.sv [other compilation directives]

Note: In the invocations which "references" the UVM library (rows 7-10 in the table below) - ntb_opts uvm is equivalent with:

+incdir+<VCS>/wrap
+incdir+<UVM>/src

and any `include uvm_pkg.sv will solve to <VCS>/wrap/uvm_pkg.sv which contains the following code:

`ifndef WRAP_UVM_PKG_SV
`define WRAP_UVM_PKG_SV

`include "uvm_macros.svh"

import uvm_pkg::*;

`endif

Note: The second, third, ... ntb_opts uvm invocations without top files (rows 4-6 in the table below) will take into account the dvt_disable_uvm_reuse directive.

Details

The effect of this directive in a particular invocation depends on the following factors:

  • if it's the first invocation which specifies -ntb_opts uvm

  • if the invocation specifies source files to be compiled ( top files) in addition to the -ntb_opts uvm flag

  • if $VCS_UVM_HOME / $VCS_HOME environment variables are set

# First Top files $VCS_UVM_HOME $VCS_HOME Equivalent incdir(s) Equivalent top file
1 Y---Y---$VCS_UVM_HOME$VCS_UVM_HOME/uvm_pkg.sv
2 Y---NY$VCS_HOME/etc/uvm[ -version ]/src$VCS_HOME/etc/uvm[ -version ]/src/uvm_pkg.sv
3 Y---NN$DVT_UVM_HOME/src$DVT_UVM_HOME/src/uvm_pkg.sv
4 NNY---$VCS_UVM_HOME$VCS_UVM_HOME/uvm_pkg.sv
5 NNNY$VCS_HOME/etc/uvm[ -version ]/src$VCS_HOME/etc/uvm[ -version ]/src/uvm_pkg.sv
6 NNNN$DVT_UVM_HOME/src$DVT_UVM_HOME/src/uvm_pkg.sv
7 NYYY$VCS_HOME/etc/uvm/vcs/wrap


$VCS_UVM_HOME
 
8 NYYN$DVT_HOME/predefined_projects/libs/uvm/vcs/wrap


$VCS_UVM_HOME
 
9 NYNY$VCS_HOME/etc/uvm/vcs/wrap


$VCS_HOME/etc/uvm[ -version ]/src
 
10 NYNN$DVT_HOME/predefined_projects/libs/uvm/vcs/wrap


$DVT_UVM_HOME/src
 

Predefined API

VCSDefined as preprocessing macro without value.