VCS QuickStart
VCS QuickStart
March 2017
Copyright Notice and Proprietary Information
2017 Synopsys, Inc. All rights reserved. This Synopsys software and all associated documentation are proprietary to Synopsys, Inc. and may
only be used pursuant to the terms and conditions of a written license agreement with Synopsys, Inc. All other use, reproduction, modification, or
distribution of the Synopsys software or the associated documentation is strictly prohibited.
Synopsys, Inc.
690 E. Middlefield Road
Mountain View, CA 94043
www.synopsys.com
ii
Contents
1. Overview
About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Example Used in This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Accessing VCS Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Options for Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
Feedback
iii
Interactive Simulation Debug Using Verdi . . . . . . . . . . . . . . . . . . 4-5
Interactive Simulation Debug Using UCLI . . . . . . . . . . . . . . . 4-9
Post-Processing Debug. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Dumping FSDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Post-Processing Debug Using Verdi . . . . . . . . . . . . . . . . . . . 4-11
Viewing Schematics and Waveforms . . . . . . . . . . . . . . . . . . . . . 4-12
Executing the Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-15
Appendix C. Makefile
Feedback
iv
1
Overview 1
VCS® functional verification solution is the primary verification
solution used by most of the world’s top 20 semiconductor
companies. VCS provides the industry’s highest performance
simulation and constraint solver engines. In addition, the
comprehensive VCS solution offers broad SystemVerilog support,
verification planning, coverage analysis and closure, and native
integration with Verdi® Automated Debug Platform, the industry’s
de-facto debug standard. VCS is uniquely positioned to meet
designers’ and verification engineers’ needs to address the
challenges and complexity of today’s SoCs.
Feedback Overview
1-1
About This Guide
It is assumed that the readers are familiar with HDL languages, such
as Verilog, SystemVerilog, VHDL, and so on.
Overview Feedback
1-2
2. Click the Documentation tab and click VCS.
3. Click Example Used in the QuickStart Guide. This allows you
to download the MinSoc.tar.gz file. Save the file to our working
directory and untar the file.
Feedback Overview
1-3
• % verdi -h | -help - Lists descriptions of the most commonly
used Verdi options.
• % verdi -id - Returns information, such as Verdi version and
build date, your work station name, platform, and host ID.
Overview Feedback
1-4
2
Setting Up the Environment 1
Before running Synopsys® tools, the Synopsys Common Licensing
(SCL) software must be installed and configured, the license key file
retrieved, and the license file environment variable defined.
For detailed information about SCL installation and setup, see the
Synopsys Common Licensing Administration Guide on SolvNet®
online support site.
For the list of supported platforms for VCS and Verdi, see VCS
Release Notes and Verdi Release Notes respectively.
• VCS
- Set the VCS_HOME environment variable to the path where VCS
is installed:
% setenv VCS_HOME <VCS_installation_path>
• Verdi
- Set the VERDI_HOME environment variable to point to the
installation directory:
% setenv VERDI_HOME <Verdi_installation_path>
Note:
Apart from the three-step flow described in this document, if your
design consists of only Verilog/SystemVerilog code, you can use
the two-step flow (vcs and simv commands) for compiling and
simulating the design. For more information about the two-step
flow, see the VCS User Guide.
The commands that you can use for simulating a design are
described in the following topics:
During the analysis phase, you can analyze your VHDL, Verilog,
and SystemVerilog files using the vlogan and vhdlan utility.
Where,
Where,
Where,
Note:
Install only the 32 bit version of the VCS/Verdi as the pre-compiled
.so file in MinSoc is compiled with 32 bit and not 64 bit.
% make SOC_Verification
Verdi debug tool enables comprehensive debug for all design and
verification flows. It includes powerful technology that helps you to
comprehend complex and unfamiliar design behavior, and automate
difficult and tedious debug processes.
You can debug your simulation using Verdi in the following modes:
You can view the following panes in the interactive simulation debug
mode:
Use the Watch tab to view the current values of variables in the
current simulation scope. Both the values and current scopes are
updated as simulation time changes.
You can annotate the values to the variables on the Source Code
frame using the Source > Active Annotation command. The values
of the variables are displayed in the Source Code frame.
You can set breakpoints to stop the simulation. Set the breakpoints
by single-clicking or double-clicking the line number in the Source
Code frame. Breakpoints execute each time a specified line is
reached during simulation. A green flag indicates that a
breakpoint is set. Use Simulation > Manage Breakpoints
command to open the Manage Breakpoints dialog box. This dialog
box allows you to edit the breakpoints with more options.
The following command starts the simulation from the UCLI prompt:
Post-Processing Debug
Dumping FSDB
The above UCLI dump commands allow you to dump signal value
changes of the specified instance and depth.
4. Load the design and the FSDB dump file into the Verdi platform.
% verdi -nologo -ssf <file_name.fsdb> &
Click the New Schematic icon on the toolbar in the main window
(or choose the Tools -> New Schematic from Source -> New
Schematic command), to view the nSchema frame. The frame can
be undocked to be a standalone nSchema window. A sample
nSchema window is as follows:
You can open a new nWave frame from the main window by clicking
the New Waveform icon or choosing the Tools -> New
Waveform command. An nWave frame can be released from the
main window to become a stand-alone window by clicking the
Undock toolbar icon. A sample nWave stand-alone window is as
follows:
% make SOC_Interactive_Debug
% make SOC_PP_Debug
References
• https://solvnet.synopsys.com/retrieve/2504385.html
• https://solvnet.synopsys.com/retrieve/2325579.html
• https://solvnet.synopsys.com/retrieve/2514161.html
• https://solvnet.synopsys.com/retrieve/2386178.html
• https://solvnet.synopsys.com/retrieve/2499762.html
• Code Coverage
Code coverage monitors control-flow coverage and value
coverage. Control-flow coverage includes line coverage and
branch coverage. Value coverage includes condition coverage,
toggle coverage, and FSM coverage.
Any complex design may have code or combinations that can never
happen or that designers do not care about, then these can be
excluded from coverage scores. Thus, you can focus on the
coverage results from the design that can happen. For more details
on this, see the “Exclusions” section.
To generate coverage and view reports, use the design example. For
more details, see the “Executing the Example”section.
Where,
Exclusions
To increase coverage by taking out exclusions that are not needed
for a design, Verdi coverage provides the Exclusion Manager
feature. When the design has a lot of code or combinations that
never occur or there are parts of the design that a designer does not
care about, then the exclusion features are used to exclude the
above coverage targets from the coverage score. Thus, you can
focus on the coverage results from the design that can happen.
% make SOC_Coverage
The profiler provides both time and memory view. It can generate
reports in HTML hyperlinked to the source code for high efficiency
root cause analysis of memory leaks and coding missteps. The
profiler can also generate text reports for integration into custom
applications or reports. The reports are written by the profrpt
profile report generator.
Feedback
A-1
For details on Simulation Profiler, see the “The Unified Simulation
Profiler” chapter in the VCS User Guide.
To set up the simulation for unified simulation profiler, you can use
the three-step flow as illustrated in Figure A-1:
Feedback
A-2
There is no need to analyze your design again for profiler as there
are no profiler specific options for vhdlan and vlogan.
Feedback
A-3
- noreport tells VCS to collect profile information at simulation
time but not write the profileReport.html file or the
profileReport directory after simulation.
After setting up the simulation for unified simulation profiler, you can
run the profrpt profile report generator. For more details on this, see
Section “Running the profrpt Profile Report Generator”.
To set up the simulation for unified simulation profiler and run the
profrpt profile report generator, see Section “Executing the
Example”.
You run the profrpt profile report generator with the profrpt
command line. The syntax of this command line is as follows:
Where,
• simprofile_dir - Specifies the profile database directory
that VCS writes at simulation time. The default name is
simprofile_dir.
• -view view1[+view2[+...]] - Specifies the views you want
to see in the reports. The option is mandatory.
The profrpt output is the HTML or text files for all these views,
including machine memory stack traces.
You must enter the -view option on the profrpt command line.
Feedback
A-4
The views you can specify with the -view option depends on the
type of report that profrpt is writing, which depends on the
argument to the -simprofile simulation option.
Some of the arguments and the views that you can specify are
time_summary, and mem_summary.
For more information on all the arguments and sub-options, see the
“The Unified Simulation Profiler” chapter in the VCS User Guide.
% make SOC_Profile
You can run the profrpt profile report generator to generate profiler
reports in text and HTML formats.
Feedback
A-5
Feedback
A-6
B
Setting Up the Simulation to Find X-Related
Defects A
Verilog and VHDL RTL simulators ignore the uncertainty of X-valued
control signals and assign predictable output values because of the
semantic limitations. As a result, RTL simulations often fail to detect
design problems related to the lack of X-Propagation (Xprop).
However, these same design problems can be detected in gate-level
simulations, and often many gate-level simulations must be run only
to debug X-related issues.
Feedback
B-1
To set up the simulation for Xprop, you can use the three-step flow:
as illustrated in Figure B-1.
Feedback
B-2
2. Elaborating or Compiling the Design
For details on the Elaborating or Compiling the Design step, see
Section “Elaborating or Compiling the Design” .
To compile your design in the Xprop mode, use the -xprop option
with the vcs command. The -xprop option without an argument
enables Xprop in the entire design and specifies the merge mode
at simulation time. By default, VCS uses the tmerge merge mode
during simulation. However, you can specify a different merge
mode at either compile time or simulation time. The keyword
argument flowctrl is added for VHDL instrumentation.
You can use the following arguments for the -xprop option:
• <xprop_config_file>
• tmerge
• xmerge
• flowctrl
For details on these arguments, see “Using X-Propagation”
chapter in the VCS User Guide.
3. Simulating the Design
For details on the Simulating the Design step, see Section
“Simulating the Design” .
Use the following option to generate an Xprop instrumentation
report that displays the instrumentation status of every module
instance in a design:
-report=xprop[+exit]
Where,
Feedback
B-3
- xprop Generates an Xprop instrumentation report named as
xprop_config.report and the simulation continues.
- xprop+exit Generates an Xprop instrumentation report
named as xprop_config.report and the simulation is
terminated.
After simulating your design, you can view the log files. For more
details on this, see Section “Viewing X-Propagation Log Files” .
When you compile a design with Xprop enabled, VCS generates log
files xprop.log and xprop_vhdl.log for Verilog and VHDL
respectively. All the statements considered for Xprop
instrumentation (whether or not the statements are instrumented),
and the reasons for statements not being instrumented are recorded
in these log files.
Where,
Feedback
B-4
• YES|NO - Xprop instrumentation status of the statement.
• reason - The reason for the statement not being instrumented.
This is issued only when the Xprop instrumentation status is “NO”.
• primary_line - The line number of the statement containing
the actual construct not being instrumented. This is issued only
when the Xprop instrumentation status is "NO".
xprop.log example:
decode.v:3 YES
decode.v:18 YES
xprop_vhdl.log example:
Test.vhd:22 YES
Test.vhd:35 YES
The Xprop statistics are presented at the end of the xprop.log file.
The statistics consist of the number of assignment statements
considered for Xprop instrumentation, the number of statements
instrumented, and the ratio of those two numbers (instrumented/
instrumentable) which represents the percentage of the design
instrumented for Xprop.
Feedback
B-5
For example:
==================================================
X P R O P S T A T I S T I C S
instrumentable assignments: 7
instrumented assignments: 5
% make SOC_Xprop_RTL
UVM_ERROR /remote/us044/xyz/MinSoc_Example/design/tb/
uvm_tb/minsoc_scoreboard.sv(303) @ 4187560:
uvm_test_top.env.sb [uart_scoreboard] DCE_TX_DCE_RX_COMP :
Mismatch between dce_tx value is 56 and dce_rx value is 00
Feedback
B-6
This error is reported when running the simulation with Xprop
simulation semantics due to an uninitialized memory in the design/
ethmac/src/eth_spram_256x32.v file. However, if the same
setup is run using RTL semantics (without Xprop), this error would
be masked due to the optimistic behavior of RTL.
Feedback
B-7
Feedback
B-8
C
Makefile A
The Makefile that is packaged as part of the design example
includes the following VCS and Verdi command lines:
dirs := or1200 tap_top tc_top memory_model clock_manager ethmac adbg_top uart
top tb
clean:
\rm -rf simv* csrc* ${ROOT}/libs *.log ucli.key vhdlanLog verdiLog
novas.fsdb novas.rc novas.conf profileReport* simprofile_dir vdCovLog
vc_hdrs.h .vlogansetup.args inter.fsdb mkdir
Feedback
C-1
$(foreach i, $(dirs), mkdir -p ${ROOT}/libs/$i)
ana_core:
vlogan -l an_or1200.log -sverilog -kdb -work or1200 -f or1200.f
vhdlan -l an_tap_top.log -kdb -work tap_top -f tap_top.f
vlogan -l an_tc_top.log -sverilog -kdb -work tc_top -f minsoc_tc_top.f
vlogan -l an_memory_model.log -sverilog -kdb -work memory_model -f
minsoc_memory_model.f
vlogan -l an_adbg.log -sverilog -kdb -work adbg_top -f adbg_top.f
vlogan -l an_clock_manager.log -sverilog -kdb -work clock_manager -f
minsoc_clock_manager.f
vlogan -l an_ethmac.log -sverilog -kdb -work ethmac -f ethmac.f
vlogan -l an_intf.log -sverilog -kdb -work intf -f intf.f
vlogan -l an_uart.log -sverilog -kdb -work uart -f uart.f
+define+UART_HOST_IF
vlogan -l an_top.log -sverilog -kdb -work top -f minsoc_top.f
vlogan -l an_uvm.log -sverilog -kdb -work tb -ntb_opts uvm
vlogan -l an_tb.log -sverilog -kdb -work tb -ntb_opts uvm -f tb.f
ana: ana_core
ana_pp: ana_core
vlogan -l an_tb.log -sverilog -kdb -work tb -ntb_opts uvm -f tb.f
+define+DUMP
ana_xprop: ana_core
vlogan -l an_ethmac.log -sverilog -kdb -work ethmac -f ethmac.f
+define+MEM_INITIALIZE_FIX
comp:
vcs minsoc_tb_top test -ntb_opts uvm -kdb -lca
+warn=noLCA_FEATURES_ENABLED -l comp.log
comp_pp_debug:
comp_interactive_debug:
comp_cov:
Feedback
C-2
comp_prof:
comp_xprop:
sim:
./simv +file_name=${ROOT}/sim_files/eth.hex +firmware_size=12268
+UVM_VERBOSITY=UVM_HIGH +UVM_TESTNAME=eth_test -l simv_eth.log
sim_debug_interactive:
./simv -gui=verdi +file_name=${ROOT}/sim_files/eth.hex
+firmware_size=12268 +UVM_VERBOSITY=UVM_HIGH +UVM_TESTNAME=eth_test -l
simv_eth.log
sim_cov:
./simv +file_name=${ROOT}/sim_files/eth.hex +firmware_size=12268
+UVM_VERBOSITY=UVM_HIGH +UVM_TESTNAME=eth_test -l simv_eth.log -cm
line+cond+tgl+fsm+branch+assert +enable_coverage=1
sim_prof:
./simv +file_name=${ROOT}/sim_files/eth.hex +firmware_size=12268
+UVM_VERBOSITY=UVM_HIGH +UVM_TESTNAME=eth_test -l simv_eth.log
-simprofile noreport
debug:
verdi -nologo -ssf novas.fsdb &
report_cov:
verdi -cov -covdir simv.vdb
report_prof:
profrpt simprofile_dir -view time_summary+time_mod
Feedback
C-3
Feedback
C-4
D
Additional References A
In addition to the VCS functionalities introduced in this guide, VCS
also offers you the following functionalities that help improve
verification process:
Feedback
D-1
planning effort, improve progress tracking and metric quality.
The Verification Approach Specification defines the overall
approach to verifying the Design Under Test (DUT). It focuses on
the what DUT features need to be defined, the approach to
verification and the top-level metrics being used to validate
completeness. The accompanying Executable Verification Plan
breaks down these top-level metrics to the desired level of detail
to support an automated back annotation flow. The term
Verification Plan is used when referring to either one (or both) as
aspects of the complete system. For more information, see the
Verification Planner User Guide.
• SystemC Cosimulation - VCS SystemC cosimulation interface
enables VCS and SystemC modeling environment to work
together, when simulating a system described in Verilog, VHDL,
and SystemC languages. For more information about the
SystemC cosimulation interface, see the VCS SystemC User
Guide.
• Mixed-Signal Verification - The VCS and CustomSim
cosimulation feature provides mixed-signal, mixed-HDL
verification solution. This feature enables you to simulate a
design, which is described in SPICE, Verilog-HDL (Verilog), and
VHDL. For more information about mixed-signal verification, see
chapter “VCS and CustomSim Cosimulation” in the VCS User
Guide.
• Partition Compile - The VCS Partition Compile feature allows
you to achieve significantly faster turnaround time by allowing you
to recompile portions of the design that has changed and reuse
the libraries for the unchanged modules already compiled earlier.
For more information about partition compile, see chapter
“Partition Compile” in the VCS LCA User Guide.
• Precompiled IP - In verifying complex designs, the testbench
environment tends to become bulky, which means the simulator
Feedback
D-2
tool requires more time to compile and elaborate samples on the
design and test bench. Traditional tools like incremental compilers
can no longer meet the complex verification requirements. For
verification, the compilation time can be methodically controlled
using the VCS Precompiled IP (PIP) feature.
Precompiled IP involves the following:
Feedback
D-3
• Native Certitude - Certitude is a functional qualification tool. This
tool enhances simulation-based functional verification by
providing measures and feedback to assist in improving the
quality of the verification environment (VE).
To detect errors, the functional verification environment must
ensure that each error is activated, propagated, and then
detected.
Feedback
D-4
Index
A exclusions 5-6
assert 5-3
F
B fsm 5-3
FSM coverage 5-1
branch 5-3
C G
group coverage 5-3
-cm 5-3
-cm_dir 5-3
-cm_hier 5-4 H
cond 5-3 Hierarchy tab 5-6
-cov 5-5
-covdir 5-5
Coverage 5-1 L
coverage 5-2 line 5-3
coverage mode 5-5
covergroups 5-3
O
-o 5-3
D
Design Example 5-8
P
pragmas 5-4
E
Exclusion Manager 5-6
Feedback
IN-1
S U
simv 3-5 URG 5-4
Summary frame 5-6
V
T vcs B-3
tgl 5-3 Verdi 5-4, 5-5
three-step flow 5-2, A-2 Verdi Coverage 5-6
toggle coverage 5-1 vhdlan 3-3
vlogan 3-3
Feedback
IN-2