Professional Documents
Culture Documents
Eugene Ho
September 2018
Motivation
Efficient SV/UVM Testbench Debug
Rapid Root-Cause Analysis with Reverse Debug
What-if Analysis to Improve Testbench Debug Turn-Around Time
10x Billion+
1T Gates SoCs
• 200M+ gates mobile SoC
• 50+ IPs per SoC
• 100+ power domains
10M
Shrinking
Time-to-
1995 2000 2005 2010 2015 2020 Market
250nm 90nm 40nm 28nm 14nm 10/7/5nm Windows
Source: Synopsys
Constraints Coverage
Embedded
RTL/Gate Analog
Processor
Motivation
Efficient SV/UVM Testbench Debug
Rapid Root-Cause Analysis with Reverse Debug
What-if Analysis to Improve Testbench Debug Turn-Around Time
Testbench Debug
Complexity
Scale Volume
Block to sub-system to system Amount & complexity of functionality to verify
Signal-level to Protocol-level Use of IPs in design
Stack Browser
• Full Visibility
• Source code, dynamic
objects, watch list etc.
• Call stack, members, local
variables etc.
Watch Views
Class Object
Browser Browser SmartLog Log • Powerful Capabilities
Viewer
• Trace value assignment
into testbench
• Perform what-if analysis
• Enable day-to-day and batch
simulation debug
© 2018 Synopsys, Inc. 8
Key Elements for Efficient SystemVerilog TB Debug
Class Browser
Class hierarchy, methods,
instances, member values
SmartLog: Powerful
Interactive Console
Watch
Class instance
breakpoint
Factory Domains/
Resource DB Phases
Motivation
Efficient SV/UVM Testbench Debug
Rapid Root-Cause Analysis with Reverse Debug
What-if Analysis to Improve Testbench Debug Turn-Around Time
Restart
Rerun Simulation
Simulation
Simulation Simulation
Time 0 Time 0
Done
Simulation
Time 0
NO
Restart Saves Hours of Simulation
Needed
Go Back to ANY
Point in Time Step back
w/ Reverse Debug
© 2018 Synopsys, Inc. 13
Finding Failures
Diagnose and Debug - Moving forward and backward in time
Done
Simulation
Time 0 Test FAIL
• Example :
Why does the class member m_sequence_id have the value 98?
Sets the context to the value assignment of the member with full visibility and navigation
(source view, call stack, locals, …)
Simulation
Time 0 Test FAIL
Repeat if needed
Motivation
Efficient SV/UVM Testbench Debug
Rapid Root-Cause Analysis with Reverse Debug
What-if Analysis to Improve Testbench Debug Turn-Around Time
No Activity on
sig_request[1]
Set Breakpoint
Set Breakpoint
Reverse Debug
Breakpoint Hit
Variable itr is
the incorrect
value of 0
Right Click
Change Value
Run simulation
forward based on
itr=20
Waveform at time 0
showing no
transitions - yet
Activity on both
sig_request[0]/[1]
UVM Debug
Reverse Debug
uvm_config_db call
to retrieve/get the itr
var for configDB
Incorrect
uvm_config_db
set/get command.
This is the UVM/TB
bug!!
• Reverse Debug
– Run forward and backwards for
improved debug efficiency
• UVM-Aware Debug
– Phase Debug
– Sequence Debug/ Transaction Debug
– Resource DB Debug
• What-If Analysis
– No need to restart a interactive debug
session
– Test cause & effect changes during
interactive debug session
KienPham
Renesas Design Vietnam
SNUG 2018 31
INTRODUCTION
SNUG 2018 32
Agenda
SNUG 2018 33
Overview of verification management
SNUG 2018 34
Overview of verification management
Verification management challenging
System Usecase
verification verification
+45%
+15% Static
Unit
connection
verification
verification
Verification item volume increase drastically, how to manage without any missing ?
Reporting time, specially in regression for 30K items, is feasible for human work ?
Verification type become more diversity, how to merge them in verification report ?
SNUG 2018 35
Overview of verification management
Verification management challenging
Customer
requirement “Mission to find a solution to
1 succeed the verification
Defining Target Defining test item management in large scale
specification list
and complicated design”
Creating test
Creating RTL code
Pattern
2
Defining implement Creating With condition :
specification simulation
environment
Minimize change of design flow.
3 Not broken simulation environment.
Synthesize RTL Executing Cost investment is acceptable.
to Gate netlist simulation
4
Next ME/BE process Making verification
Result report
SNUG 2018 36
Overview of verification management
VerdiPlanner introduction
Simulation
execution
result
Synopsys
coverage Verification End user
database planner application
SNUG 2018 38
Verification management by VerdiPlanner
VerdiPlanner adoption flow
Customer
requirement
Creating test
Creating RTL code
Pattern
2
Defining implement Creating
specification simulation Merge test pattern
environment
simulation log file, make
3 Pass/Fail judgement
Synthesize RTL Executing
to Gate netlist simulation
4
Next ME/BE process Making verification
Execute VerdiPlanner at
Result report post simulation
SNUG 2018 39
Verification management by VerdiPlanner
VerdiPlanner adoption flow
Creating test
Pattern
Creating
simulation Verification item Pattern Judgement
environment content measurement area
Updated verification plan
Executing
simulation
Making verification
Result report
SNUG 2018 40
Verification management by VerdiPlanner
VerdiPlanner adoption flow
Creating test
Pattern
Creating
simulation Top verification plan
environment
Lower hierarchy verification plan
Executing
simulation
Making verification
Result report
SNUG 2018 41
Verification management by VerdiPlanner
VerdiPlanner adoption flow
“fail”
Creating test
Pattern
“pass”
Creating
simulation
environment
Conversion Determinations keyword by testbench:
utility “Error”, “Normal End”
Executing
simulation sim_check.txt
Making verification
Result report
SNUG 2018 42
Verification management by VerdiPlanner
VerdiPlanner adoption flow
SNUG 2018 43
Verification management by VerdiPlanner
Simulation result automation management
After Verdi Planner execution, verification result will be filled automatically from text file Pass/Fail judgement.
Hierarchical verification plan report & hyperlink permit easy tracking/detect Pass/Fail result by a click.
TOP plan Summary report
Module report
Urg Coverage
report
SNUG 2018 44
Achievement
SNUG 2018 45
Achievement
~10x reporting time reduction
12
10
0
Block 1 Block 2 Block 3 Block 4 Block 5
Manual VerdiPlanner
SNUG 2018 46
Achievement
Verification missing findings when applying VerdiPlanner
Verification item missing cases
OK
OK
Missing
25
20
15
10
0
Block 1 Block 2 Block 3 Block 4
SNUG 2018 47
Achievement
Automatically collect , check & export the verification result
SNUG 2018 48
Achievement
Integrate visualize verification progress from VerdiPlanner database
6/7/2018 6/8/2018 6/9/2018 6/10/2018 6/11/2018 6/12/2018 6/13/2018 6/14/2018 6/15/2018 6/16/2018 6/17/2018 6/18/2018
TOP_BLOCK T o t a l i t e m 1619 1619 1619 1619 1619 1619 1,619 1,619 1,619 1,619 1,619 1,619
Completion item 389 389 389 389 389 632 1,000 1,021 1,021 1,100 1,100 1,350
Remained item 1230 1230 1230 1230 1230 987 619 598 598 519 519 269
Digestibility 24.03% 24.03% 24.03% 24.03% 24.03% 39.04% 61.77% 63.06% 63.06% 67.94% 67.94% 83.38%
SNUG 2018 49
Conclusion
SNUG 2018 50
Thank You
SNUG 2018 51
Additional Slides
Debugging Constraints
Constraints
Constraint to describe
complexity valid
grows Unfamiliar
Extensivecode is to
reuse difficult to
expedite
with design stimulus debug development
Behavior Coverage
Checker Observer
Design Under Test (DUT)
• Partitioning
– Simpler to solve many small pieces than one large puzzle
– Unrelated variables are places into separate partitions
– No interaction between partitions
– May have hundreds of unrelated partitions
– Related variables are solve in a single partition
– Become state variables in later partitions
Solving Partiton 1
class packet; rand bit[7:0] a; // rand_mode = ON
...
rand bit [7:0] a;
a = 10; Partitioning
rand bit [7:0] b;
rand bit [7:0] c; Solving Partition #2
constraint cst { b < c; } rand bit[7:0] b; // rand_mode = ON
endclass rand bit[7:0] c; // rand_mode = ON
...
Small class example constraint cst {b < c;}
...
b = 20;
© 2018 Synopsys, Inc. 54 c = 100;
Debug Starts Here
• Find the randomize call to debug first • Run until breakpoint
Source code
Constraint Debugger
Interactive constraint
commands
Example of a
rt constraint (runtime)
No Re-Compile!
© 2018 Synopsys, Inc. 57
On-the-fly Re-randomization
Immediate feedback on cause-effect relationship
No Restart
Turning OFF
“src_range_cst”
constraint block fixes
the failure
Original Re-Randomize
Randomize