Coverage WS Overview
Coverage WS Overview
RAK Overview
This also includes Incisive 12.2 workshop/labs overview
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
Download Workshop Click here -> Coverage Workshop
2
DMA
Memory
AHB
Parallel
APB bus
Bridge
APB
APB
UART
UART
Serial UART
protocol
3
UART
Serial
Core
USB
Ethernet
UVM Testbench
Scoreboard
Imitates external
device by
generating frames
Programs the
UART and
transfers traffic
APB
Tx FIFO
txd
Transmitter
APB
Interface
Mode
Switch
Rx FIFO
Receiver
Control/Status
Registers
UART
Serial
rxd
UART
Verification
Component
Control/Interrupt
Logic
Multi-channel controller
Test 2
Test 3
DUT
Least effective
in finding the
hidden bugs
Test targets
Coverage Driven
Results
G
Coverage
CG1
CG2
CG3
CG4
DUT
Coverage targets
Metric Driven
Chip Features
Results
Verif. Plan
Feature A
Feature B
Feature C
Feature D
DUT
B
C D
Feature-based
Verification targets
(Metrics for cov+checks)
Feature-based
plan with
Feature A 50%
extended
Subset 1 .
20%metrics
Subset 2 .
80% enables
Feature B
efficient
Feature C 10%
and accurate
Feature D 70%
20% project closure
Yes
No
Signoff?
Done
VE Start
Module
Set One
Module
Set Two
Plan
Measure /
Analyze
Successful Milestone
Missed Milestone
Chip
Integration
Prototype
Incisive
VIP Portfolio
Construct
Production
Failure and
Metric Analysis
Execute
IEM
IFV
IEV
ISX
IES
SN
Coverage
Assertions
Checks
Functional
and
Design
Specs
Create Verification
Plan from Spec;
Capturing Metrics
vPlan
Analyze Results
Debug, Fix,
Resubmit
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
9
Coverage Metrics
Code Coverage: method of assessing how well the test cases have
exercised the design.
Code Coverage : Block & Branch, Expression,Toggle, FSM
Functional Coverage: focuses on functional aspects of a design and
provides a very good insight on how the verification goals set by a test
plan are being met.
Functional Coverage : Assertion and CoverGroup
10
Code coverage
Reflect how thoroughly the DUT code has
been exercised
Enable detection of
Untested areas of DUT
Dead code or unused code
Most of the work are done by coverage
tools automatically
APB
UVC
Functional coverage
Measure what features of DUT were
exercised
Lot of manual work:
Planning
What are the features?
Where/how to measure?
Coding of assertions and covergroups
11
Scoreboard
DUT
UART
UVC
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
12
13
BLK1
BLK2
BLK3
BLK4
BLK5
BLK6
16
17
18
SOP Scoring
Reduces expressions to a minimum set of expression inputs that
make the expression both true and false, inherently first-level
b
&
<1>
Simulation
Scoring
Count
Coverage
Hole
(c
d)
<2>
hit
rval
<1>
<3>
<2>
<3>
20
Expression Inputs
<1>: b
<2>: c
<3>: d
Control Scoring
Checks if each input has controlled the output value of the expression
at some time during the simulation
Known as sensitized condition coverage or focused condition coverage
Breaks an expression into a hierarchy of sub-expressions, more accurate
hit
b
<1>
&
(c
d)
<--
-->
<3>
<4>
&
21
Level 2:
<3>: c
<4>: d
<2>
--------------
hit
<3>
<4>
|
Level 1:
<1>: b
<2>:(c | d)
<1>
--------------
Vector Scoring
Vector scoring mode is an extension of control scoring mode.
Each bit of a multi-bit signal is scored and reported separately and
lots of data to analyze.
hit
reg [3:0] a, b;
&&
(a
&&
<1>
Level 1:
<1>: a
<2>: b
22
b)
<2>
Hit
<1>
<2>
--------------
T1[3] T2[3]
[2] [1]
hit
[2][0]
[1] [0]
0 0 0 0 1 0
0 0 1 0 0 1
1 0 0 1 0 0
0 1 0 0 0 0
0 0 0 0 0 0
23
Z
0
partial
24
full
set_toggle_includez
25
26
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
27
Testbench
Compile,
Elaborate and
instrument for coverage
coverage
options
OR
coverage
configuration
file
irun -c
irun -r
28
Coverage
Database(s)
29
-covtest <test>
-covoverwrite
./
top
cov_work/
scope/
chipA
.ucm
mod2
testA/
mod1
.ucd
testB/
.ucd
% irun c *.v coverage B:E:T covdut chipA
regr_10/
scope/
.ucm
testC/
.ucd
31
32
Switch name
Compile/elab/
runtime
Description
-coverage <string>
elaboration
Enable coverage
instrumentation
-covfile <file>
elaboration
Coverage instrumentation
control file
-covdut <dut>
elaboration
-covworkdir <workdir>
runtime
-covscope <scope>
runtime
-covtest <test>
runtime
-covoverwrite
runtime
covfile.ccf
select_coverage bet module chipA
set_branch_scoring
34
Command
select_coverage
Applies to
B:E:T:F
deselect_coverage
B:E:T:F
set_glitch_strobe
set_hit_count_limit
set_subprogram_scoring
set_com
set_com_interface
set_code_fine_grained_m
erging
set_libcell_scoring
set_merge_with_libname
set_parameterized_modul
e_coverage
B:E
B:E
B:E
B:E:T
B:E:T
B:E
ALL
ALL
ALL
Description
Select the design units or instances to score for coverage
type
Subtract from what is instrumented
-remove_empty_instances remove empty instances from
the coverage hierarchy
Specify the glitch rejection time interval
Sets the upper limit of hit counts
Disable scoring of unused subprograms
Identify items never happen and marks them ignored
All ports of the modules will be marked as variables
Provide merge resilience at concurrent block level instead of
the default module/instance level
Enable scoring of verilog library cells
Match library name of module for merging
Different modules dumped to different parameter values
combinations used to instantiate the module
Description
set_implicit_block_scoring
set_branch_scoring
set_statement_scoring
set_explicit_block_scoring
set_assign_scoring
35
Description
set_expr_scoring
36
Description
set_toggle_strobe
set_toggle_includex
set_toggle_includez
set_toggle_noports
set_toggle_portsonly
set_toggle_excludefile
set_toggle_limit
37
Description
set_fsm_attribute
38
Description
set_optimize
select_functional
set_covergroup
39
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
40
41
42
Favorites page
displays list of
pages added as
favorites
Search
How Tos
43
Analysis History
page displays list
of runs launched
in this or previous
IMC sessions
Info Tab
Sub-elements
Activity Center
Page Navigation
Unified
Instance/Type
Verification
Metrics Tree
Sorting / Filtering
Details Tab
45
Selected
Expression
46
Source Code
Selected
Expression
Table
Individual
Vector bits
47
Source Code
State
Transitions / Arcs
48
FSM bubble
diagram
Source viewer
with syntax
highlighting
49
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
50
Scoreboard
APB
UVC
DUT
51
UART
UVC
Scoreboard
APB
UVC
apb_transferDUT
UART
uart_frame
UVC
In the example above, APB and UART ports have unique data items
Covergroups can be defined directly in the apb_transfer, uart_frame
Type-coverage of apb_transfer measures the apb stimulus coverage
Type-coverage of uart_frame measures the uart stimulus overage
52
Scoreboard
apb_transfer
DUT
Covergroup in
apb_transfer
data item
53
UART
UVC
uart_frame
Scoreboard
Agent 1
APB Port1
apb_transfer
Mon
APB
UVC
DUT
Agent 2
UART
uart_frame
UVC
APB Port2
apb_transfer
Mon
54
Scoreboard
apb_transfer
APB Port1
APB
UVC
Agent2
DUT
uart_frame
apb_transfer
APB Port2
Enable instance
coverage
Use set_inst_name()
to specify meaningful
instance name
55
UART
UVC
56
Scoreboard
1GB, 10GB
720p, 1080p
Corner cases
UVC1
FIFO empty/full
Wrong branch prediction -> flushes of prefetch queues
DUT
57
UVC2
Generated
automatically by
Register package
58
Covergroups to
check for corner
cases of FIFOs
59
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
60
61
62
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
63
Source Code
List of Assertions
64
Coverpoints
65
Bins
Search on a tree
66
Exclude (recursively)
Exclude Local (non-recursive)
68
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
69
71
cov_work/
scope/
test1/
OR
imc> merge * out all
test2/
test3/
all/
% imc -batch
./
regr_jan7_12 /
system1/
72
72
OR
test1/
test2/
test3/
all/
Merge Command
merge
-out <out_path>
[-overwrite]
{<runs> | -runfile <runfile>}
[-metrics <metrics_type>]
[run_order {as_specified | by_timestamp}]
[initial_model {empty | <runpath> | union_all |
primary_run}]
[-message [<message_level>]]
[-covmodeldir <modeldir>]
73
Merge Command
Initial Model
Initial Model affects how the Merged coverage model looks
like
-initial_model
<runpath>: <runpath> coverage model used as the starting target
model
primary_run: Primary test coverage model used as the starting target
model.
Primary test is the first test used to merge (based on run_order)
union_all
Target model is the union of all test coverage models
empty
User creates a target model
Based on: -target, -targettype, -source, -sourcetype
74
75
77
79
80
82
-w_block <weight>
-w_expression <weight>
-w_toggle <weight>
-w_fsm <weight>
-w_assertion <weight>
-w_covergroup <weight>
-max <integer_value>
specifies the number of runs after which ranking runs must stop
helps identify the best N runs.
-target <cumulative_coverage_goal>
Specify target goal to be achieved while ranking
ranking stops when goal hit
83
-cpu | -sim
Specifies if CPU time or Simulation time should be considered for
ranking. By default, neither CPU time nor simulation time are
considered when ranking
84
-output <output_file>
Specifies the name of the output file where the ranking results are
saved. By default ranking results are written to the standard out,
unless redirected to a file
85
rank_element_option
specifies the elements for which coverage grading is calculated during
ranking. By default ranking is done for all the elements in the design.
-type <types> : specify the module/entity for which coverage grading are
calculated during ranking
-inst <instances> : specify instances for which coverage grading are calculated
during ranking
-covergroup <covergroup_element_full_path> : specify the covergroups for
which coverage grading are calculated during ranking
-coverpoint <coverpoint_element_full_path> : specify the coverpoints for which
coverage grading are calculated during ranking
-assertion <assertion_element_full_path> : specify the assertions for which
coverage grading are calculated during ranking
86
87
Optimized Runs
Run Cum.
Self
Cum. Wt
Self Wt
Contrib.
Run
Id
Grade(%)
Grade(%)
Grade(%) Grade(%) # items Cost Name
============================================================================
Optimized Runs:
Redundant Runs
1
58.18
58.18
58.18
58.18
6634
0
cov_work/scope/test2
2
73.29
64.32
73.29
64.32
500
0
cov_work/scope/test1
Redundant Runs:
3
0.00
58.18
0.00
58.18
0
0
cov_work/scope/test3
4
0.00
58.18
0.00
58.18
0
0
cov_work/scope/test4
88
HTML reporting
90
High-level summary
Total (average)
Navigate hierarchy
Coverage Numbers
Link to flat CoverGroup coverage all
CoverGroups in one table
91
Click to open
detailed report for
instance
Actual
coverage
Covergroup
options
93
Bin details
Covergroup
instance
name
Click on item
to view details
94
95
Functional coverage
Building Functional Coverage Model
Analyzing Functional Coverage Using IMC
Lab 2: functional coverage collection & analysis
IMC Merge/Rank/Refine/Report
Lab 3: merge tests & generate report
Summary
96
97
98
99
Support Contact
http://support.cadence.com
http://www.cadence.com