Debug Workshop

advertisement
Design Better
Debug Faster
Debug Workshop
Dramatically enhance your
debugging efficiency
2008
Based on Verdi2007.10
Design Better
Debug Faster
Target Audience & Goals
ƒ Target Audience
ƒ Architecture engineer
ƒ Development engineer
ƒ Verification engineer
ƒ Goals
ƒ To help you master Verdi for more efficient
debug way with 12 different design scenario
applications.
ƒ Prerequisites
ƒ Verdi Fundamental Training
ƒ Basic digital IC design knowledge.
ƒ Basic HDL/HVL coding skills: Verilog, VHDL,
SystemVerilog, SVA, etc.
Debug Workshop Agenda (1/5)
Design Better
Debug Faster
ƒ Design Import and Dumping
ƒ Resolve frequently met issues of design import
and dumping for mixed HDL designs in Verdi
ƒ Trace Signal with Wrong Value
ƒ Automatically find out the root cause if signal’s
value goes wrong after simulation
ƒ Debug Memory
ƒ Calculate memory content without dumping and
trace its written time
ƒ Trace Unknown Value
ƒ Automatically find out the root cause of a signal
with unknown value
Debug Workshop Agenda (2/5)
Design Better
Debug Faster
ƒ Reduce Simulation time and FSDB Size
ƒ Use System Tasks
ƒ Use Virtual FSDB
ƒ Use Essential Signal Dumping
ƒ Compare Simulation Waveforms
ƒ Find the difference between 2 FSDBs
ƒ Automatically find the root cause of a mismatch
ƒ Arrange and Simplify Massy Circuits
ƒ Editing the schematics for better readability
Debug Workshop Agenda (3/5)
Design Better
Debug Faster
ƒ Import Design Faster
ƒ Shorten the time to import huge design
ƒ Only import some sub-blocks but mapping to the
whole-chip simulation results
ƒ Analyze Multi-Clock-Domains in Design
ƒ Identify how many domains in your design
ƒ Check out data path between two domains
ƒ Analyze Clock Distribution in Design
ƒ Prepare CTS Constraints for APR
ƒ Qualify the synthesized clock trees
Debug Workshop Agenda (4/5)
Design Better
Debug Faster
ƒ Assertion-Based Verification by SVA
ƒ Start from the assertion failure on waveforms
and trace back to assertion codes or HDL sources
ƒ Check new or modified assertions without rerunning simulation
ƒ Debug SystemVerilog Design
ƒ Unify environment for debug and analysis of
different languages (i.e. Verilog, VHDL,
SystemVerilog, etc.)
ƒ Easily browse SystemVerilog code
Debug Workshop Agenda (5/5)
Design Better
Debug Faster
ƒ Debug Timing Problem after Post-Simulation
ƒ Debug the path of timing violation in STA report
efficiently
ƒ Automatically find out the root cause of wrong
transition caused by timing issue
ƒ Make the process of detecting, isolating, and
fixing problems much more efficient
Design Better
Debug Faster
Debug Workshop Agenda
ƒ Design Import and Dumping
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Design Import & Dumping
ƒ Common Problems (Design Import)
ƒ Verilog and VHDL are widely used due to the
reuse of legacy code and IP adoption.
ƒ Import & dump mixed-language design in
Verdi is sometimes confusing
ƒ Verdi Solution
ƒ Compile design into library
ƒ Import design from library
ƒ Correct setting for dumping
Design Better
Debug Faster
Design Compile
ƒ Mixed-language designs require the design
files pre-compiled into a library first.
ƒ > vericom –f verilog_filelist.f
ƒ > vhdlcom –f –smartorder vhdl_filelist.f
ƒ -smartorder will compile the VHDL files in an order
independent of node
ƒ In above case:
ƒ The Verilog and VHDL source code are both compiled into the
same library
ƒ Default library is “work”, with which the following directory is
created: work.lib++
Import Design
Design Better
Debug Faster
ƒ From command line
ƒ > verdi –lib work –top system
ƒ From GUI
ƒ File Æ Import Design Æ From Library
Design Better
Debug Faster
Multiple Libraries
ƒ In complex designs, it may be necessary
to compile different design source into
different libraries.
ƒ Compile Verilog Design Files into Multiple
Libraries
ƒ > vericom –lib ../myverilog/verilib1 –f verilib1.f
ƒ > vericom –lib ./verilib2 –f verilib2.f
ƒ Compile VHDL design files into multiple
libraries
ƒ >vhdlcom -lib ../myvhdl/foo –smartorder foo1.vhd
foo2.vhd ...
ƒ > vhdlcom -lib ./goo –smartorder goo1.vhd goo2.vhd
Design Better
Debug Faster
VHDL Multiple Libs Example
VHDL source code:
…
library ieee;
use ieee.std_logic_unsigned.all;
use ieee.
library foo;
use foo.all;
library goo;
use goo.all;
you need to add library mapping to the novas.rc
[Library]
ƒ others = <the physical location of another resource file>
ƒ logical_name = physical_location
To add the following in the novas.rc file, Library section:
ƒ [Library]
ƒ
ƒ
ƒ
ƒ
verilib1 = ../myverilog/verilib1.lib++
verilib2 = ./verilib2.lib++
foo = ../myvhdl/foo
goo = ./goo
Design Better
Debug Faster
Multi Libraries Importing
ƒ After compiling mixed HDL source code,
you can import and elaborate design as
below:
ƒ >verdi -lib ../myvhdl/foo -lib ./goo -top
system -Lf ../myverilog/verilib1 -L ./verilob2
ƒ You can alternatively invoke Verdi as
follows:
ƒ >verdi –nclib –top system –rcFile novas.rc
Design Better
Debug Faster
Mixed HDL Design Dumping:
PLI setting
ƒ FSDB dumper and supports signal dumping in
pure VHDL or mixed-HDL designs:
ƒ For Cadence Simulator
ƒ <NOVAS_INST_DIR>/share/PLI/ius?.?_vhpi/${PLATFORM}
ƒ For Synopsys Simulator
ƒ <NOVAS_INST_DIR>/share/PLI/snps_mixed /${PLATFORM}
ƒ For Mentor Graphics Simulator
ƒ <NOVAS_INST_DIR>/share/PLI/modelsim_fli??/${PLATFORM}
ƒ Select correct FSDB dumper for different version
of simulators, please refer to:
ƒ <NOVAS_INST_DIR>/share/PLI/README.PLI
Design Better
Debug Faster
Mixed HDL Design Dumping:
Compile novas.vhd
ƒ Compile the novas.vhd file into the
default design working library
ƒ > ncvhdl -message \
${NOVAS_INST_DIR}/share/PLI/ius??_vhpi/
${PLATFORM}/novas.vhd
The novas.vhd file contains the declarations of the
FSDB foreign functions in the pkg and novas packages.
Design Better
Debug Faster
Mixed HDL Design Dumping:
Call system tasks
ƒ Use the novas package in any VHDL files that contain
the design top-most region or call any FSDB foreign
function.
ƒ Use the novas package in the VHDL code
library IEEE;
use IEEE.std_logic_1164.all;
library work;
use work.novas.all;
ƒ include the FSDB foreign functions in the VHDL code
process
begin
fsdbDumpfile("test.fsdb");
fsdbDumpvars(0, ":");
wait ;
end process;
Design Better
Debug Faster
Mixed HDL Design Dumping:
Run simulation
ƒ To enable read access of the design objects
ƒ include the -linedebug option with ncvhdl, ncvlog,
ƒ specify the -access +r option with ncelab.
ƒ Example:
ƒ > ncvlog -message -linedebug test.v
ƒ > ncvhdl -message -linedebug test.vhd
ƒ > ncelab -message -access +r -VHDLEXPAND
WORK.TOP:BLK
Design Better
Debug Faster
Debug Workshop Agenda
ƒ Design Import and Dumping
ƒ Trace Signal with Wrong Value
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Trace Signal with Wrong Value
ƒ Common Problems
ƒ Must open multiple source files and correlate
signals in waveform to judge real driver
ƒ Easily get lost in a huge unfamiliar design
ƒ Verdi Solution
ƒ Use Active Trace with Active Annotation in
source code and waveform
ƒ Debug on Verdi’s Temporal Flow View by
Trace This Value
Design Better
Debug Faster
Trace Signal with Wrong Value
Active Trace(1/2)
ƒ Purpose:
ƒ Refer to simulation result to catch the real driver for
specific signal at a given time
ƒ Usage:
ƒ Import design with FSDB
ƒ Do Active Trace either by
ƒ Select interested signal and set cursor to the
wrong value in waveform window
ƒ Double click at this wrong value
ƒ Or select signal and do Active Trace with RMB
(right mouse button) in source code window
ƒ Verdi will highlight the active driving
statement in source code window
Design Better
Debug Faster
Trace Signal with Wrong Value
Active Trace(2/2)
3.
3.Verdi
Verdiwill
willhighlight
highlight
the
thereal
realdriving
drivingstatement
statement
1.Select
1.Selectinterested
interestedsignal
signal
2.Double
2.Doubleclick
clickon
onwrong
wrongvalue
value
Design Better
Debug Faster
Trace Signal with Wrong Value
Active Annotation(1/2)
ƒ Purpose:
ƒ Annotate simulation result in source code or
schematic window to view signal value with design
context
ƒ Usage:
ƒ nTraceÆ FileÆ Load simulation result(FSDB)
ƒ nTraceÆ SourceÆ Active Annotation or
nSchemaÆ SchematicÆ Active Annotation
ƒ Signal’s value will change with cursor time
Design Better
Debug Faster
Trace Signal with Wrong Value
Active Annotation(2/2)
cursor
cursortime
time
Signal’s
Signal’svalue
valuewill
will
change
changewith
withcursor
cursortime
time
Design Better
Debug Faster
Trace This Value Automatically
ƒ Flow View
ƒ Add the signal with the bad data value to the waveform.
ƒ View relevant design behavior over time.
ƒ Create Temporal Flow View for the problem signal
ƒ Use Trace This Value to locate the cause of the specific data value
across multiple cycles
ƒ Visualize structure and source code over time
ƒ Trace and analyze multiple paths in a single view
ƒ Waveform
ƒ Add the signal with the bad data value to the waveform.
ƒ Locate the cause of the bad value and trace the relevant signals in
the waveform.
ƒ Use Trace This Value on nWave with RMB
ƒ Analyze the waveform and source code to find the cause of the
bug
Design Better
Debug Faster
Trace This Value Automatically
View Design Behavior Over Time(Verdi)
ƒ Use Create Temporal Flow View on selected signal
ƒ From nWave, place cursor at the time of interest and invoke
RMB menu Æ Create Temporal Flow View
Hint: RMB means Right-Mouse-Button
Design Better
Debug Faster
Trace This Value Automatically
Create Temporal Flow View Options
ƒ In the Create Temporal Flow View window
ƒ Confirm the working scope is correct
ƒ Verdi will perform behavior analysis on this scope and all scopes
beneath it
ƒ Click OK
1.
1.Specify
Specifythe
thedebug
debugrange
range
2.
2.Reference
ReferenceSignal
Signaland
andTime
Time
are
areautomatically
automaticallyspecified.
specified.
Design Better
Debug Faster
Trace This Value Automatically
Automatically Locate Source of Bad Value
ƒ Use Trace This Value to locate the cause of the
specific data value across multiple cycles
ƒ Place the cursor over a signal and invoke RMB Æ Trace This
Value
ƒ This command automatically expands nodes in the Temporal Flow
View to trace a value back to its source.
signal
signalininred
red
means
meansactive
activesignal
signal
clock
clocktrigger
triggertime
time
Design Better
Debug Faster
Trace This Value Automatically
Tracing Details
ƒ
ƒ
ƒ
Trace behavior will base on the options for “trace this value”
To set the trace option
ƒ
Tools Æ Preferences Æ Temporal Flow ViewÆ TraceÆ Cycled Based
ƒ
Trace the same VALUE(s) on data path: Over multiple cycles, trace all
active data signals whose value matches the original data value. (Default ON)
Trace This Value Options:
Recommend to turn off for gate-level
ƒ
ƒ
ƒ
Continue tracing if only one ACTIVE data path: If there is only one active
data signal, continue tracing on the signal even if the value doesn’t match the
original data value. (Default ON)
Continue tracing if only one TRANSITION on active fan-in’s: If there are
multiple active fan-in signals but only one with a transition, continue tracing
on the one with the transition even if it is on a control signal. (Default ON)
Stop when CONTROL has transition: Tracing stops when the control signal
has a transition. (Default OFF)
ƒ
ƒ
Note: These options are “OR” together. Whenever one of the conditions is true, tracing
continues from the corresponding nodes.
Specify Max Level, Ask Every Time or No Limit: Specify the maximum
number of levels for tracing. Default is 10 levels.
Design Better
Debug Faster
Trace This Value Automatically
Display Decision Points on the Temporal Flow View
ƒ Place an exclamation mark on the fan-in nodes with
transitions on the control signals. Recommend to
enable this option!
ƒ Enable Display Marker for Decision Point under Tools Æ
Preferences Æ Temporal Flow View Æ View Æ Display Æ
Display Marker for Control with Transition (Default is OFF)
ƒ To clear the marks, disable the option.
Design Better
Debug Faster
Trace This Value Automatically
Visualize Structure and Source Code
ƒ Synchronize the structure and source code
ƒ Click on the “Enable source code automatically” icon
ƒ Once the option is enabled, click each node to show the
associated source code.
ƒ Preference to show on nTrace window or another source
window
Design Better
Debug Faster
Trace This Value on Waveform(1/2)
ƒ Automatically trace active paths in nWave
ƒ Place the cursor over a signal and invoke RMB Æ
Trace This Value on nWave
Design Better
Debug Faster
Trace This Value on Waveform(2/2)
ƒ On nWave, select RMB Æ Preferences Æ Temporal
Flow ViewÆ View and enable Highlight Signal When
Adding to nWave
ƒ Execute RMB Æ Trace This Value on nWave after enabled.
ƒ The “arrow” symbol indicates sample points on internal nets
ƒ The “highlight” indicates registers
Design Better
Debug Faster
Other Trace Commands
ƒ Place the cursor over a signal at the desired time and
invoke the RMB menu
ƒ Show Fan-in Registers
ƒ Active only or All fan-in registers in one cycle
ƒ Show Fan-in Signals
ƒ Active only or All fan-in signals in one connectivity
ƒ Similar to “trace driver and drag into waveform”
ƒ Show Clock
ƒ Show triggering clock
ƒ Each command adds a new group of signals
Lab1 (1/3)
Design Better
Debug Faster
Use “Active Trace” to trace wrong value
ƒ Verdi –f run.f –ssf rtl.fsdb &
ƒ In source window, Drag&Drop scope system.i_cpu.i_ALUB to nWave
ƒ Debug ALU[7:0] 3->55 @951ns
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Active Trace for signal ALU on nWave
Active Annotation on nTrace
Active Trace for signal “a” on nTrace until TDB0
Trace TDB0’s driver on partial schematic (Tools Æ New Schematic
Æ Connectivity)
Active Annotation on nSchema
In schematic, select “TDB0” and move cursor to last transition(34Æ55)
at time 800
Double click on mux input pin(1) to expand to a latch
Double click on latch data pin
Double click on tri-state buffer input to trace to memory
ƒ Which address does value 55 read out? 2
Design Better
Debug Faster
Lab1 (2/3)
Use “Trace This Value” in temporal flow view to
debug ALU@951
ƒ RMB on ALU[7:0] 3->55 @951ns in nWave
ƒ Create Temporal Flow View
ƒ Set the working scope to “system” and enable “Cycle
Based”, then click OK
ƒ In temporal flow view ,double click on a[7:0] to trace its
active statement
ƒ What’s the driving logic? Mux
ƒ Which is active data signal? IDB
ƒ Which is the active control signal? bus_mode
ƒ In temporal flow view, RMB on “IDB” and “Trace This
Value”
ƒ How many cycles does Verdi trace back? 2 cycles
ƒ What’s the value does memory read out for address 2? 55
Design Better
Debug Faster
Lab1 (3/3)
ƒ Try to show the latch’s source code
ƒ Try to show Marker “!” for control pin with transition on
temporal flow view from preference setting
ƒ How many marker shown? 2
Use “Trace This Value” on waveform for signal
“ALU” @951
ƒ RMB on waveform and select “preference”
ƒ Enable “Highlight Signal When Adding to nWave” Option
(Temporal Flow View tabÆ Automatic Command tab)
ƒ RMB on signal “ALU” @951 and “Trace This Value on
nWave”
ƒ All the active signals will show in waveform
ƒ The sampling point will mark with
ƒ The register signals will mark with a rectangular yellow bar
Design Better
Debug Faster
Debug Workshop Agenda
ƒ Design Import and Dumping
ƒ Trace Signal with Wrong Value
ƒ Debug Memory
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Debug Memory
ƒ Common Problem
ƒ Hard to dump the contents of memory
ƒ Difficult to view memory contents with
traditional views (i.e. waveforms)
ƒ Many different memory models
ƒ Verdi Solution
ƒ PLI dumping and show memory content
ƒ Don’t need FSDB dumping, trace memory content
automatically and locate the last write
Design Better
Debug Faster
Memory Debug Flow
General
Solution
Verdi’s
Solution
synthesizable
Non-synthesizable
Define
Definememory
memory
model
modelby
byMDT
MDT
PLI
PLI dumping
dumping
Auto
Autoload
load
Manual
Manualload
load
Show
Showmemory
memory
content
contentinintable
table
••Trace
Tracememory
memorywrite
writeautomatically
automatically
••Show
Showmemory
memorycontent
contentinintable
table
••Calculate
Calculatememory
memoryvalue
valueand
andshow
showininwaveform
waveform
Design Better
Debug Faster
Verdi Debug Solution
ƒ Synthesizable 2-D and MultiDimensional Arrays
ƒ Automatically locate the last write
ƒ Trace memory content in 2-D table or
waveform viewer
ƒ Non-Synthesizable Static RAM
ƒ Requires user-defined or pre-defined
vendor memory models
ƒ Trace memory content in 2-D table or
waveform viewer
Design Better
Debug Faster
Locate Memory Write
ƒ Verdi will calculate the the memory value for the specific
address with its last write time
ƒ Usage
ƒ In the flow view, double-click the memory signal
ƒ Or in nTrace invoke, RMB Æ Debug Memory Æ Trace Memory Write
Show
Showthe
thelast
lastwrite
write
value
valueand
andtime
time
Design Better
Debug Faster
Show Memory Content in Table(1/2)
ƒ Show memory contents for multiple locations
ƒ In the flow view, Tools Æ Show Memory Contents
ƒ Or nTrace, RMB Æ Debug Memory Æ Show Memory
Contents
ƒ Specify address range
ƒ Memory range specified in RTL is used by default
ƒ Specify time:Trace latest write from 0 to specified time
ƒ In nTrace, default time is
global cursor.
ƒ In flow view, default time
is last memory access
Design Better
Debug Faster
Show Memory Content in Table(2/2)
ƒ Search for specific values
ƒ Search Æ Find
ƒ Synchronize memory table
with nWave
ƒ Time Æ Sync Cursor Time
ƒ Customize the table
ƒ Options Æ Display Mode
Show
Showthe
thedata
datawrite
writetime
time
Design Better
Debug Faster
Show Memory Contents in Waveform(1/2)
ƒ Trace memory contents in nWave
ƒ In flow view, Tools Æ Dump Memory Waveform to FSDB
ƒ Or in nTrace, RMB Æ Debug Memory Æ Dump Memory Waveform
to FSDB
ƒ Specify address and time
ƒ Click Add
ƒ Specify a memory dump
FSDB file name
ƒ Check “Open nWave after
Dumping FSDB”
ƒ Click “Start Dumping”
Design Better
Debug Faster
Show Memory Contents in Waveform(2/2)
ƒ Read the new FSDB into the original
nWave window or new waveform
window
Show
ShowMemory
Memoryvalue
valueininwaveform
waveform
Lab2-1 (1/2)
Design Better
Debug Faster
Debug memory for synthesizable memory
ƒ Verdi –f run.f –ssf rtl.fsdb &
ƒ
ƒ
ƒ
ƒ
Get signal “system.i_cpu.ALU[7:0]” in nWave
RMB on ALU[7:0] 3->55 @951ns in waveform
Create Temporal Flow View
Set the working scope to “system” and enable “Cycle Based” , then
click OK
ƒ In temporal flow view (TFV), RMB on signal “a” and
“Trace This Value”
ƒ It will trace to the memory @800
ƒ Double click on memory net “macroram” in TFV
ƒ What’s the last write time for value 55 at address 2?
Initialization
Design Better
Debug Faster
Lab2-1 (2/2)
ƒ Select memory net “macroram” in TFV and
invoke Tools Æ Show Memory Content…
ƒ Specify display range 0:31, time 800ns, and click
OK in the pop-up form
ƒ What’s the value at address 7 ? 20
ƒ What’s the last written time for address 7? 0ns
ƒ Select memory net “macroram” in TFV and
invoke Tools Æ Dump Memory Waveform
to FSDB
ƒ Specify End time as 5000ns, click “Add” ,click
“Start Dumping”
ƒ Show the memory “macroram” in nWave
ƒ What’s the value of macroram[10]? 1
Design Better
Debug Faster
Verdi Debug Solution
ƒ Synthesizable 2-D and MultiDimensional Arrays
ƒ Automatically locate the last write
ƒ Trace memory content in table or
waveform viewer
ƒ Non-Synthesizable Static RAM
ƒ Requires user-defined or pre-defined
vendor memory models
ƒ Trace memory content in table or
waveform viewer
Design Better
Debug Faster
Create Memory Definition File(1/3)
ƒ Purpose: let Verdi to know the complex memory
model behavior through simple definition table
ƒ Usage
ƒ From nTrace, Exploration Æ Memory Definition Table
ƒ or RMB on memory Æ Debug Memory Æ Memory Definition
Table
ƒ Define the clock, control logic, address and data associated
with the memory operations
ƒ Initial (optional)
ƒ Write (must)
ƒ Read (optional)
ƒ Save the memory
definition to a file(mdt) for
future usage. 1.1. Select
Select“Initial”
“Initial”or
or“Write”
“Write”or
or“Read”
“Read”
2.
2. Click
ClickAdd..
Add..to
toedit
edit
Design Better
Debug Faster
Create Memory Definition File(2/3)
ƒ Memory Write – Verilog example
always @(posedge(clk)
if (cen & wen1)
M[addr][0:7] := data8;
ƒ MDT Description:
clock : @(posedge clk)
condition: cen & wen1
address : addr
data-in : data8
Design Better
Debug Faster
Create Memory Definition File(3/3)
ƒ Memory Read – Verilog example
always @(posedge clk)
if (cen & !(wen1 & wen2 & wen3 & wen4))
data32 <= oe ?M[addr][0:31]:'bz;
ƒ MDT Description:
clock
condition
: @(posedge(clk)
: cen & !(wen1 & wen2
& wen3 & wen4)
address
: addr
output_enable : oe
data-out
: data32
Design Better
Debug Faster
Pre-Defined Vendor Memory Model
ƒ Provide popular vendor MDT for memory model
ƒ User only needs to set module mapping in
novas.rc of MDT section before loading MDT into
Verdi
ƒ Located at <Verdi_installation_dir>/share/mdtlib
ƒ Artisan supported models
ƒ
ƒ
ƒ
ƒ
ART_RF_SP.mdt: Artisan Single-Port Register File
ART_RF_2P.mdt: Artisan Two-Port Register File
ART_SRAM_SP.mdt: Artisan Single-Port SRAM
ART_SRAM_DP.mdt: Artisan Dual-Port SRAM
ƒ Virage supported models
ƒ
ƒ
ƒ
ƒ
VIR_SRAM_SP.mdt: High Performance 1P(1rw) Sync High Density RAM
VIR_SRAM_DP.mdt:: High Performance 2P(2rw) Sync High Density RAM
VIR_RF_SP.mdt: High Performance 1P (1rw) Synchronous Register File
VIR_RF_DP.mdt: High Performance 2P (1r,1w) Sync Reg File
Design Better
Debug Faster
Memory Model Mapping
ƒ Mapping format for memory models in [MDT] section of
novas.rc
ƒ Verdi_supported_vendor_memory_name = user_memory_module_name
ƒ Default novas.rc contains:
[MDT]
ART_RF_SP = spr[0-9]*bx[0-9]*
ART_RF_2P = dpr[0-9]*bx[0-9]*
ART_SRAM_SP = spm[0-9]*bx[0-9]*
ART_SRAM_DP = dpm[0-9]*bx[0-9]*
VIR_SRAM_SP = hdsd1_[0-9]*x[0-9]*cm4sw1
VIR_SRAM_DP = hdsd2_[0-9]*x[0-9]*cm4sw1
VIR_RF_SP = rfsd1_[0-9]*x[0-9]*cm2sw0
VIR_RF_DP = rfsd2_[0-9]*x[0-9]*cm2sw1
ƒ Example:
ƒ Consider Artisan Single Port Register File with design memory module
name as sram256bx16
novas.rc file would be updated as:
[MDT]
ART_RF_SP = sram[0-9]*bx[0-9]*
Design Better
Debug Faster
Load Existing Memory Definition Files
ƒ Support to load existing MDT manually or automatically
ƒ From the GUI:
ƒ Exploration Æ Load Memory Definition Table from File
1.
1.“Browse”
“Browse”to
toload
loadmdt
mdt
2.
2.Add
Addto
toList
List
3.
3.Click
ClickOK
OK
ƒ From the Verdi command line:
ƒ Individual file: -mdt <MDT_file>
ƒ List of memory definition files: -mdt <MDT_list>
ƒ Automatic loading:
ƒ setenv MDT_LIBPATHS < MDT_path1 MDT_path2>
ƒ setenv MDT_LIBS < MDT_file1 MDT_file2>
Design Better
Debug Faster
Debug Non-Synthesizable SRAM
ƒ After the memory model is defined,
Verdi can
ƒ Automatically calculate the last write for
specific address
ƒ automatically calculates and displays
the memory contents in table
ƒ Show the calculated result into fsdb and
show on waveform
Design Better
Debug Faster
Debug Memory (General Solution)
ƒ Use PLI/FLI calls to dump contents of
memory/MDA models
ƒ Verilog –
Array Name
Start Addr
Depth
ƒ $fsdbDumpMem(macroram, 0, 256);
ƒ Specified at the memory WRITE operation
Level
Scope
Delay
ƒ Initial #200 $fsdbDumpMemInScope(1, TB, 500);
ƒ $fsdbDumpMDAOnChange(1, system.i_pram); $……(system);
ƒ $fsdbDumpMDAOnChange(screen, 10, 20, 15);
ƒ reg [7:0] screen[79:0][0:24][1:0] screen[10][15][1:0]~screen[29][15][1:0]
ƒ VHDL –
Total 40 cells will be dumped
ƒ Memories declared as signals dumped on-change
using fsdbDumpvars
ƒ Memory variables dumped on-demand with
fsdbDumpMem and related calls
Design Better
Debug Faster
Debug Memory (General Solution)
ƒ Visualize memory/MDA contents in a 2D table format or a waveform viewer
ƒ In nTrace or nWave, Tools-> Memory/MDA
to display the memory/MDA
ƒ Synced with other views in time
ƒ Cells that change are highlighted in red
ƒ Drag & drop cells to nWave to view as
waveforms
Design Better
Debug Faster
Memory/MDA Viewer
ƒ Use File -> Get Memory Variable to select a
dumped MDA
ƒ Choose the
range and cell
dimensions
to display
The
Therange
rangeand
andcell
celldimension
dimension
can
canalso
alsobe
bemodified
modifiedfrom
fromthe
the
viewer
viewertool
toolbar
bar
Design Better
Debug Faster
Lab2-2 (1/2)
Use pre-defined MDT to trace memory
ƒ Verdi –f run.f –ssf memsys.fsdb &
ƒ Change window time unit to “1ns” in nWave
ƒ Change scope to “tb_memsys.memsys0” in hierarchy browser and
select instance “ram0” in line 45
ƒ Does the memory module name match the mapping for Artisan dual port
SRAM in MDT section of novas.rc? Yes, ART_SRAM_DP = dpm[0-9]*bx[0-9]*
ƒ Load ART_SRAM_DP.mdt into verdi
ƒ In source window, RMB on instance “ram0” and invoke “Debug Memory” Æ
“Memory Definition Table”
ƒ Click “Load” and then “Browse…” and double click in ART_SRAM_DP.mdt
(File Manager Window)
ƒ Click “Add to list” and click “OK”
ƒ Select “1.write” and click “Edit..” to see the write operation content (Memory
Definition Table Window)
ƒ Click “OK” to close the Memory Definition Table Editing Window
ƒ Click “OK” to close Memory Definition Table window
Design Better
Debug Faster
Lab2-2 (2/2)
ƒ Show memory content in table
ƒ In source window,RMB on instance “ram0” and invoke “Debug
Memory” Æ “Show Memory Content...”
ƒ Specify display range from 0 to 127, time to 30000 ns and
click “OK”
ƒ Do Behavior Analysis and set working scope to tb_memsys
ƒ What’s value at address 48? 3ed0
ƒ What’s the last write time at address 48? 29570 ns
ƒ Show memory content in waveform
ƒ In source window, RMB on instance “ram0” and invoke “Debug
Memory” Æ “Dump Memory Waveform to FSDB…”
ƒ Specify display range from 0 to 127, time from 0 to 30000,
then click “Add” then click “Start Dumping”
ƒ Show the memory “mem” on waveform
ƒ What’s the value of mem[72] at 29570 ns? 3ed0
Design Better
Debug Faster
Debug Workshop Agenda
ƒ Design Import and Dumping
ƒ Trace Signal with Wrong Value
ƒ Debug Memory
ƒ Trace Unknown Value
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Trace X Cause
ƒ Common Problem
ƒ Hard to locate the source of X value since
there are multiple causes, such as timing
problem, no driver, bus contention, no initial
value…etc.
ƒ The number of logic gates with X value is too
large to debug one by one
ƒ Verdi Solution
ƒ Verdi’s Trace Active X to locate the X cause
on Flow View or waveforms
Design Better
Debug Faster
Verdi’s Trace Active X(1/3)
ƒ In nWave, use Trace Active X to locate the
cause of the unknown across multiple cycles.
ƒ Place the cursor at the transition to X and invoke RMB
Æ Trace Active X
ƒ Report the results in a table
ƒ
ƒ
ƒ
ƒ
Display the source code in nTrace
Add the associated signals to nWave
Add the signal to flow view
Continue to trace selected signal
Trace
TraceActive
ActiveXXoption
option
Show
Showresult
resulton
ontable
table
Design Better
Debug Faster
Verdi’s Trace Active X(2/3)
AAFlow
FlowView
Viewto
todisplay
displaythe
the
signal
signalflow
flowwith
withsimulation
simulationtime
time
Design Better
Debug Faster
Verdi’s Trace Active X(3/3)
Hint: Click RMB
Trace
TraceActive
ActiveXXfrom
fromhere
here
Find
Findthe
theXXcause
causeacross
across
multiple
multiplecycles!
cycles!
Design Better
Debug Faster
ƒ
ƒ
Stop at black box output signal (Default: ON)
Stop at fanin that is X but no transition in its last cycle (Default: ON)
ƒ
ƒ
ƒ
Jump to the first X transition
When the second option “Stop at fan-in that is X but no transition in it’s last
cycle” is on, this option has to be off because it can’t snap to value change when
the other option is on.
Trace all causes (Default: OFF)
ƒ
ƒ
ƒ
Verdi traces X transition and stops when none of the fan-in signals w/X has
transition in the current cycle
E.g. – Verdi stops tracing at Q. If this option is off, it continues tracing S0
Snap to value change and continue (Use heuristics for faster tracing)
(Default: OFF)
ƒ
ƒ
ƒ
Options for Trace Active X
Trace all possible causes at once – breadth tracing
Stop after finding # causes (Default: ON, with 1 cause)
View options (Flow View) (Default: OFF)
ƒ
Allows users to visualize the paths in flow view
XX
S0
S1
11 ->
XX Q
11
Sel
1->0
Recommended Approach
Design Better
Debug Faster
1.
Use “fast search” to locate obvious errors (typo,
un-initialize, setup/hold time violation, no
drivers…)
ƒ
ƒ
ƒ
2.
Stop at black box output signal (ON)
Stop at fanin that is X but no transition in its last cycle (OFF)
Snap to value change and continue (ON)
Locate the active X source precisely
ƒ
ƒ
ƒ
3.
Stop at black box output signal (ON)
Stop at fanin that is X but no transition in its last cycle (ON)
Snap to value change and continue (OFF)
The number of causes
ƒ
ƒ
Use the default setting : Stop after finding 1 cause
Specify a higher number or use “Trace all causes” if it keeps
stopping at similar causes
ƒ
E.g. un-initialization registers
Lab3 (1/2)
Design Better
Debug Faster
Use “Trace Active X” to trace unkown
ƒ
ƒ
ƒ
ƒ
source “SourceMe” to set symbol library
Verdi –f run.f –ssf gate.fsdb &
Drag&Drop scope system.i_cpu.i_ALUB to nWave
Debug S1 with X at 1256ns
ƒ RMB on signal “S1”and “Trace Active X”
ƒ Create Temporal Flow View
ƒ Set the working scope to “system” and enable “Cycle Based” ,
then click “OK”
ƒ In temporal flow view, RMB on “S1” and “Trace
Active X”
ƒ Disable “Stop at Fan-in that is X but No Transition in
Its Last Cycle” and click “Trace”
Design Better
Debug Faster
Lab3 (2/2)
ƒ The debug results:
ƒ Pop up a Trace Active X Result table to show the unknown
cause
ƒ Show the trace path in TFV
ƒ RMB on signal “system.i_ALUB.n770” in the table
and “Show source code on nTrace”
ƒ Highlight the problem logic U278 in nTrace
ƒ Select “n773” in nTrace and invoke Tools Æ New
Schematic Æ Connectivity
ƒ You can see signal n733 is floating (No driver)
ƒ RMB on signal “system.i_ALUB.n770” in the table
and “Add all fan-in signals in nWave”
ƒ You can see signal n733 is floating (high Z)
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
ƒ Reduce Simulation time and FSDB Size
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Reduce Simulation Time and FSDB Size
ƒ Common Problem
ƒ Designs are getting larger such that simulation
lasts too long and results into a huge-size FSDB
ƒ Verdi Solution
ƒ Use System Tasks to dump partial FSDB based
on user-specified condition
ƒ Use Virtual File to watch several split FSDB more
conveniently
ƒ Use Siloti to dump the minimum set of signals
but still retain full visibility
Design Better
Debug Faster
System Tasks
ƒ $fsdbDumpvars
ƒ Dump full or partial FSDB based on user-specified
condition
ƒ $fsdbAutoSwichDumpfile
ƒ Split FSDB size automatically when simulation
ƒ $fsdbDumpOff/$fsdbDumpOn
ƒ Dump concerned time span
ƒ For more system tasks, refer to
ƒ The section of FSDB dumping commands in
linking_dumping.pdf after Verdi2008.01
ƒ Appendix B in reference.pdf before Verdi2007.10
Design Better
Debug Faster
$fsdbDumpvars
ƒ $fsdbDumpvars([level] [, module | var]*);
ƒ Example:
ƒ $fsdbDumpvars;
ƒ $fsdbDumpvars(0, system);
ƒ $fsdbDumpvars(1, system.i_cpu,
system.i_cpu.i_PCU.net1);
Design Better
Debug Faster
$fsdbAutoSwitchDumpfile
ƒ $fsdbAutoSwitchDumpfile(File_Size, "FSDB_name",
Number_of_Files [, "log_filename"]);
ƒ Filesize unit: Mbytes
ƒ The minimum file size of the FSDB file is 2M
ƒ Example:
initial
begin
$fsdbAutoSwitchDumpfile(200,”my.fsdb”,10);
$fsdbDumpvars;
end
Design Better
Debug Faster
$fsdbDumpon,$fsdbDumpoff
ƒ Used to dump on and dump off
ƒ Example
initial begin
$fsdbDumpvars;
#1000
$fsdbDumpoff;
#1000
$fsdbDumpon;
#1000
$finish;
end
ƒ Dump time span 0~1000,2000~3000
Lab4-1
Design Better
Debug Faster
Use System Tasks to Reduce Simulation Time and FSDB Size
ƒ Edit the test bench file “system.v”
ƒ How to only dump signal below scope system.i_cpu
from time 0ns~3000ns and 5000ns ~10000ns by
using the following system task
ƒ $fsdbDumpvars;
ƒ $fsdbDumpoff
ƒ $fsdbDumpon
ƒ Dumping result and example source code
ƒ verilog.fsdb / system.v.ok
ƒ Use nWave to open verilog.fsdb to see the
dumping result
ƒ Only contains signals below scope system.i_cpu
Design Better
Debug Faster
Virtual File Editor
ƒ Merge multiple FSDB files to one virtual file.
ƒ FSDBs generated by system tasks, fsdbDumpvars,
fsdbAutoSwitchDumpfile, fsdbDumpon/fsdbDumpoff
ƒ In nWave, invoke File Æ Edit Virtual File to Edit
Virtual File form.
ƒ The resulting virtual
file can be used in the
Open File form.
Design Better
Debug Faster
Load FSDB by Virtual File
ƒ Command line:
% verdi –ssf <virtual_file>.vf
ƒ In nWave, use
File Æ Open
ƒ Filter includes *.vf
ƒ Select the virtual file.
ƒ Click OK.
Select filter with *.vf
Lab4-2 (1/2)
Design Better
Debug Faster
Use Virtual File Editor to manage different FSDB files by time
range
ƒ Invoke nWave to open different FSDBs
ƒ File Æ Open time1.fsdb (0ns ~5000ns)
ƒ Get signal “system.clock”, “system.addr” and “system.data”
ƒ Contain signals from 0ns ~5000ns
ƒ File Æ Open time2.fsdb (5000ns ~17500ns)
ƒ Get signal “system.clock”, “system.addr” and “system.data” again
ƒ Contain signals from 5000ns ~17500ns
ƒ File Æ Close Æ All
ƒ Use Virtual File Editor
ƒ File Æ Edit Virtual File
ƒ
ƒ
ƒ
ƒ
ƒ
Specify Virtual File Name: /bytime.vf
Select time1.fsdb and time2.fsdb Æ click “Add”
Enable “Open Virtual File Directly” Æ click “OK”
Get signal “system.clock”, “system.addr” and “system.data” again
You can see the full range of simulation time (0ns ~ 17500ns)
ƒ File Æ Close Æ All
Lab4-2 (2/2)
Design Better
Debug Faster
Use Virtual File Editor to manage different FSDB files by
design hierarchy
ƒ Invoke nWave to open different FSDBs
ƒ File Æ Open pram.fsdb
ƒ Get signal “system.i_pram.clock” (only contains system.i_pram)
ƒ File Æ Open cpu.fsdb
ƒ Get signal “system.i_cpu.error” (contains the other scopes and no i_pram)
ƒ File Æ Close Æ All
ƒ Use Virtual File Editor
ƒ File Æ Edit Virtual File
ƒ
ƒ
ƒ
ƒ
ƒ
Specify Virtual File Name: /byscope.vf
Select pram.fsdb and cpu.fsdb Æ click Add
Enable “Open Virtual File Directly” Æ click OK
Get signal “system.i_pram.clock” and “system.i_cpu.error”
You can get signals of all scopes from different FSDBs
ƒ File Æ Close Æ All
Design Better
Debug Faster
Siloti – SimVE
ƒ Common Problem
ƒ Designs are getting larger which causes
increased simulation times
ƒ Data storage is at a premium
ƒ Can lose 1-2 days waiting for the next simulation
ƒ Verdi Solution
ƒ Essential Signal Analysis engine determines
minimum signals to dump for full visibility.
ƒ Data Expansion engine processes limited data
and calculates values for combinational signals.
ƒ Significantly reduces dumping requirements
while retaining full visibility.
Design Better
Debug Faster
Siloti – SimVE
How it Works
Simulators
RTL/gate
Source
Analyze
Essential
Signals
Dump list for
simulation
Expand
Data
(on-the-fly)
Patent Pending Technology
Partial
Dump
File
Essential Signal Analysis – GUI
Design Better
Debug Faster
ƒ In Siloti nTrace, invoke Visibility Æ Essential
Signal Analysis Æ Analyze by Scope.
Click Options tab
to see additional
options.
1. Specify the top level scope to
generate essential signals for.
Optional - specify
multiple scopes
and the probe
criteria.
Optional - enable
to save settings
to novas.rc.
2. Specify the output
file name and file
format. Hierarchical
format is recommended
for simulation; plain list
is better for readability.
Enable if creating
ES list for Replay.
Design Better
Debug Faster
Generate Essential Signal FSDB
ƒ Replace $fsdbDumpvars with
$fsdbDumpvarsToFile, e.g.
ƒ $fsdbDumpvarsToFile(“es.list”, “myfsdb.fsdb”);
(Verilog)
ƒ fsdbDumpvarsToFile(“es.list”, “myfsdb.fsdb”);
(VHDL)
ƒ Run simulation to generate essential signal
FSDB.
Design Better
Debug Faster
Data Expansion to Debug
Click to enable full menus and toolbar.
All Verdi debug functions are
available.
Enable Data Expansion
Signals are expanded after
enable Data Expansion
Data Expansion about Waveform
Design Better
Debug Faster
Signals that can
be expanded.
Signals that were
dumped during
simulation.
Values will be computed
when the range is zoomed in
Lab4-3 (1/2)
Design Better
Debug Faster
Use Essential Signal Dumping to reduce simulation
time and FSDB size
ƒ Generate essential signal list
ƒ esa -bas tb_CPUsystem -f run.f -all_eslist fullchip.list
ƒ The essential signals will be listed in “fullchip.list”
ƒ See the log file “./esaLog/siloti.log”
ƒ What is the percentage of essential signal (bits)? 38.79%(270/696)
ƒ Use system task to dump essential signal FSDB
ƒ
ƒ
$fsdbDumpfile("ess.fsdb");
$fsdbDumpvarsToFile("fullchip.list");
ƒ Example source code
ƒ src/tb_CPUsystem.v
ƒ Run simulation to dump “ess.fsdb”
Lab4-3 (2/2)
Design Better
Debug Faster
Use Data Expansion to get the full visibility of design
ƒ Invoke Siloti
ƒ siloti –f run.f –verdi –ssf ess.fsdb &
ƒ Turn on Active Annotation in Siloti
ƒ Change scope to “tb_CPUsystem.i_CPUsystem.i_CPU”
ƒ Source Æ Active Annotation
ƒ There are many signals show “NF” (Not Found in FSDB)
ƒ D&D “tb_CPUsystem.i_CPUsystem.i_CPU” scope to nWave
ƒ A window pops and shows “List of Unrecognized Signal”
ƒ Turn on Data Expansion in Siloti
ƒ Visibility Æ Data Expansion Æ Enable Data Expansion
ƒ Do behavior analysis and set the working scope to “tb_CPUsystem” and click
“OK”
ƒ The annotated signals will be calculated on demand
ƒ D&D tb_CPUsystem.i_CPUsystem.i_CPU scope to nWave
ƒ The calculated signal will be displayed in nWave.
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
ƒ Compare Simulation Waveforms
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Compare Simulation Waveforms
ƒ Common Problem
ƒ Trace the signal with good and bad values in
two waveform viewers
ƒ Continue tracing drivers of the signal in two
waveforms backward over time and compare
their values until finding the cause
ƒ Verdi Solution
ƒ Compare two different designs’ FSDBs
ƒ Waveform comparison and then Trace this value
ƒ Compare the same design’s FSDBs
ƒ Waveform comparison and then behavior trace
for FSDB mismatch
Design Better
Debug Faster
Use Waveform Comparison
ƒ Purpose
ƒ Fast compare 2 simulation result for interested
signals
ƒ Usage
ƒ Load 2 fsdb into waveform
ƒ Tile & Sync. 2 waveforms
ƒ WindowÆTile Waveform
ƒ WindowÆSync. Waveform View
ƒ Select interested signals
ƒ Compare with desired style
ƒ ToolsÆWaveform CompareÆ…
Design Better
Debug Faster
Use Waveform Comparison
Waveform Compare
select
selectcomparison
comparisonstyle
style
comparison
comparisonresult
result
Design Better
Debug Faster
Use Waveform Comparison
Comparison Style
ƒ Compare 2 Signals
ƒ Signal name can be different
ƒ Compare Selected Signals
ƒ Only matched signal name will compare
ƒ Compare Displayed Signals
ƒ Only matched signal name will compare
ƒ Compare 2 Groups
ƒ Compare signals based on displayed order
ƒ Bit width must match, signal name can be different
ƒ Compare Signal from File
Design Better
Debug Faster
Use Waveform Comparison
Compare Options(1/2)
ƒ Clock
ƒ Compare signals based on Rising/Falling edge of a specific signal
ƒ Support hold time/set up time with strobe
ƒ Cycle
ƒ Compare signals based on cycle time
ƒ Expression
ƒ Compare signals when expression is true or false
specify
specifycompare
compareoptions
options
specify
specifypositive
positiveedge/negative
edge/negativestart
start
value
valueto
tocompare
comparehold/set
hold/setup
uptime
time
Design Better
Debug Faster
Use Waveform Comparison
Compare Options(2/2)
ƒ Specify proper value for “strobe”
ƒ
ƒ
Check register output
Check set-up time / hold time
clock
RTL Data
0
1
0
Gate Data
2
1
3
2
4
clock
RTL Data
Gate Data
0
1
0
2
1
3
2
4
Design Better
Debug Faster
Lab5-1 (1/2)
Use nWave to compare two waveforms
ƒ At gate: Verdi –f run.f –ssf gate.fsdb &
ƒ (nWave) Get signals Æ All signals in scope “system”
ƒ Tools Æ New Waveform to open a new nWave and load
“../rtl/rtl.fsdb” for the same signals (only reset_cpu is
different)
ƒ (nWave @gate) Window Æ Tile Waveform
ƒ (nWave @gate) Tools Æ Waveform Compare Æ
Options
ƒ Enable the two Conditional Comparison
ƒ D&D to specify the ‘clock” to Clock Name and set up the Strobe:
Start and Width for the two condition settings: 4//36 and 5//45
Design Better
Debug Faster
Lab5-1 (2/2)
ƒ (nWave @gate) Tools Æ Waveform Compare Æ
Compare Two Groups Æ specify the Group Name “G1”
and “G1” Æ OK
ƒ How many mismatches are found? 73
ƒ Click the blue right arrow on toolbar to view mismatches
ƒ (nWave @gate) Select clock signal and Put Cursor
@240ns
ƒ Select clock and View Æ Grid Options Æ enable “Grid
on Rising Edge” / “Grid Count with Start Number” 1 /
“Lock Grid Count” and click OK
ƒ How many clock cycles are there in the gate waveforms? 154
ƒ You can try other comparison style by yourself
Design Better
Debug Faster
Faster Debug between 2 FSDBs
ƒ Common Problem
ƒ Trace the signal with good and bad values in
two waveform viewers
ƒ Continue tracing drivers of the signal in two
waveform backward over time and compare
their values until locate the cause
ƒ Verdi Solution
ƒ Waveform comparison->Trace this value
in flow view for different design
ƒ Waveform comparison->behavior trace
for fsdb mismatch
Design Better
Debug Faster
Debug Flow between 2 FSDBs
waveform
waveformcomparison
comparisonto
tofind
findthe
themismatch
mismatchpoint
point
Same
SameDesign
DesignView?
View?
No
trace
tracethis
thisvalue
valueinintemporal
temporalflow
flowview
viewor
or
waveform
waveformto
tofind
findthe
theroot
rootcause
cause
Yes
behavior
behaviortrace
tracefor
forfsdb
fsdbmismatch
mismatch
to
tofind
findthe
theroot
rootcause
cause
Design Better
Debug Faster
Behavior Trace for FSDB Mismatch
The Same Design
ƒ Purpose:Automatically trace the root causes of
mismatches across multiple cycle in the
flow view
ƒ Typical causes for mismatches
ƒ Use different options from the same simulator
ƒ Two different simulators
ƒ Race conditions
ƒ Usage:
ƒ Use waveform comparison find the difference
ƒ Create new Temporal Flow View for mismatched
signal
ƒ Use “behavior trace for fsdb mismatch” to find the
cause
Design Better
Debug Faster
Behavior Trace for FSDB Mismatch
Trace Mismatch Cause (1/3)
ƒ Create flow view for the mismatched signal
ƒ Load in 2nd FSDB file in flow view
ƒ Use File Æ Load 2nd FSDB for Trace Mismatch
PS: If you directly trace mismatch
without loading the 2nd FSDB,
one warning message and the GUI
will pop up automatically.
Design Better
Debug Faster
Behavior Trace for FSDB Mismatch
Trace Mismatch Cause (2/3)
ƒ Specify the number of cycles/statement to
trace back(default 3)
ƒ Use Preferences Æ Temporal Flow View Æ Trace Æ
Trace Mismatch
Specify
Specifythe
thedesired
desirednumber
number
of
oflevels;
levels;(0
(0means
meansunlimited)
unlimited)
Default
DefaultON
ONfor
forfaster
fasterperformance;
performance;
Disable
Disableititfor
forprecise
precisefunctional
functionaldebug
debug
Design Better
Debug Faster
Behavior Trace for FSDB Mismatch
Trace Mismatch Cause (3/3)
ƒ Locate the register causing the
mismatches
ƒ Select the problem signal in Temporal Flow View
and use RMB Æ Behavior Trace for FSDB Mismatch.
Mismatched
Mismatchedvalues
values
Will
Willhighlight
highlightby
byred
red
Design Better
Debug Faster
Lab5-2 (1/2)
Use “Behavior Trace for FSDB Mismatch” to locate the
root cause
ƒ Verdi –f run.f –ssf bug.fsdb&
ƒ Get signal “tb_CPUsystem.i_CPUsystem.i_CPU.Aluout” in nWave
ƒ Use waveform compare to compare above signal for bug.fsdb and
good.fsdb
ƒ When does the first mismatch occurs? 777ns
ƒ RMB on signal Aluout @777 (bug.fsdb) and “Create Temporal Flow
View”
ƒ Select Cycle-Based and set working scope to tb_CPUsystem and click
OK
ƒ In temporal flow view (TFV), RMB on signal “a” and invoke “Behavior
Trace for FSDB Mismatch”
ƒ Load the “good.fsdb” for second FSDB
Design Better
Debug Faster
Lab5-2 (2/2)
ƒ In TFV, RMB on signal “a” and invoke “Behavior Trace for FSDB
Mismatch” again
ƒ Verdi will show the mismatch path and show different value
first_fsdb(second_fsdb) in TFV
ƒ In TFV, invoke Tools Æ Preference Æ Temporal Flow View Æ
Trace Æ Trace Mismatch
ƒ change the “Trace Back Cycles/Statement at a Time” to “10”
ƒ In TFV, RMB on mux input “IntDataIn” and “Behavior Trace for
FSDB Mismatch”
ƒ It will trace to mprom_out @375
ƒ “Behavior Trace for FSDB Mismatch” for mprom_out
ƒ It will stop on Memory
ƒ In TFV, double click on signal “microrom”
ƒ The memory initial file will show on nTrace
ƒ Open file “./memory/microrom.dat” and
“./memory/microrom_fix.dat” and compare the initial value at
address 1
ƒ The initial value difference cause the mismatch on signal Aluout @777
and other time point
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
ƒ Arrange and Simplify Massy Circuits
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Editable Schematic Window
ƒ Common Problem
ƒ Design’s schematic circuit is too complex to
read
ƒ Need design’s schematic figure to present or
discuss with teammate
ƒ Verdi Solution
ƒ Editable Window for Selected/All
command opens an editable schematic
window for selected/total design circuit
ƒ Automatically re-arrange the schematics or
manually move, rotate, align…etc.
Design Better
Debug Faster
Edit Schematics – Create Window
ƒ From nSchema:
ƒ Tools Æ New Schematic Æ Editable Window For
Selected
ƒ Tools Æ New Schematic Æ Editable Window For All
ƒ From nTrace:
ƒ Tools Æ New Schematic Æ Editable Window For
Selected
Design Better
Debug Faster
Editable Schematics – Edit Commands
ƒ To automatically re-arrange the schematic
invoke Tools Æ Rearrange Schematic.
ƒ Edit the selected object in the following ways:
ƒ Move
ƒ Move left, right, up and down.
ƒ Rotate
ƒ Rotate left, right.
ƒ Flip
ƒ Flip vertical, horizontal.
ƒ Align
ƒ Only available when multiple object are selected.
Design Better
Debug Faster
Editable Schematics – Add Comment Boxes
ƒ Invoke Object Æ Add Comment or click the toolbar icon.
ƒ Invoke Object Æ Edit Comment Content to attach external
content to the comment box.
ƒ Change the property of the comment box.
ƒ RMB Æ Viewing Properties
ƒ Change the font size, color, text alignment.
Attach content
Change
property
Lab6
Design Better
Debug Faster
Use “Editable Window for Selected” to document and discuss
signals at module interface
ƒ At sim: Verdi –f run.f &
ƒ Invoke nSchema for system.u0(usbf_top)
ƒ Select bus signals whose width >=8
ƒ Schematic Æ Selection Æ Select Instance/Signal
ƒ Enable Bus Width >= 8 and press Enter
ƒ click
then click OK
ƒ (nSchema) Tools Æ New Schematic Æ Editable Window for
Selected
ƒ (EditSchematic) Delete usbf_mem_arb block
ƒ (EditSchematic) Tools Æ Rearrange Schematic
ƒ Add common by Object Æ Add Comment
ƒ RMB -> Viewing Properties
ƒ Change the font size to 7
ƒ Key in some comments
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
ƒ Import Design Faster
ƒ
ƒ
ƒ
ƒ
ƒ
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Import Design Faster
ƒ Common Problem
ƒ It takes a lot of time to compile big design
ƒ Reloading design will compile all files
ƒ Loading sub-blocks with full-chip’s simulation
result will break down most features in Verdi
ƒ Verdi Solution
ƒ Use batch mode compilation style
ƒ Set Virtual Top
Design Better
Debug Faster
Import Design Faster
Import Design From Library(1/2)
ƒ Compile your Verilog design
ƒ vericom <your Verilog options>
ƒ Compile your vhdl design
ƒ vhdlcom <your vhdl options>
ƒ Importing design from library
ƒ Through Command Line
ƒ Verdi -lib libraryName –top TopModule
ƒ Through GUI
ƒ (nTrace) File Æ Import Design Æ From Library
ƒ Reload Design will only compile modified files
Design Better
Debug Faster
Import Design Faster
Import Design From Library(2/2)
1.Select
1.SelectDesign
DesignUnit
Unit
2.click
2.click“Add”
“Add”button
button
3.click
3.clickOK
OKto
to
import
importdesign
design
Design Better
Debug Faster
Import Design Faster
Set Virtual Top(1/6)
ƒ Problem
ƒ Can’t active annotation
ƒ Can’t active trace from waveform
ƒ Can’t drag signals from Source Code
window to waveform window
ƒ Cause: hierarchy mismatch between
Hierarchy Browser window and FSDB
ƒ Solution: set virtual top
Design Better
Debug Faster
Import Design Faster
Set Virtual Top(2/6)
ƒ Define the virtual hierarchy in a file as
following format
ƒ Module_Name = Scope_Name_in_FSDB
ƒ For example : cpu=system.i_cpu
ƒ Import design with virtual top file into
Verdi
ƒ Verdi will create a virtual top based on
what virtual top file defines
Design Better
Debug Faster
Import Design Faster
Set Virtual Top(3/6)
Your
YourDesign
Design
Hierarchy
Hierarchymismatch
mismatch
Simulation
Simulationisisnot
not
only
for
your
only for your
design,
design,but
butalso
also
for
whole
chip
for whole chip
Design Better
Debug Faster
Import Design Faster
Set Virtual Top(4/6)
Can’t
Can’tactive
activeannotation
annotation
All
signals’
value
All signals’ valuewill
willbe
beN.F
N.F
Import Design Faster
Design Better
Debug Faster
Set Virtual Top(5/6)
Define
Definevirtual
virtualtop
topfile
file
Import
Importvirtual
virtualtop
top
Module
Module
Name
Name
Instance
Instance
Name
Name
Top
TopModule
Module
Name
Name
Design Better
Debug Faster
Import Design Faster
Set Virtual Top(6/6)
Define
Definevirtual
virtualtop
topfile
file
Can
Candrag
dragand
anddrop
dropsignals
signalsto
towaveform,
waveform,
active
annotation,
and
active
trace
active annotation, and active tracefrom
from
waveform
to
source
code
now
waveform to source code now
Lab7-1
Design Better
Debug Faster
Use batch mode compilation to shorten the
time to import huge design
ƒ Compile Design
ƒ vericom –f run.f
ƒ Import Design from Library
ƒ Verdi –lib work –top system &
ƒ Modify system.v and save it
ƒ Increment Compile
ƒ vericom –smartinc –f run.f
ƒ Reload Design to check the new codes
ƒ File -> Reload Design
Lab7-2
Design Better
Debug Faster
Set Virtual Top to solve the hierarchy mismatch
between Hierarchy Browser window and FSDB
ƒ Invoke Verdi
ƒ Verdi &
ƒ Import Design Æ ALUB.f
ƒ Tools Æ New Waveform to open nWave and load rtl.fsdb
ƒ D&D between nWave and nTrace or Active annotation on
nTrace
ƒ It don’t work
ƒ Specify virtual top file “vtop.map” when import design
ƒ Verdi –vtop vtop.map –f ALUB.f –ssf rtl.fsdb &
ƒ Check the hierarchy
ƒ D&D between nWave and nTrace or Active annotation on
nTrace
ƒ It works
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
ƒ Analyze Multi-Clock-Domains in Design
ƒ
ƒ
ƒ
ƒ
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Analyze Multi-Clock-Domain
ƒ Common Problem
ƒ There are too many clock domains in a design
ƒ Hard to check data path crossing different clock
domain to satisfy synchronization
ƒ Verdi Solution
ƒ Extract Clock Domain to analyze how many
clock domains in a design
ƒ Find Crossing Paths to find out data path
crossing different domain and check out
synchronizer simultaneously
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Extract Clock Domain(1/3)
ƒ Purpose
ƒ extract all clock domains in design
ƒ Usage
ƒ nTraceÆ ToolsÆ Clock AnalyzerÆ Extract
Clock Information
ƒ nSchemaÆ TraceÆ Clock AnalyzerÆ Extract
Clock Information
ƒ nTraceÆ FileÆ Load Clock Domain Result
To load the previous result
ƒ Support to set known clock source &
constant signals
ƒ Support to read SDC to map these settings
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Extract Clock Domain(2/3)
specify
specifyknown
knownclock
clocksource
source
specify
specifyconstant
constantsignals
signals
D&D signals
into the field
Input the
constant value
Import/Export
Import/ExportSDC
SDCconstraints
constraints
Save/Load
Save/Loadsettings
settings
click
clickOK
OKto
tostart
startextraction
extraction
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Extract Clock Domain(3/3)
1.
1.AAclock
clocksource
sourcetree
treeisis
established
establishedto
toshow
show
root/generated
root/generatedclocks
clockswith
with
the
thestorage
storageelements’
elements’
numbers
numbers
2.
2.Select
Selectspecific
specificdomain
domainto
to
show
showby
byschematics
schematicsor
ortext
text
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Highlight Clock Domain(1/2)
ƒ Purpose
ƒ Useful to identify different clock domain
when debugging
ƒ Usage
ƒ SchematicÆ TraceÆ Clock AnalyzerÆ
Highlight Clock Domains
ƒ The color applies to all schematic
windows
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Highlight Clock Domain(2/2)
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Check Crossing Paths(1/3)
ƒ Purpose
ƒ Find crossing paths
ƒ Check synchronizer
ƒ Usage
ƒ Extract or load clock domain at first
ƒ SchematicÆ TraceÆClock DomainÆ Check Crossing Paths
ƒ Support multiple-to-multiple crossing paths check
Specify
Specifysynchronizer
synchronizer
Select
Selectmultiple
multipleFrom/To
From/To
Domains
Domainsto
tocheck
check
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Check Crossing Paths(2/3)
Use
Usepredefine
predefinesynchronizer
synchronizertemplate:
template:
sync_1:
sync_1:One
OneFF/Latch;
FF/Latch; sync_2:
sync_2:Two
TwoFFs/Latches
FFs/Latches
DMux:
DMux:Specified
SpecifiedDMux
DMuxto
tohold
holdTo-domain
To-domainsignal
signal
or
orpass
passFrom-domain
From-domainsignal
signal
sync_module:
sync_module:Specify
Specifythe
thesynchronizer
synchronizermodule
module
Manually
Manuallyedit
editcircuits
circuitsto
tospecify
specifysynchronizer
synchronizer
Design Better
Debug Faster
Analyze Multi-Clock-Domain
Check Crossing Paths(3/3)
Select Crossing Paths with Register Pair
to show details in text file or schematics
Crossing paths with desired synchronizer
Lab8 (1/3)
Design Better
Debug Faster
Extract Clock Domain to analyze clock domains in a
design
ƒ Invoke Verdi and import design
ƒ ./RUN
ƒ Open Clock Tree Setting form by Tools Æ Clock
Analyzer Æ Extract Clock Information
ƒ Click “Import SDC Format” to load “demo_dac.sdc”
(Enable the option “Append”) and then click OK
ƒ Enable the option “Enable Known Constant”, and then
click “Mode” button
ƒ Select the “Cell Port” tab in the Mode form
ƒ There are constraints for different cells
ƒ Click OK to go back to the Clock Tree Setting form
Design Better
Debug Faster
Lab8 (2/3)
ƒ Enable only “Show Clock Domains” option in the bottom of
Clock Tree Setting form, and then click OK
ƒ In the clock domain browser, you can easily recognize the structure of
each clock domain and its clock source and leaves
ƒ The number 1, 2, and 3 means the clock root, 1.f represents falling
edge triggered registers under domain1.
ƒ In the clock domain browser, Tools Æ Highlight Clock
Domains to set the color of different clock domains in the
schematic window.
ƒ In the clock domain browser, click New Schematic
icon
to see the schematic.
Find Crossing Paths between different domains and check
out synchronizer simultaneously
ƒ Open Check Crossing Paths form by invoke Tools Æ Check
Crossing Paths in the clock domains form
Design Better
Debug Faster
Lab8 (3/3)
ƒ Click
in “From Clock Domain:” and “To Clock Domain:” to add all
clock domains
ƒ Click the tab “Synchronizer Settings” in the Check Crossing Paths form
ƒ Click “Edit” button and choose Template sync_1 Type_A and then click
“OK” button
ƒ Click the tab “CDC Setting”
ƒ Click Convergence, Divergence, and Reconvergence in the CDC Correlation
Option field, then click OK
ƒ In the crossing paths browser, you can easily check the synchronizer
information or even CDC correlations information.
ƒ Click the banner of “Convergence” to sort the checked path
ƒ Select the first line on the “CDC Correlation Details” field and click New
Schematic
icon
ƒ In the schematic, invoke View Æ High Contrast to display the
highlighted color more clearly.
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
ƒ Analyze Clock Distribution in Design
ƒ Assertion-Based Verification by SVA
ƒ Debug SystemVerilog Design
ƒ Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Analyze Clock Distribution
ƒ Common Problem
ƒ Easy to lose completeness while preparing CTS
constraints for APR tool
ƒ Clock tree is too complex to isolate and browse
ƒ Qualifying and then re-balancing clock tree
takes too much time and iteration
ƒ Verdi Solution
ƒ CTS Constraint Checker to import SDC or
existing CTS constraints and export new
settings for the usage by popular APR tool
ƒ Tabular Clock Tree Browser to examine tree
composition and level information
ƒ Locate worst clock skew and show histogram of
delay distribution
Design Better
Debug Faster
Analyze Clock Signal
ƒ In nTrace, invoke Tools Æ New Schematic Æ Clock Tree
to open the Clock Tree Setting form.
Clock Tree Browser window will
show the clock structure to
observe the quality of one tree
D&D one or more clock signals
to Clock Source table.
Click to open Load
SDC form.
Show the schematic of the
clock structure
Design Better
Debug Faster
Apply Constant Settings
Click to open
Mode dialog form
D&D signals
into the field
Input the
constant value
Click to create
new mode
Turn on
the option
The clock tree
structure will be
changed accordingly
Write out correct
SDC constraint
for Synthesis tool
Design Better
Debug Faster
Qualify CTS Script (1/2)
ƒ In the Clock Tree Browser window, invoke Tools Æ
CTS Constraint Checker
Means the setting will be locally under top.TX.tx_clk2
The setting will reflect to the table
Design Better
Debug Faster
Qualify CTS Script (2/2)
ƒ Re-extract the Clock Tree and Output the CTS Constraints File
Choose the Vendor type
Verify Clock Tree Quality (1/2)
Design Better
Debug Faster
ƒ Analyze CTS Result on Clock Tree Browser after re-extracting
the Clock Tree with modified CTS
There are total 75 registers
Set local stop pin on
convergence node
There is only 1 register
Verify Clock Tree Quality (2/2)
Design Better
Debug Faster
ƒ Import the SDF file by invoking File Æ SDF Æ Load SDF
Files in the Clock Tree Browser window
D&D histogram to the Clock Tree Browser
window and the registers are highlighted
View the delay information on Clock
Tree Browser window
Select two clock trees at the same time
and then invoke histogram
Lab9 (1/5)
Design Better
Debug Faster
Use CTS Constraint Checker to import SDC or existing CTS
constraints and export new CTS settings for APR tool
ƒ Invoke Verdi and import design
ƒ ./RUN
ƒ Open Clock Tree Setting form by Tools Æ New Schematics
Æ Clock Tree
ƒ Click “Import SDC Format” button to load TOP1.sdc, and
then click OK button
ƒ Click tab “Options” of Clock Tree Setting form and enable
the option “Stop on Floating Gate”, then click OK button
ƒ In the clock tree browser, you can easily recognize the clock tree
structure
ƒ In the clock tree browser, invoke Tools Æ CTS Constraint
Checker
Design Better
Debug Faster
Lab9 (2/5)
ƒ On the “Find Nodes” tab, enable the options “Primary Output Port”
and “Floating Gates”.
ƒ In the “Check Convergence Nodes” tab, select “top.tx_clk1” and
“top.tx_clk2”
ƒ Click the upper “>” button and the lower “>” button to add both
clocks into the “First Clock” and “Second Clock” section.
ƒ Click OK button to open CTS Constraint Checker Result window.
ƒ Select row 1 and then click the “Set to Stop” button.
ƒ The top.cko instance is the primary output
ƒ Select row 2 and then click the “Set to Ignore” button.
ƒ The top.u_ck100 instance is the floating gate
ƒ Select the “Check Convergence Nodes” tab.
ƒ There are two convergence nodes.
ƒ Switch “Group” to “top.tx_clk2”, click “Set to Stop” button to set the
two convergent nodes as stop points and as the local CTS constraints.
ƒ Click the “Close” button.
Design Better
Debug Faster
Lab9 (3/5)
Re-extract the Clock Tree and Output the CTS Constraints File
ƒ Open Clock Tree Setting form by Tools Æ New Schematics
Æ Clock Tree
ƒ Click the “CTS” tab and select “Local CTS” tab and clock
source: “top.tx_clk2”
ƒ You can see the local constraints for top.tx_clk2
ƒ Click the “Global CTS” tab
ƒ You can see the different constraints such as Stop Type and Ignore
Type.
ƒ Click the “Export Constraints” button
ƒ Choose the Vendor type as “FirstEncounter” and key in the file name.
Click OK button
ƒ Review the constraint file that you exported.
ƒ Click OK button in Clock Tree Setting form to Re-extract the
clock tree.
Design Better
Debug Faster
Lab9 (4/5)
Use Clock Tree Browser to examine tree composition
and level information
ƒ How many registers under the clock top.tx_clk2? 0
ƒ Expand clock tree of “top.tx_clk2” to show the leaf nodes
ƒ The multiplexer MUX21H is denoted as a “CTS Stop Pin”
ƒ Select the first row for clock source “top.tx_clk1”, and then
scroll right to see the column Min and Max level to leaves
ƒ What are the max and min number of level to leaves? Min: 7
Max: 11
Locate worst clock skew and show histogram of
delay distribution
ƒ Invoking File Æ SDF Æ Load SDF Files in the Clock Tree
Browser and select file “top_g1.sdf”
Design Better
Debug Faster
Lab9 (5/5)
ƒ Invoke View Æ Configure Level Columns in clock tree browser
ƒ On the Configure Columns form, click “<<” button to remove all the columns
ƒ Only add the “Full instance Name”, “Delay from Source”, “Delay to Leaves”
and “Skew to Leaves” to the right panel by selecting each target item and
then clicking “>” button on by one.
ƒ Click OK.
ƒ The clock skew and delay information are shown in the browser
ƒ Click the minus sign “-” in front of all MUX21H to collapse the results
belong clock source top.tx_clk1
ƒ Select the two “MUX21H” rows (by CTRL key) and then click the
histogram toolbar icon.
ƒ In the histogram, the X-axis shows the delay values while the Y-axis shows the
number of leaf nodes. The distributions of each clock tree are show by color.
ƒ Take the tallest bar as an example; there are 37 registers whose insertion
delays are between 2.83 and 2.89.
ƒ In nSchema, enable Schematic Æ Auto Fit Found Object(s) and then
D&D the most left blue bar to the nSchema window.
ƒ It is the output port that you set Stop.
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
ƒ Assertion-Based Verification by SVA
ƒ Debug SystemVerilog Design
ƒ Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Assertion-Based Verification by SVA
ƒ Common Problem
ƒ Hard to display assertion results as waveforms
along with design signals
ƒ Need to manually analyze the assertion construct
and calculate values
ƒ Checking new or modified assertions needs rerunning simulation
ƒ Verdi Solution
ƒ Use Property Tools, which include Assertion
Analyzer and Assertion Evaluator, to do
efficient debug
Design Better
Debug Faster
View SVA – Hierarchy Browser
and ‘generate’ in nTrace
Hierarchy can be
expanded/ collapsed by
clicking on +/- sign or
double-clicking.
Double-clicking also
changes scope.
Special icons for SVA
asserts, properties,
sequences, covers.
Assertion structure is
represented hierarchically.
Each generate instance is a scope
in the hierarchy browser with its
elements (assertion/ property/
sequence).
View SVA – Source Code Tracing
Design Better
Debug Faster
Double-click
Double-click
Trace Drivers and Loads
Double-click
View SVA – Statistics and Details
Design Better
Debug Faster
Two types to view
D&D from the table to
source code or waveform.
Design Better
Debug Faster
Source Code Annotation
ƒ Visualize data next to the variable in the source
code by enabling Source Æ Active Annotation
Cursor time sync’ed
with waveform.
NF (Not Found) since we are ‘inside’
the INCPC scope. To see data,
change scope to e_INC…
Scope changed to e_INC so now
proper annotation is shown.
Design Better
Debug Faster
View Assertion Simulation Results
Start of assertion evaluation
Double-Click
Blue Area -> No Activity
(NV = No Value)
Assertion fail.
Design Better
Debug Faster
Assertion Analyzer (1/2)
INCPC2 failed at time 700!
DC on assertion signal waveform to
invoke Assertion Analyzer
Select the property detail that
you want to debug and …
…DC on the selection
or click Analyze.
Design Better
Debug Faster
Assertion Analyzer (2/2)
Assertion “INCPC2” failure
caused by property e_INC2
Property e_INC2 failure caused
by sequence e_r2 failed.
Sequence e_r2 failure caused
by expression FALSE.
Invoke Temporal Flow View to debug
Design Better
Debug Faster
Assertion Evaluator
Prior to running the Assertion Evaluator,
SVA sequences properties do not have
simulation values.
Invoke to run Assertion Evaluator
After running Assertion Evaluator,
SVA sequences and properties
have simulation values.
Lab10 (1/4)
Design Better
Debug Faster
Trace assertion codes and view simulation result on waveform and
property tool and then debug with assertion analyzer
ƒ Invoke Verdi
ƒ verdi –f run.f –ssf sv.fsdb –sv &
ƒ In the nTrace hierarchy browser, expand “i_cpu” and “i_ALUB” to
show the SVA assertion codes
ƒ Double-click on “ALU_SUB” to show the assert code and related
property
ƒ Double-click on “CHECK_SUB” to show the property code and related
sequence.
ƒ See the symbols in the hierarchy browser
ƒ Double-click on “e_SUB” to show the sequence code
ƒ In nTrace, invoke Tools Æ Property Tools
ƒ You can see all the properties in the design on FSDB Statistics tab or
Property Statistics tab. This will display the results as a summary of
success/fail per assertion in the table
Design Better
Debug Faster
Lab10 (2/4)
ƒ On “FSDB Statistics” tab, double-click “Assert” type and it will show to
“Property Detail” pane.
ƒ D&D the “INCPC2” assertion from the Property Tools window to nWave
ƒ The Success/Failure will shown in nWave
ƒ In nTrace, enable Source Æ Active Annotation.
ƒ Double-click on “INCPC” to show the source code and use the search
forward/backward icons
to step through changes on the assertion
ƒ In nWave, double-click on “INCPC2” to expand the property and signals.
ƒ Double-click on “e_INC2” to expand the sequence and signals.
ƒ Double-click on “e_r2” to expand the signals and local variable.
ƒ Double-click on “ALU_prev” to expand and show the different attempts
ƒ Double-click failure arrow at 700ns of “INCPC2” in nWave to open
Assertion Analyzer window
ƒ On the Assertion Analyzer window, you can check the assertion code failure
causes and invoke Temporal Flow View to debug
ƒ In nTrace, File Æ Exit
Lab10 (3/4)
Design Better
Debug Faster
Check new or modified assertions without re-running
simulation
ƒ Invoke Verdi
ƒ verdi –f run.f –ssf rtl.fsdb –sv &
ƒ In the nTrace hierarchy browser, double-click on “i_cpu” to
expand and then expand “INCPC”, “e_INC” and “e_r”.
ƒ In nTrace, enable Source Æ Active Annotation.
ƒ You can see
and even use the search forward/backward
icons , the value is still NF, Not Found.
ƒ In nTrace, invoke Tools Æ Property Tools
ƒ In Property Tools window, invoke Evaluator Æ Disable All
Props to disable all property in Tree or Table tab.
Design Better
Debug Faster
Lab10 (4/4)
ƒ Enable the “INCPC” on Tree or Table tab.
ƒ Invoke View Æ Options, change the “Store:” from
“Asserts Only” to “All” and then Click OK
ƒ Invoke the icon
to evaluate enabled assertion code.
ƒ Click “Yes” when question window is shown
ƒ In nTrace, use the search forward/backward icons
then you can see the values of assertion codes are
annotated
ƒ D&D the “INCPC” assertion from the nTrace window to
nWave and then see the Success/Failure on nWave
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
ƒ Debug SystemVerilog Design
ƒ Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Debug SystemVerilog Design
ƒ Common Problem
ƒ Need an efficient method to study and/or debug
SystemVerilog source codes with simulation
results
ƒ Require an environment for analysis between
different languages designs
ƒ Verdi Solution
ƒ Able to compile and import the SystemVerilog
design into Novas debug platform
ƒ Support generate construct
ƒ View SystemVerilog simulation results in nWave,
annotate on the source codes, or automatically
trace paths in Temporal Flow View
Design Better
Debug Faster
Import SV Design into Verdi
SystemVerilog
.sv
SystemVerilog
.sv
SystemVerilog
Verilog2k
.v2k
Verilog
Verilog2k
.v2k
Verilog
vericom -sv
vericom -2001
verdi -sv
verdi +verilog2001ext+.v2k+ \
+systemverilogext+.sv+
vericom
.lib++
(KDB)
verdi –lib .. -top ..
View SystemVerilog in nTrace
Design Better
Debug Faster
Each generate
instance is a scope
in the hierarchy
browser with its
elements.
Interface
Trace Driver and Active Trace
Design Better
Debug Faster
DC to trace driver
D&D to nWave to
show waveform
DC to trace active driver,
Active Trace
Design Better
Debug Faster
View Simulation Results – Waveform
ƒ Elements of complex signals can be
expanded by double-clicking the name in
nWave and shown as individual signals.
Double-click
Design Better
Debug Faster
View Simulation Results – Active Annotation
Step forwards/backwards in
time.
Values for current time will
be annotated.
View Simulation Results –
Parameter Annotation for ‘generate’
Design Better
Debug Faster
ƒ To ‘compute’ and annotate variables
inside a generate block (genvars)…
Value for “current” scope will
be annotated.
Design Better
Debug Faster
Debug SV by Temporal Flow View
Select debug point and RMB
to create Temporal Flow View
Design Better
Debug Faster
Lab11 (1/2)
Debug with SystemVerilog Design
ƒ Import system verilog design (2 way)
ƒ Verdi –f run.f –sv –ssf sv.fsdb &
ƒ Verdi –f run.f +systemverilogext+.sv+.SV+ –ssf sv.fsdb &
ƒ In the nTrace hierarchy browser, expand “i_cpu” and “i_ALUB” to
show the SV code.
ƒ Double-click on “carry_mode” to trace driver.
ƒ Click the New Schematic icon to show the “i_CCU” SV code in the
schematic view.
ƒ Drag and Drop the “i_alu” instance from nTrace hierarchy browser to
nWave to show the related waveforms.
ƒ In nWave, double-click the transition to value 55 at time 950 on
signal out to locate the active driver.
ƒ (Note: some of the signals are complex structures.)
ƒ In nTrace, enable Source Æ Active Annotation.
Design Better
Debug Faster
Lab11 (2/2)
ƒ In nTrace, scroll the “i_alu” source code to locate the
“Nbit_adder” instantiation and double-click the instance
name to locate the code.
ƒ The module includes a generate statement and there are multiple
'instances' shown in the hierarchy browser.
ƒ In the hierarchy browser, double-click on “addbit[2]” to
show the code.
ƒ In nTrace, enable Source Æ Parameter Annotation to
display the local variable values.
ƒ In the hierarchy browser, double-click on “addbit[6]” to
show the code.
ƒ The code is the same as before; however, the local variable values
are different.
Design Better
Debug Faster
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Debug Workshop Agenda
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
ƒ Debug Timing Problem after Post-Simulation
Design Better
Debug Faster
Debug Timing Problem after Post-Sim
ƒ Common Problem
ƒ Difficult to trace the transition resulted from
delay of combinational logics
ƒ Can’t combine timing information and function
into an isolated debug platform
ƒ Verdi Solution
ƒ Import timing reports by multiple STA tools
into Verdi to debug critical paths
ƒ Use Temporal Flow View to automatically
find out the root cause of a wrong transition
ƒ Use Siloti Replay to incrementally regenerate
waveforms for only the time range of interest
with accurate timing accuracy
Design Better
Debug Faster
Import Timing Report
ƒ Use utility to translate report file into Verdi readable xml format.
ƒ Ex: astrol2Xml.pl prime_time.rpt –o <output_file_name>
ƒ File Æ Import Path Data File… Æ Select XML file
ƒ Support scripts: AMBIT.pl, DC.pl, EinsTimer.pl, magma.pl,
pearl.pl, astro2Xml.pl, HAL2Xml.pl, RTLC2Xml.pl
Show Timing Report Paths(1/2)
Design Better
Debug Faster
List
ListPaths
Pathsbased
basedon
on
Timing
TimingReport
Report
Show
Show path
path by
by different
different sorting
sorting types
types
Enter
Enter *mux_sel*
*mux_sel* in
in the
the Names
Names of
of Start
Start
Point
Point field
field and
and click
click Add
Add and
and then
then OK
OK
Show
Show path
path in
in schematic
schematic or
or text
text
Show Timing Report Paths(2/2)
Design Better
Debug Faster
ƒ Show detail path information in schematic or text
ƒ Support Drag & Drop interested delay from text to highlight in
schematic view
File View
Schematic View
D&D from text to
schematic view
Trace Load to find
out the reason why
delay is so large
Lab12-1
Design Better
Debug Faster
Convert timing report and import it to debug
ƒ Invoke Verdi
ƒ ./RUN
ƒ (nTrace or nSchema) File Æ Import Path Data File Æ
Select the test.xml file
ƒ Enable the option: “Enable Sort” in Timing Report window
ƒ Click “Ascending” on “Sort Slack Time By:”
ƒ Investigate into the most serious timing-violated path
ƒ
ƒ
ƒ
ƒ
Show this path on nSchema
Show this path on File Viewer
D&D the 42.860 delay from File Viewer into nSchema
Debug the reason of this huge delay on schematic window
ƒ Tools Æ New Schematic Æ Connectivity
Design Better
Debug Faster
ƒ
Trace Triggering Path (1/3)
After comparing carry_flag in both RTL and gate level waveform, there is
a mismatch
ƒ The transition of carry is too slow to be triggered by carry_flag’s clock
ƒ
Use Transition Based of Temporal Flow View to automatically find out
the cause to make the carry ‘s slow transition
Select debug point and RMB
to create Temporal Flow View
Design Better
Debug Faster
Trace Triggering Path (2/3)
The time from the first FF trigger to
the carry trigger is 53.4ns
Fit Time to display the entire path from
the first FF trigger to the carry trigger
Trace back to find out which
path and register to trigger
the carry signal
Design Better
Debug Faster
Trace Triggering Path (3/3)
Zoom in around the FF at time
4650.39 and select the output of the
FF and then press ctrl-k to add the
clock signal to the waveform
Compare the carry FF's clock to the
carry_flag FF's clock,T2, there is
50.43 ns to meet time
We can quickly to
get that the delay
from carry to FF’s
clock exceeds ~3ns
Lab12-2 (1/2)
Design Better
Debug Faster
Use Trace Triggering Path to Automatically find out the root cause of
wrong transition caused by timing issue
ƒ Invoke Verdi
ƒ ./RUN
ƒ Select “carry_flag” in both waveform windows
ƒ In the gate nWave (with gate.fsdb), use Tools Æ Waveform Compare
Æ Compare 2 Signals to compare “carry_flag” from two FSDB files
(gate v.s. rtl)
ƒ Use the search mechanism to find the mismatch
ƒ The first mismatch starts at time 4700 ns
ƒ Select the “carry” and change cursor to transition at time 4703.94
ƒ Click RMB Æ Create Temporal Flow View
ƒ Set the working scope to “system” and enable “Transition Based”, then
click OK
ƒ In the Temporal Flow View, select the “carry” output port and invoke
RMB Æ Trace Triggering Path
Design Better
Debug Faster
Lab12-2 (2/2)
ƒ In the “Set Triggering Option” form, select “Stop at
Register Boundary” as the stop criteria and click OK
ƒ Scroll to show the tracing path and then invoke View
Æ Fit Time to display the entire path
ƒ You can see the time from the first FF trigger to the carry
trigger is 53.4ns
ƒ Zoom in around the FF at time 4650.39, select net
“n10” and press Ctrl-k
ƒ This adds the clock signal to the waveform
ƒ You can compare this FF's clock “clock” to the carry_flag FF's
clock “T2” to see there's 50.43ns to meet time
ƒ The carry FF’s clock exceeds by ~3ns
Siloti Data Replay
Design Better
Debug Faster
Configurations
SDF File
Partial
Dump File
Simulators
Regenerate
time-precise
Waveforms
for specific
time-period
sPLI Library
PLI Library
Debug
timing
issues
Patent Pending Technology
Dump
With
Delay
Design Better
Debug Faster
Siloti Data Replay Application
Initial timing simulation with
Essential Signal dump
ES
FSDB
SDF
Minimal overhead
vs. simulation with
no dump
ƒ
ƒ
Run initial timing simulation and
capture
data for essential signals
Debug to locate problematic logic and
time
window
ƒ
Verdi &
Siloti
Debug to narrow logic and
Time window
ƒ
Skip!
0
t
Fast,
focused
simulation
ƒ
ƒ
FSDB
Debug to find root cause
Invoke Siloti Replay and re-simulate
suspect
time window
ƒ
Siloti Replay re-simulates only
suspect time windows
Iterate for other ƒ
time windows
Verdi &
Siloti
Use built-in monitors and assertions
and Verdi+Siloti with cycle-accurate
data expansion
Jumps to beginning of time window –
no need
to simulate from time 0
Captures full set of signals for specified
window
Debug to isolate root cause of timing
problem
ƒ
Verdi advanced debug capabilities
ƒ
Based on same essential signal dump
Repeat focused simulations as
needed
Perform Behavior Analysis for Replay
Design Better
Debug Faster
ƒ In the hierarchy browser pane select the desired working
scope, invoke the right mouse button menu and choose
Behavior Analysis or choose Exploration Æ Behavior
Analysis
Essential Signal Analysis – GUI
Design Better
Debug Faster
ƒ In Siloti nTrace, invoke Visibility Æ Essential
Signal Analysis Æ Analyze by Scope.
Click Options tab
to see additional
options.
1. Specify the top level scope to
generate essential signals for.
Optional - specify
multiple scopes
and the probe
criteria.
Optional - enable
to save settings
to novas.rc.
2. Specify the output
file name and file
format. Hierarchical
format is recommended
for simulation; plain list
is better for readability.
Enable to create
ES list for Replay.
Design Better
Debug Faster
Generate Essential Signal FSDB
ƒ Replace $fsdbDumpvars with
$fsdbDumpvarsToFile, e.g.
ƒ $fsdbDumpvarsToFile(“es.list”, “myfsdb.fsdb”);
(Verilog)
ƒ fsdbDumpvarsToFile(“es.list”, “myfsdb.fsdb”);
(VHDL)
ƒ Run simulation to generate essential signal
FSDB.
Design Better
Debug Faster
Replay Configuration File
ƒ In Siloti nTrace, invoke Visibility Æ Replay Æ
Configure Replay.
1. Specify essential
signal dump file.
2. Specify
start/end time.
3. Specify replay
configuration file.
4. Click OK to
create file.
ƒ Resulting “replay.config” file:
esd_fsdb = “esd.fsdb”;
time_unit = 1ns;
{ start_time = 1000;
= 3000;
} end_time
Design Better
Debug Faster
Run Replay Simulation
ƒ Add $fsdbReplay to the testbench
using compiler directives for Replay.
For example:
`ifdef REPLAY_MODE
initial
begin
$fsdbReplay(“replay.config”);
$fsdbDumpfile(“replay.fsdb”);
$fsdbDumpvars(0, tb.dut);
end
`endif
Design Better
Debug Faster
Enable Verdi for Debug
Click to enable full menus and toolbar.
All Verdi debug
functions are available.
Replay specified timing
range waveform to debug
Design Better
Debug Faster
Debug Workshop
For technical support in
China, please call:
021-54902090
On www.springsoft.com,
you can find more useful
applications from Verdi.
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
ƒ
Design Import and Dumping
Trace Signal with Wrong Value
Debug Memory
Trace Unknown Value
Reduce Simulation time and FSDB
Size
Compare Simulation Waveforms
Arrange and Simplify Massy Circuits
Import Design Faster
Analyze Multi-Clock-Domains in
Design
Analyze Clock Distribution in Design
Assertion-Based Verification by SVA
Debug SystemVerilog Design
Debug Timing Problem after PostSimulation
Download