0% found this document useful (0 votes)
94 views218 pages

Coverage Tut

The Verdi Coverage User Guide and Tutorial provides comprehensive instructions on using Verdi Coverage for visualizing coverage data in Verilog and VHDL designs. It covers features such as code coverage, covergroup coverage, assertion coverage, and the Exclusion Manager, as well as prerequisites for usage and customer support options. The document also outlines the interaction between Verdi Coverage and the Verdi platform for debugging and generating verification plans.

Uploaded by

benbizhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views218 pages

Coverage Tut

The Verdi Coverage User Guide and Tutorial provides comprehensive instructions on using Verdi Coverage for visualizing coverage data in Verilog and VHDL designs. It covers features such as code coverage, covergroup coverage, assertion coverage, and the Exclusion Manager, as well as prerequisites for usage and customer support options. The document also outlines the interaction between Verdi Coverage and the Verdi platform for debugging and generating verification plans.

Uploaded by

benbizhu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 218

Verification ContinuumTM

Verdi Coverage
®

User Guide and Tutorial


Version V-2023.12, December 2023
Copyright Notice and Proprietary Information
 2023 Synopsys, Inc. All rights reserved. This Synopsys software and all associated documentation are
proprietary to Synopsys, Inc. and may only be used pursuant to the terms and conditions of a written
license agreement with Synopsys, Inc. All other use, reproduction, modification, or distribution of the Syn-
opsys software or the associated documentation is strictly prohibited.

Destination Control Statement


All technical data contained in this publication is subject to the export control laws of the United States of
America. Disclosure to nationals of other countries contrary to United States law is prohibited. It is the
reader's responsibility to determine the applicable regulations and to comply with them.

Disclaimer
SYNOPSYS, INC., AND ITS LICENSORS MAKE NO WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, WITH REGARD TO THIS MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Trademarks
Synopsys company and certain product names are trademarks of Synopsys, as set forth at http://www.syn-
opsys.com/company/legal/trademarks-brands.html.
All other product or company names may be trademarks of their respective owners.

Free and Open Source Software Licensing Notices


If applicable, Free and Open-Source Software (FOSS) licensing notices are available in the product instal-
lation.

Third-Party Links
Any links to third-party websites included in this document are for your convenience only. Synopsys does
not endorse and is not responsible for such websites and their practices, including privacy practices, avail-
ability, and content.

www.synopsys.com
Contents
Preface 6
Customer Support..........................................................................................6
Synopsys Statement on Inclusivity and Diversity.........................................7

Introducing Verdi Coverage 8


Prerequisites 10
Invoking Verdi Coverage 12
Using Verdi Coverage 14
Using the Summary Pane..................................................................................17
Using the Hierarchy Tab...................................................................................23
Configuring Computation Modes ...............................................................33
Using the Modules Tab.....................................................................................46
Using the Groups Tab.......................................................................................47
Using the Asserts Tab.......................................................................................53
Using the Statistics Tab ....................................................................................57
Using the Tests Tab ..........................................................................................59
Using the UPF Low-Power Coverage.........................................................60
Using Application Preferences....................................................................62
Changing Coverage Aggregation Based on Metric Coverpoints ................65

Using Verification Planner 68


Using the Layout...............................................................................................69
Using the HVP Planner.....................................................................................70
Auto-Saving Option for HVP Editor...........................................................74
Creating Features for Planner ...........................................................................75
Adding Features From Coverage Database.................................................76
Adding Features From the Design ..............................................................80
Specification Linking in Planner.................................................................85
Running a Specification Review...............................................................101
Configuring the Linked Feature ................................................................105
Measure Concealment in Reports .............................................................108
Loading a Predefined HVP File......................................................................113
User Data As a Spreadsheet Worksheet .........................................................113

Feedback Verdi Coverage User Guide and Tutorial iii


Use Model .................................................................................................114
Backward Compatibility ...........................................................................115
Loading and Saving a Verification Plan Using Environment Variables ........116
Showing Missing Scores.................................................................................118
Graphical Traceability Support.......................................................................119
Use Model .................................................................................................119
Limitations ................................................................................................123
Using Derived Test Metrics............................................................................124
Percent Metric for Test Metric ..................................................................124
test.completion Metric...............................................................................126
Using Test Name as HVP Source...................................................................128
Adding a Test Source ................................................................................128
Used/Unused Marker for Test Pane ..........................................................129
Conflict Resolution ...................................................................................129
Using User-Defined Attributes and Metrics ...................................................131
Creating Attributes ....................................................................................131
The set Type Attribute ..............................................................................133
Creating Metrics........................................................................................140
Descriptions for Attribute and Metric Definitions ....................................145
Using Modifiers ..............................................................................................150
Hiding Complete Features Using the Toggle Filter........................................151
Propagation of Values.....................................................................................152
Highlighting Values ..................................................................................152
Calculating the Count of Covergroup Bins ....................................................155
Enabling Group.*_count Submetrics ........................................................155
Generating the URG Report to View Group.*_count Submetrics ............159
Reverting to Default Values......................................................................160

Using the Exclusion Manager 162


Using the Exclusion Manager Pane................................................................166
Using the Toolbar to Manage Exclusions.......................................................169
Using Advanced Exclusion Options .........................................................170
Loading Exclusion Files............................................................................173
Adding Annotations for Exclusions ..........................................................175
Reviewing Exclusions ....................................................................................177
Using the Exclusion Review Flow............................................................177
Reviewing Line Coverage Exclusions ......................................................178
Filter Support for Annotations and Elfile .......................................................181
Displaying Multiple Annotated Exclusions....................................................183
Exclusions With Checksum Mismatch...........................................................184
Adding Annotations to an Excluded Object ...................................................184

iv Verdi Coverage User Guide and Tutorial Feedback


Handling Duplicate Annotations of an Excluded Object ...............................185
Saving Exclusions to a File.............................................................................186
Saving All Exclusions for Selected Objects..............................................186
Saving Selected Exclusions for an Object ................................................187
Seed and Propagated Exclusions ....................................................................189
Exclusions on a Topology Folder ...................................................................192
Marking Exclusions ..................................................................................192
Tree Exclusions .........................................................................................194
Saving Exclusions .....................................................................................195
Adding Exclusion Annotations .................................................................196
Exclusion Propagation to Connections...........................................................198
Prerequisite................................................................................................199
Use Model .................................................................................................199
Exclusion Propagation From Line Coverage..................................................205
Use Model .................................................................................................205
Example.....................................................................................................206
Limitations ................................................................................................207

Loading and Saving Sessions 208


Interacting With Verdi Debug 210
Invoking the Verdi Platform .....................................................................210
Using Interactive Debug Between Verdi and Verdi Coverage .................211

Using VC Execution Manager 216

Feedback Verdi Coverage User Guide and Tutorial v


vi Verdi Coverage User Guide and Tutorial Feedback
Preface

Preface
The Verdi Coverage User Guide and Tutorial discusses Verdi Coverage that
provides visualization for coverage data. Visualization for coverage data in
Verdi Coverage is a comprehensive visualization environment that integrates
with the design hierarchy display and can be used to get a summary of the
coverage results or details of various types of coverage. Verdi Coverage can
display code coverage, covergroup coverage, and assertion coverage.
Furthermore, you can use the Exclusion Manager of Verdi Coverage to show all
exclusions and unresolved exclusions and edit exclusions. You can also use
Verdi Coverage to create a verification plan or verification plan components
(.hvp files) and link specifications (.pdf files). The interaction between the Verdi
platform and Verdi Coverage is also provided to debug with designs and the
coverage report.

Customer Support
For any online access to the self-help resources, you can refer to the
documentation and searchable knowledge base available in SolvNetPlus.
To obtain support for your Verdi product, choose one of the following:
• Open a case through SolvNetPlus.
Go to https://solvnetplus.synopsys.com/s/contactsupport and provide the
requested information, including:
• Product L1 as Verdi
• Case Type
Fill in the remaining fields according to your environment and issue.
• Send an e-mail message to verdi_support@synopsys.com.
Include product name (L1), sub-product name/technology (L2), and product
version in your e-mail, so it can be routed correctly.
Your e-mail will be acknowledged by automatic reply and assigned a Case
number along with Case reference ID in the subject (ref:_...:ref).
For any further communication on this Case via e-mail, send e-mail to
verdi_support@synopsys.com and ensure to have the same Case ref ID in
the subject header or else it will open duplicate cases.

Feedback Verdi Coverage User Guide and Tutorial 6


Preface

Note: In general, we need to be able to reproduce the problem in order to fix it,
so a simple model demonstrating the error is the most effective way for
us to identify the bug. If that is not possible, then provide a detailed
explanation of the problem along with complete error and
corresponding code, if any/permissible.

Synopsys Statement on Inclusivity and Diversity


Synopsys is committed to creating an inclusive environment where every
employee, customer, and partner feels welcomed. We are reviewing and
removing exclusionary language from our products and supporting customer-
facing collateral. Our effort also includes internal initiatives to remove biased
language from our engineering and working environment, including terms that
are embedded in our software and IPs. At the same time, we are working to
ensure that our web content and software applications are usable to people of
varying abilities. You may still find examples of non-inclusive language in our
software or documentation as our IPs implement industry-standard specifications
that are currently under review to remove exclusionary language.

7 Verdi Coverage User Guide and Tutorial Feedback


Introducing Verdi Coverage

Introducing Verdi Coverage


The Verdi Coverage function in the Verdi® Automated Debug Platform provides
visualization for coverage data. After you have loaded the coverage of the
simulation results for a Verilog or VHDL design, you can easily use the Verdi
Coverage capability to check the coverage report in the Verdi platform.
Visualization for coverage data in Verdi Coverage is a comprehensive
visualization environment that integrates with the design hierarchy display and
can be used to get a summary of the coverage results or details of various types
of coverage. Verdi Coverage can display the following coverage information:
• Code coverage including:
• Line Coverage: The statements that were executed during simulation.
• FSM Coverage: The blocks of code that make up FSMs can be
identified. FSM coverage reports on the states, transitions, and
sequences of states during simulation.
• Toggle Coverage: Whether the signals in the design toggle from 0 to 1
and 1 to 0 during simulation.
• Condition Coverage: Conditions are expressions and sub-expressions
that control the execution of code or the assignment of values to signals.
Condition coverage tests whether both true and false states of these
conditions were covered during simulation.
• Branch Coverage: Analyzes how if, case statements, and the ternary
operator (?:) establish branches of execution in your Verilog design. It
shows vectors of signal or expression values that enable or prevent
simulation events.
• Covergroup Coverage: Coverage of SystemVerilog testbench coverage
groups.
• Assertion Coverage: Coverage of SystemVerilog cover properties or assert
properties. Low Power Coverage: Coverage of UPF low power coverage
groups.
Furthermore, you can use the Exclusion Manager of Verdi Coverage to show all
exclusions and unresolved exclusions and edit exclusions. You can also use Verdi
Coverage to create a verification plan or verification plan components (.hvp
files) and link specifications (.pdf files). The interaction between the Verdi

Feedback Verdi Coverage User Guide and Tutorial 8


Introducing Verdi Coverage

platform and Verdi Coverage is also provided to debug with designs and the
coverage report.

NOTE: Currently, the supported simulator is VCS with version 2013.06 and
later.

9 Verdi Coverage User Guide and Tutorial Feedback


Prerequisites

Prerequisites
Before you can begin using the Verdi Coverage capability, the following criteria
must be met:
• Your coverage database is generated by a VCS simulator with version
2013.06 or later.
• The coverage features must be enabled at compile-time and simulation time
to include them in the coverage database and view them in the Verdi
platform by using the -cm1 line+tgl+fsm+cond+branch+assert
compile option and runtime option. For example:
> vcs -P $VERDI_HOME/share/PLI/VCS/LINUX/novas.tab \
$VERDI_HOME/share/PLI/VCS/LINUX/pli.a \
-f file_list.vc -cm line+tgl+fsm+cond+branch+assert -sverilog

> ./simv -cm line+tgl+branch+fsm+cond+assert

If your design includes UPF file for power simulation, the


-power=coverage+dump_hvp2 compile option is needed to enable
VCS power coverage features. For example:
> vcs -P $VERDI_HOME/share/PLI/VCS/LINUX/novas.tab \
$VERDI_HOME/share/PLI/VCS/LINUX/pli.a \
-sverilog <your design> -upf <your UPF power design> \
-cm line+tgl+fsm+cond+branch+assert -power=coverage+dump_hvp

• You have the Verdi license and the Verdi Coverage add-on licenses.

NOTE: If the Verdi platform is invoked through Verdi Coverage, there is no


need to check another Verdi license.
After the above criteria are met, the following Verdi environment variable must
be set before invoking Verdi Coverage:
> setenv VERDI_HOME <VERDI_INST_DIR>

1. For details on the compilation options, see the VCS User Guide.
2. For details on the compilation options, see the VCS User Guide.

Feedback Verdi Coverage User Guide and Tutorial 10


Prerequisites

11 Verdi Coverage User Guide and Tutorial Feedback


Invoking Verdi Coverage

Invoking Verdi Coverage


To invoke Verdi Coverage, you need to add the -cov option to the verdi
command line. You can also specify the directory name in the command line
while invoking Verdi Coverage as follows:
> verdi -cov &
> verdi -cov -covdir simv.vdb &

NOTE: It is recommended to merge or map multiple .vdbs via URG before


invoking Verdi. For details on this, see
Chapter, "Merging Coverage Metrics" of the
Coverage Technology User Guide.
Verdi Coverage provides four work modes, namely Planner, Coverage, Coverage
and Planner, and User-Defined Mode. To choose a work mode for Verdi
Coverage, use the -workMode command with verdi -cov as follows:
> verdi -cov -workMode planner //Planner Mode
> verdi -cov -workMode coverageAnalysis //Coverage Mode
> verdi -cov -workMode coveragePlanner //Coverage & Planner mode
> verdi -cov -workMode userDefinedMode //User-defined mode

To save a user-defined mode, use the Windows  Save/Restore User Layout


menu command from the main window.
To see the command line options for Verdi Coverage, use the following
command:
> verdi -cov -help

Alternatively, you can use the Tools  Coverage command in the main window
to invoke Verdi Coverage from a previously opened Verdi platform.

NOTE: When the -cov option is mixed with non-coverage options for the Verdi
platform (for example, verdi -cov -lib), Verdi Coverage is
invoked. The Verdi platform is not invoked until the
Tools  Debug command is used in Verdi Coverage. Unaffected
options are shown in the Message pane as a warning message.
If you change the location of a source file, you can map the path to the relocated
file using the -pathmap <file> option. The rule specified in the file
relocates source files. For example,
> verdi -cov -covdir simv.vdb -pathmap <file> &

Feedback Verdi Coverage User Guide and Tutorial 12


Invoking Verdi Coverage

The syntax of the path mapping file is as follows:


<old_directory_path_name>:<new_directory_path_name>

For example,
## the content of the path mapping file
/home/work/src: ~local/files/source

The subsequent chapters discuss how you can use Verdi Coverage.

13 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Using Verdi Coverage


This chapter provides information on how you can use the capabilities of Verdi
Coverage with its various coverage modes. It also describes each of the Coverage
GUI tabs in the following sections:
• Using the Summary Pane
• Using the Hierarchy Tab
• Configuring Computation Modes
• Using the Modules Tab
• Using the Groups Tab
• Using the Asserts Tab
• Using the Statistics Tab
• Using the Tests Tab
• Using the UPF Low-Power Coverage
• Using Application Preferences
Verdi Coverage provides the following working modes with predefined window
layouts. You can use the commands listed in the following table to switch to these
modes.

Mode Command Explanation


Coverage Mode Windows -> Coverage Focuses on the coverage
Mode report and its details that exist
in the coverage database.
Plan Mode Windows -> Plan Mode Focuses on the hierarchical
verification plan and manages
the specification for higher
coverage.
Coverage + Plan Windows -> Coverage + Shows both coverage and
Mode Plan Mode planner information.

As shown in Figure Coverage Mode , when Verdi Coverage is invoked, the


Coverage mode is launched by default. The Summary, Coverage Source Code
(CovSrc), Coverage Detail (CovDetail), Message, and Exclusion Manager panes
are displayed in the main window.

Feedback Verdi Coverage User Guide and Tutorial 14


Using Verdi Coverage

Figure: Coverage Mode

The Summary pane gives you the summary information for each type of coverage
and navigates to the required database. It consists of the Hierarchy, Module,
Group, Asserts, and Statistics tabs to show the summary of your design and
coverage with different forms of presentation. The Coverage Source Code pane
shows the source code and covered and uncovered highlights for specific
coverage types in the Coverage Detail pane.
Verdi Coverage is a multi-window docking application with a flexible and easy-
to-use graphical user interface. Thus, the following general functions are
introduced for easier usage before describing the Verdi Coverage features:
• The layout of Verdi Coverage is flexible and you can resize, dock, and
undock each pane in Verdi Coverage.
• As shown in Figure Search and Filter, you can filter the content of each
pages in the Summary pane based on the string entered in the Filter field.

15 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Search and Filter

• You can search the content of each pane in Verdi Coverage based on the
string entered in the Search field. You can also click the Search Option
icon to add-on search options. The Search field is hidden by default. Use
the Show/Hide Search Widget command in the right-click menu to show
the field.
• The bindkey values and drop-down menu names and locations can be
customized through the Customize Menu/Toolbar form. Use the Customize
Menu/Toolbar command to invoke the form. For more information, see the
User Interface chapter in the Verdi User Guide and Tutorial.

Feedback Verdi Coverage User Guide and Tutorial 16


Using Verdi Coverage

Using the Summary Pane


As shown in Figure Summary Pane, you can adjust the pane size and see the line,
toggle, FSM, condition, branch, and assert coverage results with their covered
percentage for the instance in separate columns. After expanding the hierarchical
tree by clicking the icon, more coverage data is shown. Referring to Figures
Summary Pane and Score Bar, the score bar shows the covered percentage for
each type of coverage. You can also see the Exclusion column (refer to Figure
Summary Pane) to check the exclusion status for each item. An exclusion icon is
displayed in the Exclusion column if there is an exclusion action for this item
(see Chapter Using the Exclusion Manager exclusion status and details).

Figure: Summary Pane

Figure: Score Bar

As shown in Figure Configuring Columns for Hierarchy Tab, click the icon
to control the columns that need to be displayed in the Summary pane of each
page based on the Metrics options. You can select the Total option to display the
total number of coverable objects and the Uncovered option to display the
number of uncovered objects. For more information on Cover Items, see table

17 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Cover Items Description. All the columns can be used to sort the data by clicking
the column name field.

Figure: Configuring Columns for Hierarchy Tab

The Figure Configuring Columns for Hierarchy Tab displays the configuration
options available for the Hierarchy tab.

Tooltip in the Summary Pane


In the Summary pane, the tooltip provides information related to the overall
coverage score and the score for all coverage metrics, such as line, toggle, FSM,
and so on. Verdi Coverage enables you to control the information in the tooltip
as per your requirements. You can see complete information in the tooltip or see
only column-specific information using Tools --> Preferences. It displays the
Application Preferences form as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 18


Using Verdi Coverage

The Show all column information in tooltip check box is not selected by
default. Therefore, Verdi shows only some information for the selected column.
For example, if you move the pointer over Score in the following figure, it only
shows the total coverage score of all coverage metrics.

To display the overall coverage score along with the individual score of all
metrics in the tooltip of each column, select the Show all column information
in tooltip check box in the Application Preferences form and click OK. Verdi
shows the following figure if you select the check box and move the pointer over
Score:

Verdi displays the covered, uncovered, and total object counts for each metric
along with the metric's score. This information is displayed in the tooltip

19 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

irrespective of whether the Show all column information in tooltip check box
is selected or not as shown in the following figure:

In this figure, 86 is the total number of covered objects, 32 is the total number of
uncovered objects, and 118 is the total number of coverable objects. Here,
72.88% is calculated by dividing 86 by 118. The total number of excluded objects
is zero.

Feedback Verdi Coverage User Guide and Tutorial 20


Using Verdi Coverage

Advanced Masking
In previous releases, Verdi provided quick filters to search items based on
characters, for example a covergroup name or an instance name. Now, Verdi also
enables you to filter the items based on coverage scores, exclusion status,
properties, and so on. Verdi provides this advanced masking feature in the
Summary pane, the Coverage Detail pane, and the HVP pane. This advanced
masking does not result in recomputation of HVP scores, which behaves
differently from quick filters and modifiers.
With the advanced masking capabilities, you can filter by specifying a single
condition as well as multiple conditions. For the single condition, you can use the
following syntax for filtering:
[text filter][conditional_expression]
where,
• [text filter] is a wildcard or regular expression that matches items by
their name. If the matched items also fulfill
[conditional_expression], Verdi retains the items. You can also
retain the sub-items of the matched items, if you select the following option
from Preferences > Global:

However, if the sub-items of the matched items do not fulfill the condition,
Verdi does not show the items even if the above option is selected.
• [conditional_expression] is of the following format:
[column name][operator][Number/String]
where,
[operator]refers to >, <, =, !=, >=, <=, and :. Here, : refers to =.
[Number] refers to int, float, or double.
[String] is only allowed with : and =. [String] with empty spaces
should be enclosed within "". If [String] includes "", use escaped char-
acters.

To specify multiple conditions for filtering, use the following syntax:


[text filter][operator][conditional_expression1]
[operator][conditional_expression2]
where,

21 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

[text filter]and [operator]are optional. Also, if no operator is


specified, then it is AND by default.

For example, if you specify the filter as


*coin* Line<50% OR Toggle<80% exclude=0, Verdi shows the
search results where the region name contains coin and line score is less than
50% or toggle score is less than 80% and that is not excluded as shown in the
following figure:

To filter only module definition in the Modules pane, select the following option
from Preferences > Summary:

With advanced masking, if you hover the pointer over the Filter field, it shows
the following tooltip:

Feedback Verdi Coverage User Guide and Tutorial 22


Using Verdi Coverage

Using the Hierarchy Tab


The Hierarchy tab displays coverage results by design hierarchy. As shown in
Figure Hierarchy Tab, the total covered percentage is shown in the Score column
of the Hierarchy page.

Figure: Hierarchy Tab

On the right pane of the Hierarchy tab, the configuration metrics is displayed.
Based on the selected metrics the columns displayed in the Hierarchy tab
changes. In this case, all the metrics and cover items are selected, therefore, the
cover items U+C (Total), C (Covered), U (Uncovered), and X (Excluded)
columns are visible for all the metrics in the Hierarchy tab as shown in Figure
Hierarchy Tab.
The following table explains these columns in more detail:
TABLE 1. Cover Items Description

Tab Column Option Name Explanation


Tax
Total number of coverable objects not
U+C Total counting excluded and unreachable
objects.
C Covered Number of unexcluded objects hit.

23 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Tab Column Option Name Explanation


Tax
Number of unexcluded objects not hit
U Uncovered
(holes).
Number of excluded objects. If a higher
level object like an instance or a module
is excluded, the count of all of the lower
level objects within the instance and/or
X Excluded module are reported. Objects might be
excluded using an elfile or using manual
interactive exclusions. Coverage objects
removed via –cm_hier are not counted in
the X or any other column.

You can click the icon to expand the hierarchy tree. You can check the value
in the Score column and see the distribution for those coverage types. For
example, click the icon to expand the test1_jukebox and see the jb1
sub-instance in Figure Observe the Covered Percentage . The score is 75.90% but
the toggle and condition coverage results are only 53.12% and 42.86%. Thus,
you can first focus on the details for the low covered percentage (see Section
Show Source Code and Coverage Detail for details) and how to increase these
two coverage types.

Figure: Observe the Covered Percentage

Show Source Code and Coverage Detail


You can double-click a row under a column in the Hierarchy page for a specified
scope to see the corresponding information in the Coverage Source Code and
Coverage Detail panes (refer to Figure Check the Coverage Details):
• In the Coverage Source Code pane, the source code with annotation
indicates the covered type from the double-clicked column. For example,
refer to Figure Check the Coverage Details, double-click the jb1 row under
the Line column. The source code with annotation indicates a covered line
in the jb1 scope. You can also see the exclusion status icons shown in front
of the line number. Macro instances are collapsed in the Coverage source
code pane by default. You can click the expand/collapse icon in the line
number widget to show/hide the macro content.

Feedback Verdi Coverage User Guide and Tutorial 24


Using Verdi Coverage

• In the Coverage Detail pane, the selected page in the Coverage Detail pane
displays the coverage percentage for the specified coverage type. For
example, refer to Figure Check the Coverage Details, double-click the jb1
row under the Line column. The line coverage details of jb1 scope are
shown in the Coverage Detail pane in the following figure:

Figure: Check the Coverage Details

You can also change the coverage type in the highlighted source code by
selecting a different coverage page in the Coverage Detail pane. For example, as
shown in Figure Check Covered Source Code by Selecting Specific Coverage
Type, the source code is shown and highlighted based on the branch coverage.

25 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Check Covered Source Code by Selecting Specific Coverage Type

The following steps describe how you can show the location of the
corresponding source code line automatically:
1. In the Preferences form (invoked using Tools  Preferences), turn on the
Auto-scroll CovSrc when switching CovDetail metrics option in the
Detail View page.
2. In the Coverage Detail pane, select a row in one page (for example, select a
row in the Branch page).
3. In the Coverage Detail pane, select another page (for example, select the
FSM page).
4. The coverage type in the Coverage Source Code pane changes to the FSM
coverage type.
5. In the Coverage Detail pane, select the previous page that contains the
previously selected row (for example, select the Branch page).
The coverage type in the Coverage Source Code pane changes to the branch
coverage type. In addition, the location of the corresponding selected item in the
page is automatically displayed in the Coverage Source Code pane (that is, the
scroll is moved to the corresponding location).

Feedback Verdi Coverage User Guide and Tutorial 26


Using Verdi Coverage

Expanding MDAs in the Coverage Detail Pane


Verdi enables you to expand all variables of type Multi-Dimensional Array
(MDA) on a single click using the Expand All option. The option allows you to
see all details of MDA variables with a single click. Verdi also provides the
Collapse All option to hide the details of MDA using a single click.
To expand MDAs in the Coverage Detail (CovDetail) pane, perform the
following steps:
1. Right-click a variable and select Expand All. For example, right-click the
a[100:2][3:0] variable and click Expand All as follows:

2. The Expand All option expands all the items of the selected variable. For
example, the figure below shows the details of the items, such as
a[2][3:0], a[3][3:0], and so on of the a[100:2][3:0] variable.

27 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

You can restrict the number of items to expand for MDA. For this, perform the
following steps:
1. Select Tools > Preferences to open the Application Preferences dialog
box as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 28


Using Verdi Coverage

2. Specify the number of items to expand for MDA. For example, specify 2 in
the Number of items to expand for MDA field to expand only two items
of a[100:2][3:0](see the figure below):

NOTE: The remaining items are not expanded and show the + sign.
You can further restrict the number of items that need to be displayed using the
Number of MDA detailed items to fetch at a time option in the Application
Preferences form. The option shows Show more for the remaining items as
shown in the following figure:.

You can control whether the remaining items should be displayed on clicking
Show more. To load the remaining items, select the Load all the pending items
when "Show more" is clicked option in the Application Preferences dialog
box.

29 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Filters in Cross Tables in the Coverage Detail Pane


Verdi has an advanced filter on bins in cross table for ease of analysis when there
are a large number of bins in a cross. With the filter capability, you can easily
search the bin items as per your requirements. It also enables you to sort the
items. This capability is available in the CovDetail pane of Verdi Coverage.
For example, consider a cross table, namley src_addr_vs_dst_addr,
which is a cross between two coverpoints, namely src_addr and dst_addr.

For filters, Verdi provides a drop-down menu with text-based columns, such as
Status, src_addr, dst_addr, and Type. You can sort or filter based on the values
of these columns. For example, if you click the drop-down menu of src_addr, it
shows the options to sort and to filter based on s_HI, s_LO, and s_MID.
To sort the bins two options are available, that is Sort A to Z and Sort Z to A.
When you select any of these options, the arrow on the column gets changed and
displays the sorting direction as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 30


Using Verdi Coverage

If you filter the bins based on s_HI, Verdi shows the following results:

Verdi also enables you to filter based on the status of exclusions. For example, to
view only excluded covered and uncovered items, select Excluded from the
Status drop-down menu as shown in the following figure:.

When Excluded is selected from the menu, Verdi shows the following results:

Verdi provides you the capability to control the number of options to display in
the drop-down menu. For this, perform the following steps:
1. Select Tools > Preferences to open the Application Preferences form and
then select Detail View as shown in the following figure:

31 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

2. In the Application Preferences form, specify the number of options to


display, say 50, in the following field and click OK:
The cross table filters have limited number of options to display, it
is 50, the change takes effect only after reloading the table.
Verdi displays 1000 bin items by default. If more bin items are availa-
ble than the displayed options, Verdi shows the tooltip when you
hover over a column to inform you that more bin items are also availa-
ble. For example, Verdi shows the following tooltip when the number
of options to display is selected as 50:

If you specify 0, it means no limit and Verdi displays all items.

Feedback Verdi Coverage User Guide and Tutorial 32


Using Verdi Coverage

Configuring Computation Modes


You can configure the display of the Coverage report data based on the following
computation modes:
• Show Ratio for Detail
• Compute Group by Ratio
• Compute Group by Instance
• Show Condition IDs
These modes are available in the View menu and can be set/unset as shown in the
following figure:

Figure: Computation Options in the View Menu

These modes are discussed in detail in the subsequent sections.

Show Ratio for Detail


As shown in Figure Show Ratio for Detail, you can use the View  Show Ratio
for Detail command to show the actual counts in the Coverage Detail panes.

Figure: Show Ratio for Detail

33 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Compute Group by Ratio


The score for a covergroup is calculated as the average of the percentages of
individual cover point scores by default. You can use the View  Compute
Group by Ratio command to calculate the covergroup scores and overall group
scores as a ratio between the number of covered bins and the total number of
coverable bins. Compute Group by Ratio shows the difference between the score
calculation with and without the ratio.

Figure: Compute Group by Ratio

Compute Group by Instance


You can use View  Compute Group by Instance to calculate the covergroup
scores using the coverage of each instance for the covergroups with instance
coverage. Figure Compute Group by Instance shows the difference between the
score calculation with and without enabling this option.

Figure: Compute Group by Instance

Feedback Verdi Coverage User Guide and Tutorial 34


Using Verdi Coverage

Show Condition IDs


You can use View  Show Condition IDs to view the condition IDs for an
expression in the Condition tab as shown in the Showing Condition IDs.

Figure: Showing Condition IDs

Line Coverage
The Line page in the Coverage Details pane displays the coverage percentage for
total block and statement coverage. The named objects or lines are shown in the
lower part of the Line page. Also, the source code with annotation indicates
covered and uncovered lines or objects in the Coverage source code pane.

35 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Show Line Coverage

The covered lines are highlighted in green and uncovered lines are
highlighted in red. You can use the Navigation menu to select the type
of line for the searching icons. For example, selecting the Covered type
in the search menu and clicking the icon moves forward to the next covered
line in the Coverage Source Code pane..

Figure: Navigation Menu

As shown in Figure Show Ratio for Detail, you can use the View  Show Ratio
for Detail command to show the actual counts in the Coverage Detail panes.

Feedback Verdi Coverage User Guide and Tutorial 36


Using Verdi Coverage

Figure: Show Ratio for Detail

Toggle Coverage
The Toggle page in the Coverage Details pane displays the value transitions from
0 to 1 and 1 to 0 for each net and register. Refer to Figure Check Toggle Coverage
Details, for the following actions:
• Double-click a signal in the Details table and the signal is highlighted with
its coverage range in the Coverage source code pane.
• Select a signal in the Details table, and the bit list of the signal is displayed
in the Bit List table.
• The bits in the Bit List table can be compressed or uncompressed by
selecting the Compress Vector Bits and Uncompress Vector Bits
commands in the right-click menu or by double-clicking the bit.

37 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Check Toggle Coverage Details

Using FSM Coverage


The default FSM page has two panes (see Figure Check FSM Coverage Details)
• The upper pane displays the state, transition, and sequence coverage for
each FSM with a percentage bar annotated with the total number of covered
and uncovered objects and the percentage of each.
• The lower pane displays transition or sequence results for all possibilities in
a table or list format.

Feedback Verdi Coverage User Guide and Tutorial 38


Using Verdi Coverage

Figure: Check FSM Coverage Details

Displaying Transition Details


Transition mode for the selected FSM displays all the possible transitions and
indicates whether the current state of the FSM made any of these transitions. You
can display the results in a table or list format. In the table format (opened by
default), select the States & Transitions mode in the Mode field. In the list
format, select the Transition mode in the Mode field.
Figure Check FSM Coverage Details shows the table view with states and
transitions displayed with covered transitions in green and uncovered transitions
in red. Transitions that are not possible are white with a dash.
To view the transition details in list format with coverage ranges, enable the
Show as List option. Figure FSM Transition List shows transitions with the
covered transitions displayed in green and uncovered in red. Transitions that are
not possible are not listed in the table.

39 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: FSM Transition List

Displaying Sequences
Select the States & Sequences mode in the Mode field. As shown in Figure FSM
Sequence Table, the Sequences mode shows states and sequences and their
possible coverage numbers that an FSM can follow to go from one state to
another state. Holding the cursor on a cell displays a tooltip showing the
sequences and their coverage.

NOTE: You must enable the sequences at compile-time with the -cm_fsmopt
sequence option to view sequences in the Verdi platform.

Figure: FSM Sequence Table

To view the state details in list format, enable the Show as List option. Figure
FSM Sequence List shows sequences with covered sequences displayed in green
and uncovered in red.

Feedback Verdi Coverage User Guide and Tutorial 40


Using Verdi Coverage

Figure: FSM Sequence List

Using Condition Coverage


The Condition page helps you monitor whether both true and false states of the
conditional expressions and sub-expressions in your code are covered. See
Figure Check Condition Coverage Details for the following actions:
• The Condition List pane expands to show coverage by possible vectors or
sub-conditions, percent coverage, and the line number of the expression.
• Double-click an expression in the Condition List pane, and the expression
is highlighted with its coverage range in the Coverage source code pane.
• Select an expression in the Condition List pane, and the Expression
Display pane displays the selected expression above with possible
conditions and their coverage status below.//

41 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Check Condition Coverage Details

The Condition page also provides an observability feature to locate situations


where a certain part of the combinational circuit is controlling (and hence
observable) the primary output of the combinational circuit. Certain vector
combinations of a sub-expression is marked as covered only if that combination
is controlling the primary output in the context of the whole expression. As
shown in Figure Condition Coverage Observability, you can view the
observability expression in the Expression Display pane.

NOTE: You must use the -cm cond and -cm_cond obs options at compile-time
to enable the observability based condition coverage and view the
observability in the Verdi platform.

Feedback Verdi Coverage User Guide and Tutorial 42


Using Verdi Coverage

Figure: Condition Coverage Observability

You can use the View  Show Condition IDs command to show the condition
names in the Condition page of the CovDetail pane.

Figure: Showing Condition Names

43 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Using Branch Coverage


The Branch page displays the coverage percentage for branch coverage. See
Section Check Branch Coverage Details for the following actions:
• The Detail List pane shows the items and branches of the selected scope.
Expand an item and select a branch, and then the value of the selected
branch is shown in the Value column of the lower pane.
• Double-click a branch to view the annotation in the Coverage Source Code
pane for the branch. The corresponding statement in the source file is
annotated to identify code that is covered and that is not covered. The
source code lines are color-annotated according to their coverage values.
You can see only the line of branches as color-annotated and not the line of
terms.
• The implied branches are shown in the Coverage source code pane only
when you view branch coverage or are analyzing the branch metric. The
implied branches of case and if statements are indicated by MISSING_ELSE
and MISSING_DEFAULT tags.

Figure: Check Branch Coverage Details

Feedback Verdi Coverage User Guide and Tutorial 44


Using Verdi Coverage

Using Assert Coverage


The Assert page displays the coverage counts and percentage for SystemVerilog
Assertions (SVA) assert and cover statements.

Figure: Check the Assert Coverage

See Section Using the Asserts Tab for more details about the Assert coverage.

45 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Using the Modules Tab


The Module tab displays coverage results by listing module definitions, variants
for parameterized modules and module instances and their total coverage score
and individual scores for line, toggle, FSM, condition, branch, and assert
coverage. Click the icon to the left of the module name to see the instances
under it (see Figure Modules Page).

Figure: Modules Page

The Modules page usage is the same as the Hierarchy page usage. Refer to the
Using the Hierarchy Tab section for details.

Feedback Verdi Coverage User Guide and Tutorial 46


Using Verdi Coverage

Using the Groups Tab


The Groups page shows the function groups report. As shown in Figure
Covergroup Icons, the icons for covergroup represent the definition, variant, and
instance of a covergroup. In addition, coverage points and cross coverage have
their own icons.

Figure: Covergroup Icons

You can change the covergroup display by selecting or deselecting the Tree
icon. The figures Groups Tab View With Tree Icon Selected, Groups Tab With
Definitions and Instances Trees Expanded and Groups Tab View With Tree Icon
Deselected show the display when the Tree is selected and deselected
respectively.

Figure: Groups Tab View With Tree Icon Selected

47 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Groups Tab With Definitions and Instances Trees Expanded

Figure: Groups Tab View With Tree Icon Deselected

You can also configure the Attributes that you want to see displayed in the
Groups tab by selected them in the Attributes pane on the right-hand side of the
Groups tab as shown in the Figure Attributes and Cover Items in the Groups Tab.
The values of the cover items U+C (Total), C (Covered), U (Uncovered), and
X (Excluded) are also displayed at the top of the Groups tab as shown in the
Figure Attributes and Cover Items in the Groups Tab.

Feedback Verdi Coverage User Guide and Tutorial 48


Using Verdi Coverage

Figure: Attributes and Cover Items in the Groups Tab

For more information on cover items, see table Cover Items Description.
The Groups page lists covergroup items with coverage score, goal, weight, and
a coverage map view. See Figure Groups Page for the following actions:
• Expand the covergroup definition to display the variant, coverage points,
crosses, and instances.
• Double-click a covergroup item to view the source code in the Coverage
source code pane.
• The double-clicked definition, variant, or instance can also be viewed in the
Details table and the cover bins can be viewed in the Bin table of the
CovDetail pane.

49 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Groups Page

The score for a covergroup is calculated as the average of the percentages of


individual cover point scores by default. You can use the View  Compute
Group by Ratio command to calculate the covergroup scores and overall group
scores as a ratio between the number of covered bins and the total number of
coverable bins. Figure Compute Group by Ratio shows the difference between
the score calculation with and without the ratio.

Figure: Compute Group by Ratio

Feedback Verdi Coverage User Guide and Tutorial 50


Using Verdi Coverage

You can use the View  Compute Group by Instance command to calculate
the covergroup scores using the coverage of each instance for the covergroups
with instance coverage. Figure Compute Group by Instance shows the difference
between the score calculation with and without enabling this option.

Figure: Compute Group by Instance

The summary of the covergroup is shown in the Summary Bar. You can click
the icon to show or hide the Summary Bar in the Groups page.

Figure: Covergroup Summary Bar

You can search and filter the Group and Comment columns in the Groups page
accordingly. The matching expression format is [Column
Name]:[Expression]. For examples, only show the groups which contain
the st0* string in the Group column or the groups which contain the Bruce*
string in the Comment column:

51 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Filtering Groups by the Group Column

Figure: Filtering Groups by the Comment Column

You can specify multiple matching expressions by separating them using a space.
If the expression contains a space, bracketing the expression with “” is required.
For example,
*ohio*
Comment:*ohio*
Comment:*ohio* Group:*coin*
C exomment:“coin ohio”

Feedback Verdi Coverage User Guide and Tutorial 52


Using Verdi Coverage

Using the Asserts Tab


The Asserts tab shows the SystemVerilog Assertions (SVA) report about the
coverage counts and percentage for SVA assert and cover statements (see Figure
Asserts Coverage). For example, the highlighted row in Figure Asserts Coverage
shows the simulator checked 3034 times (in the Attempts column) whether the
assert statement or directive succeeded or the cover statement or directive
matched. The assert statement succeeded (in the Successes/Match column) 15
times and the assert statement did not succeed (in the Failure column) 2070
times. A real success is when the entire expression succeeds or matches without
vacuous successes. The cover statement did not have any failure, so the entry for
the cover statement in this column is always 0.

Figure: Asserts Coverage

The , , and options can be


used to select the asserts to show in the Summary pane. You can also use the All,
1+Real Success, 1+Real Success, 1+Failure, 1+Incomplete and 1+Match
toggle options to show all asserts, at least one real success, at least one failure, at
least one incomplete or at least one match statement in the Asserts tab of the
Summary pane.

53 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Double-click a statement in the Asserts page of the Summary pane to display the
source code in the Coverage source code pane and the static report in the in the
Assert page of the CovDetail pane.
You can switch Assert view using the mode selection menu shown in Figure
Switch Asserts View Mode. There are three options you can choose from: Flat,
Module/Instance and Hierarchy.

Figure: Switch Asserts View Mode

Figure Flat View of Assertions shows the Flat view of the assertions. In this
mode, all the instance assertions are shown in a flat list. Note that only instance
level assertions are shown in this mode, module level ones are not shown.

Figure: Flat View of Assertions

Feedback Verdi Coverage User Guide and Tutorial 54


Using Verdi Coverage

Figures Module/Instance View of Assertions and Hierarchy View of Assertions


show the module/instance and hierarchy mode for assertions respectively.

Figure: Module/Instance View of Assertions

55 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Figure: Hierarchy View of Assertions

NOTE: Coverage information does not exist in the database for assume
statements.

Feedback Verdi Coverage User Guide and Tutorial 56


Using Verdi Coverage

Using the Statistics Tab


The Statistics tab shows the overall coverage scores and statistics analysis report.
It summarizes the types of coverage elements.

Figure: Coverage Statistics

The Statistics page contains four sections: Design Hierarchy, Module List,
Assertions, and Covergroups. Code. All the tabs provide the Total, Covered and
Score of each coverage metric. The Design Hierarchy and Module List tabs
displays coverage results based on the design hierarchy and the module list
respectively. The Assertions tab displays the coverage results for Assertions,
Cover Properties, and Cover Sequences. The Covergroups tab displays the
coverage scores of Groups, Cover Points, and Cover Crosses are also displayed.
The following table describes how the scores are calculated for the Total Group
Coverage Score and Total Group Coverage Instance Score. The remaining
fields mentioned under Covergroups are descriptive. For example, Cover Point
represents the number of cover points in the covergroup.

57 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Covergroup
Definition How the Score Value is Calculated
Category
The value of Total Group Coverage Score changes based on
the computation modes used.
When the Compute Group By Ratio mode is off the score is
calculated as follows:

Average score of Total Group Coverage Score: SUM (every group variant’
all Covergroups score* its weight) / SUM (every group variant’ weight)
Total Group present in a group
Coverage calculated based When the Compute Group By Ratio option is on, the score is
Score on the Score calculated as follows:
column in Groups
tab. Total Group Coverage Score: SUM (every groups instance’s
covered number* its weight) / SUM (every groups instance’s
coverable number* its weight),

If a groups variant has no instance (per_instance==0), the


variant is used for calculation
The value of Total Group Coverage Instance Score
changes based on the computation modes used.

When the Compute Group By Ratio mode is off the score is


calculated as follows:

Total Group Coverage Instance Score: SUM ((every group


instance’s score* its weight) / SUM (every group instance’s
Average score of
score* its weight)
all Covergroup
Total Group Instances within a
If a groups variant has no instance (per_instance==0), use
Coverage group calculated
variant score/weight for calculation.
Instance Score based on the
Instance column
When the Compute Group By Ratio option is on, the score is
in Groups tab.
calculated as follows:

Total Group Coverage Instance Score: SUM (every groups


instance’s covered number* its weight)/SUM (every groups
instance’s coverable number* its weight)

If a groups variant has no instance (per_instance==0), use the


variant for calculation.

Feedback Verdi Coverage User Guide and Tutorial 58


Using Verdi Coverage

Using the Tests Tab


The Tests tab shows test details, such as test name, test location, type, status, start
time, finish time, and simulation time. It also provides summary of overall test
reports. The following figure shows the Tests tab:

Figure: The Tests Tab

In the figure, the icon indicates test records that are valid for source and the
icon indicates test records that are not valid for source. You can drag
Test Name into the plan and use it as HVP source; however, you cannot drag test
records or user data entries into plan to be used as HVP source.
The Tests tab groups test records with the same name in the same folder. For
example, all the test records with name as TEST3 are grouped together in the
above figure. If a test record has a unique name, then it is displayed as a single
line with the test name as [Test Name]--(test location).
The status of a test might come from a user data file, a database, or both. If test
status comes from a user data file, then it is displayed in the following format:
[file name]:[Line number]

where, file name is the full path name of a file. If it is too long, it is left-
truncated, for example, "...simv1/myfile.data".

59 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Using the UPF Low-Power Coverage


If your design and simulation include UPF power information, you can also use
the UPF LP page to check the UPF report about the coverage.
The UPF LP page shows the UPF report about the coverage counts and
percentage by low power design hierarchy (refer to Figure Power Coverage).
Power domain with the same prefix is grouped. All the columns are used to sort
the data by clicking the column name field.

Figure: Power Coverage

You can double-click a power domain of the Summary pane to highlight where
the create_power_domain command is specified in the source code in the
CovSrc pane. You can double-click a source to highlight the source code in the

Feedback Verdi Coverage User Guide and Tutorial 60


Using Verdi Coverage

CovSrc pane. The corresponding Covergroup is also shown in the CovDetail


pane (see Figure Show Details of Power Coverage).

Figure: Show Details of Power Coverage

You can invoke the Verdi debug platform from the Verdi Coverage GUI with the
Tools  Debug menu and add the power domain into the nWave window. The
–f design.f –ssf novas.fsdb options from the command line are
shown in the Invoke Verdi Debug form, when the following command is used:
% verdi –cov [coverage options] [debug options]

In the UPF LP page, select a power domain and use the


Add Power Domain to nWave command in the right-click menu to add it into
Verdi nWave window.

61 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Using Application Preferences


This section consists of the following subsection:
• Color Settings of a Verification Plan
• Changing Coverage Aggregation Based on Metric Coverpoints

Color Settings of a Verification Plan


Verdi enables you to update the color settings of verification plans, their sub-
plans, specification linking colors, and coverage colors. To update the color
settings, perform the following steps:
1. Click Tools>Preferences to open the Application Preferences form.
2. In the Plan View Category, select Spec Colors or Plan Colors as per your
requirement:
• Select Spec Colors to update the color settings of Linked, Ignore, and
Todo text of top and sub plans in a PDF document.
• Select Plan Colors to update the color settings of sub-plans, inactive
cells, warning and error messages, and an invalid score of an item in the
Hvp pane.
3. To change spec-linking colors, select Spec Colors to show the following
list:

An example of the PDF document after setting its color using Spec Colors is
shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 62


Using Verdi Coverage

4. To change plan colors, select Plan Colors to show the following list:

An example of plan colors is shown in the following figure:

63 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

You can also change coverage colors to update the color settings of uncovered,
partially covered, and covered objects. Also, you can update the color settings of
excluded and covered, excluded and uncovered, and unreachable objects. To
change coverage colors, select the Coverage Colors category from the
Application Preferences dialog box as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 64


Using Verdi Coverage

Changing Coverage Aggregation Based on Metric


Coverpoints
By default, coverage score is calculated based on the average coverage rate of a
metric. However, coverage metric with higher coverage points must impact
coverage score than the one with lower coverage points. Therefore, Verdi
Coverage enables you to automatically set weight according to metric
coverpoints.
This section consists of the following two subsections:
• Setting Weight Based on Metric Coverpoints
• Updates to the Verdi Coverage GUI
• Calculating the Auto-Weight Score
• Limitation

Setting Weight Based on Metric Coverpoints


To automatically set weight according to the number of coverage points, perform
the following steps in the Verdi Coverage GUI:
1. Select Tools>Preference to display the Application Preferences dialog
box.
2. In the dialog box (Figure 1), select the following checkbox from the
Summary Table category:
• Automatically set weight according to metric coverpoints
This option is disabled by default.

FIGURE 1. Application Preferences

65 Verdi Coverage User Guide and Tutorial Feedback


Using Verdi Coverage

Updates to the Verdi Coverage GUI


Once the Set Weight checkbox (see Figure 1) is enabled in the
Application Preferences dialog box, the Score (AutoWt) column is included on
the Hierarchy and Modules tabs of the Summary pane as shown in Figure 2.

FIGURE 2. The Score (AutoWt) Column in the Summary Pane

In addition, the average score in Design Hierarchy and Module List of the
Statistics tab (see Figure 3) is recalculated based on metric coverage points.

FIGURE 3. Average Score in the Statistics Tab

Feedback Verdi Coverage User Guide and Tutorial 66


Using Verdi Coverage

Calculating the Auto-Weight Score


Once the Set Weight checkbox (Figure 1) is enabled in the
Application Preferences dialog box, the value of the Score (AutoWt) column
is recalculated based on the coverage points in each metric. For calculating the
coverage score, the following formula is used:
[sum_of_meteric-score_times_metric-point] = (line-score * line
U+C) + (toggle-score * toggle U+C) + (FSM-score * FSM U+C) +
(Condition-score * Condition U+C) + (Branch-score * Branch U+C)
+ (Assert-score * Assert U+C)

[sum_of_ metric-point] = (line U+C) + (toggle U+C) + (FSM U+C) +


(Condition U+C) + (Branch U+C) + (Assert U+C)

Score(Auto) = [sum_of_meteric-score_times_metric-point] /
[sum_of_ metric-point]

For example, the Score (AutoWt) value for test_jukebox in Figure 2 is


52.50% and is calculated as:
[sum_of_meteric-score_times_metric-point]=
(69.89%*641)+(50.66%*1662)+(43.82%*89)+(33.98%*462)+(57.77%*296)+
(20%*10)
=(44799.49%)+(84196.92%)+(3899.98%)+(15698.76%)+(17099.92%)+(200%
)
= 165895.07%

[sum_of_ metric-point] = (641+1662+89+462+296+10)= 3160

Score for auto-weight = 165895.07%/3160 = 52.50%

Limitation
• The formula to calculate auto-weight score is only applied on the Hierarchy,
Modules, and Statistics tabs in the Summary pane. Other areas, such as
URG, or Verdi Source and CovDetails windows, HVP Scores do not support
this formula.

67 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Using Verification Planner


The Verdi platform also provides the Verification Planner feature to help you focus on a
hierarchical verification plan and manage the specification for higher coverage.
The verification planner (HVP planner) in Verdi Coverage allows you to create a specific plan to
measure what is important for each design and also allows for accountability, so that what gets
measured gets done. Plans should be created as early as possible to determine the important
metrics; therefore, as the design progresses, the important features in the plan are not forgotten.
Verification plans can be saved into a readable format, for you to present to management, which
keeps everyone informed about the coverage plan.
In this chapter, you are able to:
• Associate a plan with multiple specs.
• Link a feature to multiple sections in the spec.
• Link a section in the specification with multiple features.
This chapter encompasses the following sections:
• Using the Layout
• Using the HVP Planner
• Creating Features for Planner
• Loading a Predefined HVP File
• User Data As a Spreadsheet Worksheet
• Loading and Saving a Verification Plan Using Environment Variables
• Showing Missing Scores
• Graphical Traceability Support
• Using Derived Test Metrics
• Using Test Name as HVP Source
• Using User-Defined Attributes and Metrics
• Using Modifiers
• Hiding Complete Features Using the Toggle Filter
• Propagation of Values
• Calculating the Count of Covergroup Bins

Feedback Verdi Coverage User Guide and Tutorial 68


Using Verification Planner

Using the Layout


Before staring the HVP planner, you need to change Verdi Coverage to Plan mode. Use the
Window  Plan Mode command to invoke the Plan mode. As shown in Figure Plan Mode, the
Summary, Hierarchical Verification Plan (HVP), Hierarchical Verification Plan Detail, Message,
and Exclusion Manager panes are displayed in the main window.

Figure: Plan Mode

69 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Using the HVP Planner


You can create a verification plan and set the features using the HVP planner in the Hvp pane. The
inputs to the HVP planner include a hierarchical verification plan in (*.hvp) format, spec-linking
*.pdf files for features, and Excel (*.xml) spreadsheet format1.
Use the following steps to create a new plan in Verdi Coverage:
1. Select the Plan  New Plan command to create a new plan in the Hvp pane. As shown in
Figure Hvp and HvpDetail Default Layout, the Attributes, Metrics, Subplan Files, and Spec
Files panes are shown in the HvpDetail pane for the new plan. You can also create attributes
or metrics by clicking the buttons (see Section Using User-Defined Attributes and Metrics
for more details about creating attributes and metrics).

Figure: Hvp and HvpDetail Default Layout

2. Double-click the New_Plan term in the Name column to change the plan name. For
example, as shown in Figure Change Plan Name, change the plan name to SRAM_Plan.

Figure: Change Plan Name


1. This document focuses on HVP and PDF files.

Feedback Verdi Coverage User Guide and Tutorial 70


Using Verification Planner

3. To add a description for the plan, double-click the Description cell and add the description
in the Edit String dialog box that appears as shown in Figure Edit String Dialog Box. The
Edit String dialog box displays the multi-line text that you have entered, making it easy to
read. You can also right-click the string attribute and choose Edit String in the menu bar to
enter the string as shown in Figure Editing Strings.

Figure: Edit String Dialog Box

71 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Editing Strings

The Planner editor allows you to select multiple items of a plan by using the following
operations as shown in Figure Selecting Multiple Features:
• Ctrl + Mouse Click
• Shift + Mouse Click
• Ctrl + A
• Drag mouse to select
The following operations are supported with multiple selections:

Operation Behavior
Limited to items of the same type. Items in lower levels of
Copy/Cut
the same path are ignored.
Delete Items in lower levels of the same path are ignored.
Delete Review
Deleting multiple review reminders.
Remind

Feedback Verdi Coverage User Guide and Tutorial 72


Using Verification Planner

Operation Behavior
Unlink issue Unlinking multiple issues.
Drag & Drop Limited to items of the same type. Items in lower levels of
(Move) the same path are ignored.

Figure: Selecting Multiple Features

4. Change the values for the new plan attributes in the HvpDetail pane. You can double-click
the Value field or click the icon to change the specific attribute value. For example, as
shown in Figure Edit Attributes in the Attributes pane, you can see the owner is changed to
DEMO both in the HvpDetail pane and the Hvp pane. The Value field is also editable and
you can change the value in the Attribute pane.

Figure: Edit Attributes in the Attributes pane

73 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Auto-Saving Option for HVP Editor


Verdi Coverage provides an Autosave feature with the HVP editor that helps prevent data loss if
the tool crashes for some reason. Verdi performs an autosave in the background every 5 minutes.
However, the original .hvp and .spc files does not change until you click PlanSave.
Consider an example of a plan named MyPlan.hvp. If you choose the Recover option, the tool
loads the HVP data from .MyPlan.hvp and .MyPlan.hvp.spc. Verdi Coverage does NOT modify
the original MyPlan.hvp until you perform PlanSave.

Preference Setting for AutoSave


You can use the preference setting shown in Figure Autosave Preferences to enable or disable
Autosave and also modify the Autosave interval.

Figure: Autosave Preferences

Recovering/Discarding Data From an Autosave


Consider an example where you are editing MyPlan.hvp. If you exit Coverage without saving it
or if there is a crash, Verdi created the files .MyPlan.hvp and .Myplan.hvp.spc automatically in the
background. When you open this plan the next time, Verdi checks whether the .MyPlan.hvp file
exists; if the file exists and the modified date of the hidden file is later than the file MyPlan.hvp,
the following warning message is shown:

Figure: Recover/Discard/Cancel Autosaved Data

In this scenario, you can:


• Click the Recover button to load the Autosave data.
• Click the Discard button to discard the Autosave data and load MyPlan.hvp.

Feedback Verdi Coverage User Guide and Tutorial 74


Using Verification Planner

• Click the Cancel button to cancel the opening of the HVP file.
After you select an option and confirmed, the .MyPlan.hvp file is deleted.

Creating Features for Planner


You can add features in a planner from the compiled result in the Verdi platform, from the
coverage database or directly from design to strengthen the current coverage. When the database
is loaded into Verdi Coverage, the status of current coverage is displayed in the Coverage mode.
Verdi Coverage provides a method to directly add the weak sources to a planner.
You can also link to spec-based PDF files for features in the HVP planner. This is a way to
populate the plan in the Hvp pane with a requirement specification already written by the designer
and then link the specification with the feature, so that the requirements in the design specification
are not forgotten or lost and are incorporated in the verification plan. After the feature setting in
the Hvp pane is complete, you can link a requirements specification for the feature using the spec-
linking feature of Verdi Coverage.
Additionally, the explicit structure of Hvp hierarchy is also provided. After you add a feature or
sub-plan, the numbering of added item is automatically numbered.
The following sections describe these methods to add features:
• Adding Features From Coverage Database
• Adding Features From the Design
• Specification Linking in Planner
• Running a Specification Review
• Configuring the Linked Feature

75 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Adding Features From Coverage Database


When the coverage database is loaded into Verdi Coverage, you can use the following method to
add features:
• Drag an item (source) from the tabs in the Summary pane and drop to the planner row in the
Hvp pane. As shown in Figure Create a New Feature from Summary, a new feature is
created with its numbering, the measure and source.

Figure: Create a New Feature from Summary

• Select the plan in the Hvp pane. Select a source in the Modules, Groups, or Asserts tabs of
the Summary pane and use the Add to Plan command in the right-click command menu.
• Select the plan in the Hvp pane. Select a source in the Hierarchy pages of the Summary pane
and use the Add Instance to Plan or Add Tree to Plan commands in the right-click
command menu to add the instance or the entire hierarchy of the selected source to the plan.
• Drag a named object from the Line, Toggle, FSM, and Condition tabs of the CovDetail pane
and drop to the row of the plan in the Hvp pane. For example, you can drag a named line
from the Line page or a variable from the Toggle page and drop it to the selected plan in the
Hvp pane. Alternatively, use the Add Tree to Plan right-click command to add the selected
object to the Hvp planner. For the UPF power plan, you can drag a Covergroup or a
Coverpoint from the CovDetail pane and drop to the row of the plan in the Hvp pane.
If the source is a group or assert, Group or Assert is automatically specified as the metric of the
new measure. If the source comes from the Hierarchy tab, the Modules tab or the Verdi platform,
all code coverage metrics included in the database are automatically specified for the measure.

Feedback Verdi Coverage User Guide and Tutorial 76


Using Verification Planner

When multiple sources are dragged and then dropped to a planner, sources are combined under
the measure (refer to Figure Selecting Multiple Features).

Figure: Select Multiple Sources

You can use the Rename command in the right-click menu of the Hvp pane to rename the plan,
feature, measure, or source names. Additionally, the numbering of each feature can be modified
using the commands in the right-click menu (see Figure Numbering Setting):
• Restart at 1: Set the numbering starting from 1.
• Continue Numbering: Reset the numbering to automatic setting.
• Set Numbering Value: Specify a numbering.

Figure: Numbering Setting

77 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Inserting a Sibling Feature in a Plan


Verdi allows you to add or delete features in a plan. If you add a feature using the
Create a New Feature icon, Verdi inserts the feature as the last child feature item of the
selected parent item (plan/feature). However, this approach requires you to reselect the parent
feature for each sibling feature created. With the new Create Sibling Feature icon in the Hvp
pane, there is no need to reselect the parent feature for each new sibling feature. The icon allows
you to rapidly create a set of features beneath a common parent feature. Creating a set of features
at the same level provides ease of usability and enhances user experience.
Consider a plan myplan that consists of multiple features, such as module, instance1,
instance2, and Fun_Cov (see the figure below).

If you add a feature in myplan using the Create a New Feature icon in the Hvp pane, Verdi
inserts the feature at the end of Fun_Cov. To insert the feature after instance2, perform one
of the following methods:
• Select instance2, click the Create a New Sibling Feature icon in the Hvp pane (see
the figure below).

Feedback Verdi Coverage User Guide and Tutorial 78


Using Verification Planner

• Right-click instance2 and select New Sibling Feature (see the figure below).

• Select instance2 and use keyboard shortcut: CTRL + D.

79 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Adding Features From the Design


You can also create features and add them to a plan directly from instances, modules, groups, and
asserts directly from the design. You can select an instance sub-tree, create features in a plan based
on that sub-tree and then map them.

Creating a New Feature and Sibling Features


You can create a feature tree mapping of a selected leaf instance or instances included in the tree
under the leaf instance, using the following steps. The order of selection in summary table and
plan does not affect the result.
1. Select an instance for which you want to create a feature in the plan, in the Hierarchy tab and
right-click on it as shown in Figure Selecting the Level of Sub-Instances. If you want to
select all the instances included in the tree under the leaf instance, then select the menu item
Select by Levels All.
You can also select multiple instances using the Ctrl or Shift keys.

Figure: Selecting the Level of Sub-Instances

2. After you have selected the instance(s) in the Hierarchy tab, select the plan into which these
features should be added in the Hvp tab. In this case, the features should be added to the plan
named New_Plan.

Feedback Verdi Coverage User Guide and Tutorial 80


Using Verification Planner

3. Once both the plan and the instances are selected, right-click on the selected instance(s) and
select either the Clone Hierarchy to Features or Clone Hierarchy to Sibling Features
menu options.
The Clone Hierarchy to Features menu option creates a new feature under the plan
New_Plan that measures selected coverage items. The Clone Hierarchy to Sibling
Features menu option creates a new sibling feature of the selected feature that measures
selected coverage items.
Figure Selecting Instances for Feature Creation shows these two menu options:

Figure: Selecting Instances for Feature Creation

The following table lists out the scenarios in which the Clone Hierarchy to Features or
Clone Hierarchy to Sibling Features menu options are enabled or disabled:

81 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Selection Action

Clone Hierarchy Clone Hierarchy to


Selection in Summary Table Selection in Plan
to Features Sibling Features
Plan Enabled Disabled
Hierarchy: Single Instance Feature Enabled Enabled
Sub-plan Disabled Enabled
Plan Enabled Disabled
Hierarchy: Multiple Instances
(connected as a subtree, called Feature Enabled Enabled
S) Sub-plan Disabled Enabled
Plan
Hierarchy: Multiple Instances
Feature Disabled Disabled
(disconnected)
Sub-plan
Other Tabs (Module/Group/ Plan Enabled Disabled
Assert): Single/Multiple Items
Feature Enabled Enabled
(such as module, group, and so
on) Sub-plan Disabled Enabled
None Any Disabled Disabled
None
Measure
Any Source Disabled Disabled
In Sub-plan
Multiple Items

4. The newly created features are displayed in the Hvp tab under New_Plan with the leaf
instance and the instances under the tree of the selected leaf instance annotated. Coverage is
calculated for all the metrics, that is, Line, Cond, FSM, Toggle, Branch, and Assert.

NOTE: To choose the level of annotation or the metrics for which coverage needs to be calculated,
see section Choosing Annotation Level and Metrics for Coverage Calculation in the
Verdi LCA Feature Guide.
5. These metrics are displayed in the HvpDetail tab as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 82


Using Verification Planner

Figure: New Features Created Under Plan

The following actions are performed when creating features from a single and multiple
instances. Different selections in the summary table result in different actions.

Clone Hierarchy to Clone Hierarchy to Sibling


Action Selection
Features Features
Creates a new feature Creates a new sibling feature
under the selected feature/ of the selected feature that
Hierarchy: Single Instance
plan that measures measures selected coverage
selected coverage items. items.
Creates a new feature
subtree under selected Create a new sibling feature
Hierarchy: Multiple
feature/plan that mirrors subtree to selected feature
Instances (connected as a
the structure of S, that mirrors the structure of S,
subtree called S)
measuring each instance measuring each instance of S.
of S.
Hierarchy: Multiple
Selected Instances (NOT Disallowed Disallowed
connected as a subtree)
Other Tabs (Module/
Creates new features Creates new sibling features
Group/Assert): Single/
under selected feature/ to selected feature that
Multiple Coverage Items
plan that measures each measures each selected
(such as module, group,
selected coverage items. coverage items.
and so on)

83 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

The following sections describe the position, order, and naming of the features created:

Position of the New Feature(s)


• Create Features: The newly created features are the last child of the parent (selected item).
• Create Sibling Features: The newly created sibling features are the closest sibling of the
selected item. This is also applicable for multiple selection support.

Order of the New Feature(s)


The order of new features is the same as the order in which you select the instances using the Ctrl
key. When you select multiple instances using the Shift key, the resultant features are ordered top-
to-bottom.

Naming of New Features


By default, the name of a new feature is the name of the instance from the design hierarchy.
However, if the name is a keyword in the HVP language such as test or feature, it is renamed
by adding a suffix _renamed. For example, if a feature is created from an instance named
feature, the feature that is created from it is named feature_renamed. You are notified of
this change with warning message similar to the following one, in the message window.
'feature' is a keyword and cannot be used as a feature name. It is renamed to
‘feature_renamed'.

Feedback Verdi Coverage User Guide and Tutorial 84


Using Verification Planner

Specification Linking in Planner


Verdi Planner enables you to track a verification project and ensures that all its verification goals
are achieved. It allows you to create a hierarchical verification plan to measure what is important
for each project. A linked and executable verification plan ties every part of the original written
specification and test plan documents to their corresponding verification goals. The following
figure shows how the verification specifications, plans, and data come together to track progress
and status of the verification project:

Links to the specifications ensure that every feature in the specification has a corresponding
feature in the plan. Links to verification data ensure that anything below target (low coverage,
tests failing, and so on) is presented and linked to the corresponding features to highlight needed
actions.

Once a plan is loaded in the Hvp pane, click the icon in the Hvp pane to create a new feature
(see Figure Create a New Feature from Summary). Verdi assigns a name to this newly-created
feature. You can change the name of this feature by double-clicking the field. For example,
change the name to read as this feature is for covering assertion reading.

85 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Create a New Feature

The Undo or Redo icons are provided in the Hvp pane to undo or redo an edited action
during the edition. For example, in the figure below, the text related to Umem is linked with the
Urrarb feature instead of the Umem feature, you can undo the action using the Undo icon.

Feedback Verdi Coverage User Guide and Tutorial 86


Using Verification Planner

As shown in Figure Icons in Spec Files Pane, you can use the icons to manage specs and
associations in the Spec Files pane. Click the icon to open the Choose a spec file form and
select a specification file to be linked. You can also use the Plan  Open Spec command to open
a specification in the HVP planner.

Figure: Icons in Spec Files Pane

After a specification file is opened, you can double-click the specification row or use the icon
to view the contents and link a section of the specification to a feature in the HVP planner.
The specification file's contents are displayed in its own tab. As shown in
Figure Tab for the Content of Spec, the requirement SRAM specification is displayed in a new
new_plan_1.hvp-sram_spec.pdf tab.

Figure: Tab for the Content of Spec

87 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

To link a section of the text, perform the following steps:


1. Drag to highlight the section of text to be linked.
2. Select the feature in the Hvp pane with which the section is linked.
3. Click the icon to link the section to the selected feature.
To ensure that the text in the header, footer, or endnotes are excluded from spec-linking, you can
select the Exclude Footnote/Endnote and Exclude Header/Footer options in the Specify
Margins form as shown in the following figure:

Figure: Excluding Headers and Footnotes/Endnotes

If you select the Exclude Footnote/Endnote option, all foot notes or end notes present in the text
are excluded from spec-linking. Similarly, if you select the Exclude Header/Footer option, all
the headers and footers are excluded.
For example, consider the Testing_footnote_endnote.pdf file in the following figure
that shows total lines as 13 including header, footer, endnotes, and footnotes:

Feedback Verdi Coverage User Guide and Tutorial 88


Using Verification Planner

If you exclude header, footnote, endnote, and footer [header x 1 + footnote x 2 + endnote x 2 +
footer x 1 = 6] from spec-linking, the planner shows total lines as 7 as shown in the following
figure:

89 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

For more information about excluding sections of the specification document from linking, see
the Excluding Ignore Sections From the Specification Coverage Computation section.

NOTE: The exclusion of header/footer and footnote/endnote is only supported with PDFs
generated using Microsoft office. PDFs generated using any other tools do not fully
support this feature.
You can select the feature in the Hvp pane to show the corresponding Feature page in the
HvpDetail pane for the selected feature details. As shown in Figure Feature Details, the
Attributes, Metrics, and Section panes are shown in the HvpDetail pane for the Feature: 1
module in the HvpDetail pane.

Figure: Feature Details

You can also link a feature to multiple sections. The sections are listed in the Sections tab of the
HvpDetail pane (see Figure Multiple Sections Linked to One Feature).

Feedback Verdi Coverage User Guide and Tutorial 90


Using Verification Planner

Figure: Multiple Sections Linked to One Feature

To create and link a new feature in the Hvp pane, perform the following steps (see
Figure Create and Link a New Feature):
1. Select the plan in the Hvp pane.
2. Drag to highlight the section of text to be linked in the specification.
3. Click the Create a new feature and link to the section icon to create the feature and
link it to the section in the specification.

Figure: Create and Link a New Feature

Linking the specification to a new feature automatically copies the first row of words in the
highlighted text and name the feature (refer to Figure Created and Linked Feature). You can also

91 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

use the icon to create a new sibling feature of the selected one and link it to the section in the
specification.

Figure: Created and Linked Feature

After a plan or a feature is created, you can use the icon to add a sub-plan under a plan or
feature (refer to Figure Create a Sub-Plan).

Figure: Create a Sub-Plan

A section in the specification can be linked to many features. You can use the following steps to
link the same section to more than one feature (see Figure Multi-Features Link to One Section):
1. Click the or icons in the specification toolbar to select a section which is linked to
another feature.
2. Select a plan or a feature in the Hvp pane.
3. Click the icon to create a new feature and link to the selected section.

Feedback Verdi Coverage User Guide and Tutorial 92


Using Verification Planner

4. Click the icon to create a new sibling feature and link to the selected section.

Figure: Multi-Features Link to One Section

You can select a linked feature by clicking the icon to see all the linked features for one
section (see Figure Linked Features List). After selecting one feature in the list, the corresponding
feature is highlighted in the Hvp pane.

Figure: Linked Features List

If a new sub-plan is selected in the Hvp pane, you can click the Create button in the HvpDetail
pane to create a new Hvp file or reuse an existed Hvp file for the sub-plan. If a sub-plan having
corresponding Hvp file is selected in the Hvp pane, you can click the Open button in the
HvpDetail pane to edit the sub-plan in a separate tab in the Hvp pane (see
Figure Create and Edit Sub-Plan).

93 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Create and Edit Sub-Plan

After editing the sub-plan, all attributes (derived from main plan and defined in sub-plan itself),
are listed in the Attribute pane in the HvpDetail pane (see Figure Attributes Pane of Sub-Plan).

Figure: Attributes Pane of Sub-Plan

You can directly edit the attribute values, which automatically create corresponding parameters
for the sub-plan instance. You can also click the icon to revert the changed to the default value.
The scope where the attribute is defined is shown in the Scope field. If the attribute is defined in
both main plan and sub-plan, it shows the main plan in the Scope field. When a sub-plan is opened
in another tab, the numbering of the sub-plan is renumbered, starting from 1.

Feedback Verdi Coverage User Guide and Tutorial 94


Using Verification Planner

Specification Linking Count


Verdi Coverage provides a set of link count attributes with the spec_link_count prefix that
identifies all linked specifications with a plan. These attributes show the number of links to a
feature or sub-feature from a given specification document. These attributes are automatically
created when you associate specifications with the plan. You can link the plan with more than one
specification; the number of the associated specifications determines the number of
spec_link_count attributes in the plan. Each specification generates only one
spec_link_count attribute. The initial value of this attribute is zero and it gets updated when
the feature of the plan gets linked to or unlinked from the specification. You cannot edit this
attribute; it is automatically populated when the specification is linked with its associated text.
When you associate a specification file with a plan, Verdi Coverage generates the
spec_link_count_<filename> attribute to count the number of links in the specification
from the plan. The type of this attribute is integer and its propagation is set to no so that the value
does not propagate to the child node. The attribute is available in the Hvp pane and in the
Attributes section of the HvpDetail pane as shown in the following figure:

You can use the spec_link_count attribute for quick filtering and for creating modifiers, like
any other integer-valued attribute. To use the spec_link_count attribute, filter only the
features that link to a specific specification. For example, consider the following filter statement:
remove feature where spec_link_count_my_doc == 0;

In the example, the statement creates a filtered plan with only features that link to the my_doc
specification.
For details on filters and modifiers, see the Using Modifiers section.

95 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

PDF Reader Bookmark Support


Verdi enables you to use bookmarks to perform specification linking quickly. You can select a
bookmark in the specification document to directly move to the required section and then link the
section to the plan.
When you open the specification to create the link with the plan, it does not show bookmarks by
default.
To perform specification linking using bookmarks, perform the following steps:
1. In the HvpDetail pane, select Spec Files.
2. Click the Associate a Spec icon to open the Choose a spec file form.
3. Select the specification file and click Open. Then, double-click the specification file to open
it.
4. Click the Show/Hide Utility Pane icon in the Specification pane to display bookmarks.
5. Select a bookmark from the Bookmarks tab to show its corresponding text in the
specification file. Select the text to create a link and click Create a new feature and link to
the section icon to link the section to the plan as shown in the following figure:

If a PDF does not contain any bookmarks, then this feature is not enabled. For example, see the
figure below that shows that the Bookmarks tab is disabled.

Feedback Verdi Coverage User Guide and Tutorial 96


Using Verification Planner

97 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Excluding Ignore Sections From the Specification Coverage


Computation
Computing specification coverage for all features in the specification requires them to be verified
against the corresponding features in the verification plans. Normally for SoC-level testing, it is
not required to verify IP-level features; therefore, these features of the specification are not
relevant for calculating specification coverage. Using specification linking, you can search for
these irrelevant sections in the entire specification and mark them as ignored.
Previously, specification total lines were used as a denominator for calculating specification
coverage as follows:
Denominator = Total Lines
Uncovered Lines = Total Lines - Linked Lines - Todo Lines - Ignored Lines

Now, specification linking can exclude ignored sections from the specification total lines and use
its result as a denominator for calculating coverage as follows:
Denominator = Total Lines - Ignored Lines
Uncovered Lines = Total Lines - Linked Lines - Todo Lines - Ignored Lines

To exclude ignored sections from the specification total computation, select the Exclude ignored
text from spec coverage option from the Plan View - Spec Link dialog box as shown in the
following figure:

Figure: Plan View - Spec Link

Feedback Verdi Coverage User Guide and Tutorial 98


Using Verification Planner

For example, consider the v1.pdf specification that has total lines as 276. Previously, if 21 lines
were marked as linked, 32 lines as todo, and 77 lines as ignored, then the denominator and
uncovered lines were calculated as follows:
Denominator = 276
Linked = 21/276
Todo = 32/276
Ignored = 77/276
Uncovered = 276 - 21 - 32 - 77 = 146/276

The following figure shows how denominator was calculated previously:

Now, if 21 lines are marked as linked, 32 lines as todo, and 77 lines as ignored, then the
denominator and uncovered lines are calculated as follows:
Denominator = 276 - 77 = 199
Linked = 21/199
Todo = 32/199
Ignored = 77/276 (For ignored, total lines are used as a denominator)
Uncovered = 276 - 21 - 32 - 77 = 146/199

The following figure shows how denominator is calculated now:

Limitations
The specification-linking feature has the following limitation:

99 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

• Rotated text is not well supported, you might not able to select it. This also impacts line
coverage. For example, in the following figure, the text selected covers two lines.

When the text is rotated as shown in the following figure, the text selection covers many lines
instead of two lines as shown in the previous figure. This might impact line coverage.

Feedback Verdi Coverage User Guide and Tutorial 100


Using Verification Planner

Running a Specification Review


When you have an updated specification, you can update and review the linked specification in
the Spec Review Window. There might be some mismatched and missing sections of the linking
features between the new and linked specifications. In these cases, unresolved sections have to be
reviewed.
The following sections describe how you can use this feature to perform the specification review.

Using Specification Review Flow


To start reviewing a specification, you need to select a plan in the HVP tab and then, perform the
following steps:
1. Select the linked specification you want to inspect and review it in the Spec Files tab of the
HvpDetail pane (see Figure Select a New Specification).
2. Click the icon and select the specification file you want to compare in the invoked
Choose a spec file dialog box.
3. Click the Open button.

Figure: Select a New Specification

4. The Spec Review Window form is opened with the comparison between the current and the
new specifications, as shown in Figure Spec Review Window. The status field of the
selected current specification is changed to Updating.

101 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Spec Review Window

Figure: the Updating Status

The Current spec and New spec fields show the paths of the current and new specifications. The
Review Summary field (as shown in Figure Review Summary) in the Spec Review Window
shows how many unresolved sections need to be reviewed, including mismatched and missing
ones.

Figure: Review Summary

The matched, unmatched, new, or missing sections or lines are identified. The current
specification is annotated for the unresolved section links and the new specification is annotated
with all mapped section links. The missing linked sections that cannot be mapped 100%
accurately (the content and the relative location of the section link are not changed) are
highlighted in red. The mismatched linked sections that contain mismatched wording are
highlighted in yellow. A matched section is highlighted in green.

Feedback Verdi Coverage User Guide and Tutorial 102


Using Verification Planner

Reviewing Specifications
In the Spec Review Window, you can click the Previous or Next button to find out and check the
previous or next unresolved section. After checking it, you can use the Accept or Reject buttons
to accept or reject the mappings of the mismatched section links from the current specification to
the new one. For missing sections, you can only use the Reject button to reject it. You can also
use the Accept All and Reject All buttons to accept and reject all unresolved sections. After you
accept or reject a mapped section, the Review Summary field is also updated accordingly to
show one less unresolved section.
After all the unresolved sections are reviewed and either accepted or rejected, the Matched
number in the Review Summary field displays 0 and disappears to signify that there are no more
updated sections to review.
You can click the Close button to stop review in the invoked Spec Review form.
When your review has no remaining conflicts, the following form is opened.

If you want to accept the updates during the review, click the Accept button. The linked
specification in the HVP planner is updated to the new one. If you want to cancel updating the
specification, you can click the Revert button to cancel all decisions (accepted or rejected) made
in this reviewing. The linked specification remains the original one. The status is changed to
‘Linked’ after clicking either Accept or Revert the buttons.

Figure: the Linked Status

103 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

When a review still has some unresolved sections, the following form is opened.

Click the Close button to close the review first and click the icon to continue the review later.
Click the Revert button to stop the review and revert the linked specification to the previous
version. You can also click the Cancel button to back to the current review.
You can click the undo icon in the Hvp pane to undo the following actions during the review:
• Start a specification review with a new specification.
• Review all unresolved sections.
• Complete the review and the old specification is replaced by the new one.

Feedback Verdi Coverage User Guide and Tutorial 104


Using Verification Planner

Configuring the Linked Feature


You can specify coverage metrics in the Hvp pane by clicking the icon or using the
New Measure command in the right-click menu.
After a measure is created and selected in the Hvp pane, the Metrics and Section panes are shown
in the HvpDetail pane for the selected measure. As shown in Figure Measure Detail, you can
configure the selected measure in the HvpDetail pane.

Figure: Measure Detail

Select a measure in the Hvp pane and click the Select button in the Metrics pane of the HvpDetail
pane to set the coverage metric for the selected measure. As shown in Figure Select Metrics, the
metrics are listed in the Metrics form.

105 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Select Metrics

For example, if your requirement is to check only assertion metrics in the design, select the
"Assert" metric and click the OK button in the Metrics form.
The HVP planner also supports correlating the selected source code information with a metric.
You can click the icon in the Sources pane of the HvpDetail pane to directly assign the source
code type and region name in the New Source form.

Figure: Assign New Source

Alternatively, you can drag an item from the Hierarchy, Modules, Groups, or Asserts pages in the
Summary pane and drop to the Sources tab of the HvpDetail pane to correlate a metric and source
code type. For example, drag an assert from the Asserts page in the Summary pane and drop it to
the Sources pane of the HvpDetail pane.

Feedback Verdi Coverage User Guide and Tutorial 106


Using Verification Planner

As shown in Figure Assign New Source by Dragging and Dropping, you can see a property is
added in the Measure:Measure_1 details page of the HvpDetail pane and the source is added
under the Measure_1 measure in the Hvp pane.

Figure: Assign New Source by Dragging and Dropping

You can also drag a source from the tabs in the Summary pane and drop to the feature row in the
Hvp pane. A new measure is created and the metrics are automatically specified for the source
(refer to the Adding Features From Coverage Database section for details).
After the source information has been populated, you can recalculate the metrics in this plan by
clicking the icon in the Hvp pane. After calculating the plan, the average percentage scores of
all the built-in metrics mapped to a feature are shown in the Hvp pane.
You can use the Plan  Save Plan As command to save the plan in hvp format. The saved plan
can be reloaded in the future.
You can also mask features of a verification plan that have met all of their goals.

Click the icon in the Hvp pane toolbar to enable the Hide features meeting goals option.
After this option is enabled, only the features that have not met their goals are kept in the Hvp
pane.

107 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Measure Concealment in Reports


Currently, HVP provides the flexibility to create multiple measures and metric sources within
features. Though this flexibility is useful for many HVP use models, it might produce complex
reports for simple models. HVP is now enhanced to simplify usage and reporting for portions of
the plan that follow a simplified pattern of a single source for each feature. This is referred to as
a 1:1:1 feature because one feature contains one measure and one source.
You can conceal a measure in a report if a feature qualifies the 1:1:1 compression. Verdi can infer
from the structure of the feature whether it is qualified for the 1:1:1 compression. To qualify for
the compression, the feature should meet the following criteria:
1. The feature is a leaf feature, that is, it does not contain any subfeature.
2. The feature contains exactly one measure.
3. The measure contains exactly one source.
4. The source name should not contain wildcard and regular expressions.
For example, the following feature is qualified for the 1:1:1 compression:
feature cd;
Metrics = "Line, Cond";
measure test Measure_1;
source = "cd";
endmeasure
endfeature

Use Model
To conceal measures for features that have one measure and one source, perform the following
steps in the Verdi GUI:
1. Select Tools > Preferences to open the Application Preferences dialog box and select
Enable measure concealment (see the figure below) in Plan View.

Feedback Verdi Coverage User Guide and Tutorial 108


Using Verification Planner

2. Click OK to enable measure concealment that allows you to create a compressed feature
and a compressed feature template.
To create a compressed feature in a plan, click the Creates a New Compressed Feature icon
in the Hvp pane. The icon displays the New Compressed Feature dialog box to specify the
feature name, its metrics, its source type, and its region name (see the figure below):

109 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Alternatively, you can right-click the plan and select New Compressed Feature to create a
compressed feature (see the figure below):

For example, a new compressed feature, cd with metrics as Line and Condition, gets added
to the plan, myplan as follows:

To create a compressed feature template, use the Compressed Feature Template icon in the
Hvp pane. Alternatively, you can right-click a feature and select Mark As Feature Template to
make the compressed feature template (see the figure below).

Feedback Verdi Coverage User Guide and Tutorial 110


Using Verification Planner

Once a compressed feature becomes a template, the Compressed Feature Template icon
shows the details of the compressed feature template. For example, if you mark cd as a feature
template and select the Compressed Feature Template icon, the icon shows the details - such
as its name, metrics, source type, and region name - of the compressed feature in the tool tip as
follows:

You can also mark an existing feature in the Modules tab or in the Groups tab as a compressed
feature. For this, right-click the existing feature and select Add to Plan (template). For example,
consider the fifo feature in the Modules tab of the Summary pane that has metrics as Line,
Toggle, Condition, and Branch (see the figure below):

111 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

If you mark fifo as a compressed feature by selecting Add to Plan (template), the feature gets
added to the plan, becomes compressed, and shows only Line and Condition metrics details (see
the figure below).

Feedback Verdi Coverage User Guide and Tutorial 112


Using Verification Planner

Loading a Predefined HVP File


If a predefined plan has already been created, a plan can be loaded into the HVP planner. The hvp
format file can be created in the coverage GUI with the method described in the Configuring the
Linked Feature section or created ahead of time in hvp format. The default HVP file with .hvp
extension name can be loaded using the Plan  Open Plan command.
After a plan is loaded into the Hvp pane, you can recalculate the coverage metrics per this plan by
clicking the icon.
An existing plan can also be loaded in the XML Spreadsheet 2003 format using the Plan  Load
Excel XML command.
You can also generate a report in the XML Spreadsheet 2003 format from an existing HVP file
by using the Plan  Report command. The generated report is for viewing purposes only, it
cannot be loaded into Verdi Coverage as an HVP file.

User Data As a Spreadsheet Worksheet


Verdi Planner provides user data in a single spreadsheet in the same XML plan document that
contains test data. For this, you can enter both data in separate tabs called test and user data
respectively in the same spreadsheet. To specify test data and user data, use hvp test and hvp
userdata as table tags respectively.
The figure below shows a single XML spreadsheet with tabs: test and userdata. In the userdata
tab, the hvp userdata tag is used to specify user data. The user metric is in tag row C1:my_int
and D1: status. Empty cells in C indicates that there is no data for its corresponding metric,
my_int, and empty cells in D indicate that there is no data for the given metric status.

113 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

For user data, Verdi Planner generates a user data file with the following naming convention:
<plan_filename>.hud

where, hud is the suffix for HVP User Data files.


In the above figure, Verdi Planner generates the user data file with the name as spec.xml.hud.
This section consists of the following subsections:
• Use Model
• Backward Compatibility

Use Model
To annotate user data text files against an XML spreadsheet plan that results in scores being
annotated to the .xml report, use either of the following user interfaces:
• Command Line
• Verdi GUI

Command Line
To annotate user data text files against an XML spreadsheet plan, use the following command:
hvp annotate -plan <plan_file>

where,
• -plan <plan_file> is a spreadsheet or doc XML file with user data for your
verification plan.

For example:
hvp annotate -plan test.xml

Verdi GUI
To annotate user data text files against an XML spreadsheet plan using the Verdi GUI, perform
the following steps:
1. Load the Verdi Coverage GUI using the following command:
verdi -cov -covdir <coverage_database.vdb>

2. Change the mode of the window to Plan mode using Windows -> Plan Mode.

Feedback Verdi Coverage User Guide and Tutorial 114


Using Verification Planner

3. Load an XML Spreadsheet using Plan -> Load Excel XML to open the Load Excel XML
dialog box (see the figure below):

4. Select an XML plan file having user data using the Browse button.
5. Click OK to automatically generate <plan_filename>.hud along with
<plan_filename>.hvp.

Backward Compatibility
To generate an XML spreadsheet plan with user datasheets, you need the latest VCS and Verdi
Coverage version, that is above L-2016.06-1. For previous versions, Verdi Planner does not
annotate user data to the plan even if the XML spreadsheet contains user data.

115 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Loading and Saving a Verification Plan


Using Environment Variables
In previous releases, you used to browse through different directories to load and save a
verification plan. Verdi Planner is now enhanced to support environment variables for loading and
saving a plan. Using environment variables, you just need to specify the file name instead of
specifying the long path of the file. You might use environment variables to specify the path of a
project, plan, CRM, and design root in the File Name field of the Load or Save dialog box.
To set the environment variables for the design root, project, plan, and CRM, use the following
commands:
setenv DESIGNROOT <designroot_path>
setenv PROJ_HOME <project_path>
setenv PLAN_HOME $PROJ_HOME/<plan_path>
setenv CRM_HOME $PROJ_HOME/<crm_file_path>

An example to use an environment variable in the File Name field of the Save As dialog box in
the Verdi GUI is shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 116


Using Verification Planner

An example to use an environment variable in the File Name field of the Load dialog box in the
Verdi GUI is shown in the following figure:

To load a verification plan, you can also provide environment variables on the Verdi command
line as follows:
verdi -cov -covdir $DESIGNROOT/<designroot_path> -plan $PLAN_HOME/<plan_name>
-userdata $CRM_HOME/<crm_file_path>

For example, the following command loads myplan.hvp using DESIGNROOT, PLAN_HOME,
and CRM_HOME environment variables:
verdi -cov -covdir $DESIGNROOT/simv.vdb -plan $PLAN_HOME/myplan.hvp -userdata
$CRM_HOME/bugs.txt

117 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Showing Missing Scores


Verdi enables unmatched coverage sources to affect plan scores using the Show Missing Scores
option in the Verdi GUI. These unmatched coverage sources are scored as zero, by default. You
might deselect this option to produce no scores for the unmatched coverage scores. The option
produces no score in the following scenarios:
• The sources do not match any object in the .vdb database.
• The measure statements have no sources.
• The sources match an object in the .vdb database but when no metric is measured.

Consider the top plan that has a feature f1 with has four sub-features, have_matchs,
no_match, no_source, and no_measure. The coverage score of no_match,
no_source, and no_measure is zero as shown in the following figure:

In the figure above, even unmatched coverage features — such as no_match, no_source,
and no_measure — are considered for coverage computation as the Show Missing Scores
option is selected. If you deselect this option, then these unmatched coverage features are not
included for coverage computation as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 118


Using Verification Planner

Graphical Traceability Support


Verdi Planner provides a new report that can be generated from an annotated verification plan that
exports data in the FreeMind format and allows you to see relationships between features and
enum metric values. The most common usage is to chart the relationship between features and
their test pass/fail results. This allows you to use the graphical report to trace from a feature to its
test results and vice versa.
This section consists of the following subsections:
• Use Model
• Limitations

Use Model
Verdi Planner exports an annotated plan to the FreeMind XML format that enables you to view
HVP enum results using the FreeMind tool. The FreeMind node structure is similar to the HVP
hierarchy tree. Only the naming conventions are different, such as HVP test enum result is leaf
node in the FreeMind tool, HVP plan or feature is fork in the FreeMind tool, and HVP region is
the FreeMind bubble.
To export an HVP to the FreeMind XML format, the FreeMind XML Format option is added
to the Verdi GUI. This section consists of the following subsections:
• User Interface
• User Flow

User Interface
To export an HVP to the FreeMind XML format, perform the following steps:
1. Load the Verdi Coverage GUI using the following command:
verdi -cov -plan <plan_file> -userdata <userdata_files>

For example:
verdi -cov -plan test.hvp -userdata test.hud

2. To select the top-level plan to export, select Plan -> Report. It opens the Report dialog box
(see the figure below).

119 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

3. Click FreeMind XML Format from the Options group box to export the plan to the
FreeMind XML format. When this format is selected, all other configurations such as
Columns, Annotation, and Separate Column become disabled and the text box of the
exported XML file is updated to <plan_file>.freemind.xml.

User Flow
Consider the following example to see the flow of test.hud and test.hvp:
test.hud:
HVP metric = test
/cfg/block1/test11 = warn
/cfg/block1/test12 = fail
/cfg/block1/test13 = pass
/cfg/block1/test14 = pass
/cfg/block1/test15 = fail
/cfg/block1/test21 = pass
/cfg/block1/test22 = fail
/cfg/block1/test23 = unknown
/cfg/block1/test24 = warn
/cfg/block1/test25 = assert

/cfg/block2/test1 = assert
/cfg/block2/test2 = pass
/cfg/block2/test3 = fail
/cfg/block2/test4 = pass
/cfg/block2/dummy1 = warn

Feedback Verdi Coverage User Guide and Tutorial 120


Using Verification Planner

test.hvp
plan top;
feature common;
feature block1;
test = ((test >= 10) && (test.fail <= 1));
feature Feature_1;
measure test Measure_1;
source = "/cfg/block1/test11_";
endmeasure
endfeature
measure test, test.percent.fail m1;
source = "/cfg/block1/test*";
endmeasure
measue Line m_code;
source = "tree: test_jukebox.st1";
endmeasure
measure test Measure_1;
source = "/cfg/block1/test11", "/cfg/block2/
dummy1";
endmeasure
endfeature
feature block2;
test = ((test >= 10) && (test.fail <= 1));
measure test, test.percent.fail m2;
source = "/cfg/block1/test11";
endmeasure
endfeature
endfeature
endplan

The Verdi GUI shows the following format of test.hud and test.hvp:
test.hud:

121 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

test.hvp

The FreeMind XML format is as follows:

Feedback Verdi Coverage User Guide and Tutorial 122


Using Verification Planner

Limitations
The limitations of this feature are as follows:
• Only the HVP plan, feature, or region that has matched enum value is dumped, whereas
others are skipped. Also, HVP measure/source is skipped.
• During exporting, the existing opened HVP handle is used. If HVP is not refreshed, the
exported plan is not the latest one.
To calculate the specification coverage for both main plan and subplan, Verdi Coverage uses the
Merge Specification Coverage algorithm. The algorithm provides priority to calculate each plan,
which is categorized as "Linked", "Ignored", and "Todo". The priority sequence of these
categories is as follows:
Linked > Ignored > Todo
The following table shows the priority sequence as per the Merge Specification Coverage
algorithm:

Merge Specification Coverage


Main Plan Subplan
Algorithm
Linked Ignored Linked

Unlinked Todo Todo

Todo Ignored Ignored

Todo Linked Linked

NOTE: Main plans and subplans should share the same margin for merging the specification
coverage, otherwise, coverage merge cannot happen among plans.

123 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Using Derived Test Metrics


Verdi Planner supports the following additional built-in derived test metrics to track verification
progress:
• Percent Metric for Test Metric
• test.completion Metric
Using these derived metrics, you can gather the percentage of tests with different status and test
completion percentage in a verification plan.

Percent Metric for Test Metric


In previous releases, the built-in test metric of enum type reports integer count for sub-metrics
test.pass, test.fail, test.warn, test.unknown, and test.assert. For example,
test = 6;
test.pass = 3;
test.fail = 3;

In previous releases, the test metric reports the basic number of tests with status pass, fail, warn,
unknown, and assert in the HVP annotated report. It does not display the percentage of these
scores.
Verification Planner for Verdi reports percentage score for each enum value of the test metric.
This enables you to get the percentage of tests with status pass, fail, warning, unknown, or
assert. The following is the list of the derived percent sub-metrics:
• test.percent.pass
• test.percent.fail
• test.percent.warn
• test.percent.unknown
• test.percent.assert
The score of a percent metric is the percentage of each enum’s value of the test metric against the
total number of tests in that feature.
For example, if a is the integer count of the built-in test metric enum value and b is the integer
count of the total number of tests, then the percentage metric is computed as follows:
(a / b)*100

For example, if
test.pass = 8
test.fail = 2
test = 10

Feedback Verdi Coverage User Guide and Tutorial 124


Using Verification Planner

then the value of test.percent.pass = 8/10 and is reported as 80%.


The following is the example for the usage of percent metrics:
feature f1;
test.percent.pass = test.percent.pass > 60%;
measure test, test.percent.pass m1;
source = "testname*";
endmeasure
endfeature

Consider the following example:


feature parent:
test:6[pass:3 fail:3 warn:0 assert:0 unknown:0 ]
test.percent.pass:50.00%
feature block1
test:5[pass:3 fail:2 warn:0 assert:0 unknown:0 ]
test.percent.pass:60.00%
feature block2
test:1[pass:0 fail:1 warn:0 assert:0 unknown:0 ]
test.percent.pass: 0.00%

In this example, the test.percent.pass score in feature parent is calculated from the test score of:
feature parent test:6[pass:3 fail:3 warn:0 assert:0 unknown:0] 50%

which is equal to 3/6. The total test score of feature parent is the sum of the test scores of feature
block1 and feature block2.
The following figure shows the derived sub-metrics displayed by Verdi coverage:

Figure: Viewing Percent Metric in Verdi Coverage

125 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

test.completion Metric
The test.completion metric allows you to measure the progress of tests being written against the
number of tests expected to be written.
The score of the test.completion metric is the ratio of total integer count of all sub-metrics of the
test metric (test.pass, test.fail, test.warn, test.assert, test.unknown) and the expected number
of tests in a plan/feature. The expected number of tests should be set using the test.expected
attribute.
Where, test.completion=total_test_count/test.expected and
total_test_count=test.pass+test.fail+test.warn+test.as sert+test.unknown

Test.expected Attribute
You can use the test.expected built-in attribute assignment, as shown below, to set the expected
number of tests in feature/plan scope.
test.expected = <number>;
The expected number is like an annotation value kept in feature/plan node. The default value of
test.expected is 0.

Figure: Viewing test.expected in Verdi Coverage

The test.completion metric can be calculated only after setting the test.expected attribute.
The following example illustrates the usage of the test.completion metric:
feature Goal_pass;
test.expected = 2;
test.percent.pass = (test.percent.pass >= 0.5);
measure test, test.percent.pass, test.completion Measure_1;
source = "test3";
endmeasure
endfeature

Feedback Verdi Coverage User Guide and Tutorial 126


Using Verification Planner

Figure: Viewing test.completion Metric in Verdi Coverage

127 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Using Test Name as HVP Source


Verdi Coverage lets you add a test as the source for an HVP plan from the following sources:
• User Data File
• Loaded Test List
The following sections describe how you can use this feature:

Adding a Test Source


Verdi Coverage lets you add a test from the Test Pane via drag-drop and Copy/Paste operations.
If you add a source using this method, Verdi automatically selects the corresponding test metric.

Figure: Test Details

Feedback Verdi Coverage User Guide and Tutorial 128


Using Verification Planner

Used/Unused Marker for Test Pane


Verdi Coverage marks used/unused tests in the Test pane as shown the following figure:

Figure: Used/Unused Marker

Conflict Resolution
When Verdi Coverage detects a conflict, it resolves it using the following rules:

Conflict Take Priority


VDB and Execution Manager DB Execution Manager session
VDB directory and user data User data

VDB and VDB have the same If there is more than one test run with the same
user test name user name, Verdi matches them all like a
wildcard.

For example, consider a scenario where a test passes for the loaded VDB as shown in the
following figure:

Figure: Tests Run With VDB

Now, consider that you also load user data; the test status changes to the following:

129 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Tests Run With User Data

As user data results takes precedence over VDB test results as user data gets higher precedence
in a conflict situation.

Feedback Verdi Coverage User Guide and Tutorial 130


Using Verification Planner

Using User-Defined Attributes and Metrics


Verdi Coverage supports creation of specialized attributes and metrics that are customizable to the
design in the planner.

Creating Attributes
As shown in Figure Add a Customized Attribute, create an attribute for the selected plan by
clicking the icon in the Attribute pane of the HvpDetail pane. You can specify the identifier,
type, and default value in the New Attribute form.

Figure: Add a Customized Attribute

131 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

As shown in Figure Added root_mode Customized Attribute, the root_mode attribute is an


attribute of the myplan plan.

Figure: Added root_mode Customized Attribute

The new attribute can be used as a variable as part of the property to denote the source
information. For example, add a source region under the Measure_2 measure and rename the
source region with ${root_mod}.read (see Figure Show Source Snapshot). You can click the
icon to show the source snapshot in a new tab after the plan is modified. The source text shows
the definition of the root_mod user-defined metric.

Figure: Show Source Snapshot

Feedback Verdi Coverage User Guide and Tutorial 132


Using Verification Planner

The set Type Attribute


Verification Planner provides a new attribute type named set. A set is a group of discrete objects
or numbers, considered as an entity. Each object or number in a set is known as a member or an
element of the set. When the elements of a set is listed, these elements are enclosed in curly
brackets. For example, a set (say, A) of natural numbers from 1 to 5 is denoted as follows:
A = {1, 2, 3, 4, 5}
The order in which the elements of a set appear does not matter. For example, consider another
set (say, B) that consists of natural numbers from 1 to 5 as follows:
B = {4, 3, 2, 1, 5)
Set A and B are considered as equal as they have the same elements in different order.
If two sets have same elements but the elements appear multiple times in one set, even then these
sets are considered as same. For example, consider the following set C:
C = {4, 2, 2, 3, 1, 1, 5, 5}
Set A, B, and C are considered as same irrespective of multiple elements in different order.
If every member of set X is also a member of set Y, then X is a subset of Y. For example,
X {1, 3} is a subset of Y {1, 2, 3}. However, Z{1, 4} is not a subset of Y as element 4 does not
exist in Y {1, 2, 3}.
The set type enables you to specify multiple values for an attribute. To declare an attribute of
the set type in the HVP, use the following syntax:
attribute set{<element_list>} identifier = <default_set_value>;
identifier = <set_value>;

where <set_value> is an identifier. Identifiers in <set_value> must start with an


alphabetic character, but otherwise can use alphanumeric or the underscore character in their
names.
For example, the following code shows the definition of the my_set attribute of type set with
values as S0, S1, S2, and S_other:
attribute set{S0, S1, S2, S_other} my_set = {};
my_set = {S0, S2};

Attributes of type set in a plan can be propagated to sub-plans by setting their propagation value
to Yes. The attributes propagated from a parent plan cannot be modified in a sub-plan. The
attributes defined in a sub-plan can be used within the sub-plan but are not visible in the parent
plan.
The set attribute type allows you to perform filtering. The set type can be filtered using the ==
and != operators. Operators such as >, <, >=, <=, +, -, * and / are not supported.

133 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

For example, consider the following filter that shows the usage of == and != operators:
filter eg_filter;
//# == and != is an exact match,
//# {S0} == {S1,S2} returns false
//# {S0,S1,S2} != {S0,S1} returns true
remove feature where my_set == {S0,S1};
keep feature where my_set != {};
endfilter

In the example above, the my_set == {S0,S1} filter removes the features where my_set is
exactly {S0,S1}. However, the my_set != {} filter restores any feature that has a null
my_set.
Verification Planner also provides the contains function for filtering with the set type
attribute:
contains(<set_attribute_identifier>, <set_val>)

The contains function returns true when <set_val> is equal to or a subset of the value of
the set type attribute specified by <set_attribute_identifier>. Also, consider the
following contains statement that always returns true because the null set is a subset of every
set:
contains(any_attribute, {})
Consider the following filter:
filter eg_filter;
//# returns true when my_set contains both S0 and S1
//# {S0,S1,S2} != {S0,S1} returns true
remove feature where contains (my_set, {S0,S1});
keep feature where my_set == {S0, S1};
remove feature where contains (my_set,{S0})&&(contains(my_set,{S1}));
endfilter

In this example, the filter removes all features that contain S0, S1, and some other set member.
It does not remove any feature that has my_set defined exactly as {S0, S1}.

Note:
The contains(my_set, {S0, S1})criteria is exactly the same as the
"contains(my_set, {S0}) && contains(my_set, {S1})" criteria.
This section consists of the following subsections:
• HVP
• Verdi GUI

Feedback Verdi Coverage User Guide and Tutorial 134


Using Verification Planner

HVP
Consider the following HVP file, spec.hvp, which shows the definition of the set type
attribute, my_set and six features (F_1, F_2, F_3, F_4, F_5, F_sub1, and F_sub2) that
contains different values of the attribute:
plan New_Plan;
attribute set{S0,S1,S2,S_other} my_set = {S0,S2};
feature F_1;
my_set = {S0,S1};
endfeature
feature F_2;
my_set = {S0,S2};
endfeature
feature F_3;
my_set = {S1,S2};
endfeature
feature F_4;
my_set = {};
endfeature
feature F_5;
my_set = {S0,S1,S2,S_other};
endfeature
feature F_sub1;
my_set = {S0,S2};
endfeature
feature F_sub2;
my_set = {S0,S2};
endfeature
endplan
The New_Plan HVP plan is represented in a spreadsheet XML plan as follows:

The attribute definitions of my_set in the spreadsheet plan appears as follows:

135 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

In a Word XML plan, you can add the attribute definitions of my_set as follows:

Verdi GUI
To create a set type attribute in Verdi, perform the following steps:
1. Click the Create an attribute icon to display the New Attribute dialog box.
2. In the New Attribute dialog box, specify Identifier as the name of the attribute (say,
my_set). To make an attribute of type set, select Type as set and specify its values as
follows:

3. To add the values of this attribute in the sub-plans along with the main plan, mark
Propagation to Yes.
4. To specify the default value of this attribute, use the Default value field. If you do not
specify the default value of this attribute, the default value of this attribute is considered as
an empty set, that is {}.

Feedback Verdi Coverage User Guide and Tutorial 136


Using Verification Planner

5. Click OK to add the my_set attribute in the Attributes tab of the HvpDetail window. You
can see its corresponding plan in the Hvp window in the Verdi GUI, which is as follows:

You can apply filters on the features of the plan using the following methods:
• Load Modifiers
• Quick Filter

Load Modifiers
To apply filters on the plan using the .hvpmod file, click the Load modifiers icon in the
Hvp window. The icon enables you to load the modifiers in the Verdi GUI.
To load a specific modifier, select its file name from the Hvp window. Loading the modifier
implements the criteria specified in the .hvpmod file. For example, consider the
my_filter.hvpmod file that contains the following criteria:
filter my_filter;
remove feature where contains (my_set, {S1, S2});
endfilter

When the my_filter.hvpmod file is loaded, it implements the above criteria on the
New_Plan plan and removes the F_3 feature and the F_5 feature as they match the criteria (see
the figure below):

137 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Quick Filter
You can also apply filters using the Quick Filter icon in the Hvp pane. The icon uses the
contains operator for extracting the filtered results instead of the == operator. To select the
criteria for quick filtering, click adjacent to the set type variable column. For example, click
adjacent to the my_set variable to display the list of criteria that can be used for filtering (see
the figure below).

where, the Contain All option selects all elements of the defined set. This option selects all other
check boxes except {}.
A set can have any number of elements starting from none to many. The number of elements in
a set is called the cardinality. A set with no element is known as the empty set (or the null set) and
is represented by {}. The cardinality of the null set is zero. A null set is always a member of every
set including the null set itself. Therefore, evaluating whether {} is contained within any set
should always resolve to "true". The {} option in the Hvp pane selects all sets as an empty set is
contained in all sets. This option deselects all other check boxes.
For example, if you select S0 and S1 as criteria for filtering, Verdi returns the features that
contain {S0,S1} instead of {S0} or {S1} (see the figure below).

Feedback Verdi Coverage User Guide and Tutorial 138


Using Verification Planner

In the example, if you select Contain All, Verdi returns the features that contain
{S0,S1, S2, S_other}(see the figure below).

In the example, if you select {}, Verdi returns all features (see the figure below).

139 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Creating Metrics
After a plan is created or loaded in the Hvp pane, the default metrics are shown in the Metrics tab
of the HvpDetail pane with the gray icon. The tool only displays the metrics in the pane selected
for the measure in the feature view as shown in Figure Default Metrics. You can add your own
metrics and recalculate the coverage for the plan.

Figure: Default Metrics

You can toggle the button to display or hide the metrics as shown in
Figure Toggling to Display All Metrics.

Figure: Toggling to Display All Metrics

If your data which contain the metrics information is loaded by the Plan  Manage User Data
command, the metrics in the loaded data are also shown in the Metrics tab with the green icon.
For example, Figure Metrics Defined in the User Data shows the metrics that is defined in the
loaded user data as follows:

Feedback Verdi Coverage User Guide and Tutorial 140


Using Verification Planner

HVP metric = bugs


/cfg/data/instance_1 = 15
/cfg/data/instance_2 = 23
/cfg/data/Function_coverage = 0

HVP metric = fixed


/cfg/data/instance_1 = 11/12
/cfg/data/instance_2 = 23/23
/cfg/data/Function_coverage = 0/0

HVP metric = status


/cfg/data/instance_1 = testing
/cfg/data/instance_2 = done
/cfg/data/Function_coverage = developing

Figure: Metrics Defined in the User Data

You can also create a metric for the selected plan by clicking the icon in the Metrics pane of
the HvpDetail pane. As shown in Figure Add a New Metric, after setting done for the new metric
and clicking the OK button, the new added metric is shown in the Metrics pane with the green
icon.

141 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Add a New Metric

Adjusting Weight in a User-Defined Aggregate Metric


Verdi enables you to define weight for each base metric of a user-defined aggregate metric.
Weight for each base metric is set as 1, by default. You can specify the weight using the following
interfaces:
• Using Verdi Planner
• Using HVP

Using Verdi Planner


Verdi Planner enables you to specify weight in a user-defined aggregate metric while creating a
new metric or while editing an existing user-defined metric.
To specify the weight while creating a new user-defined aggregate metric, perform the following
steps:
1. Click the icon in the Metrics pane of the HvpDetail pane to open the New Metric
dialog box.

Feedback Verdi Coverage User Guide and Tutorial 142


Using Verification Planner

2. Specify the name of the metric in the Identifier text box, say MyAggr_Line_Cond, and
select Type as aggregate. Then, click Define to open the Metrics dialog box to edit Weight
of the selected metric:

Figure: Metrics Dialog Box

NOTE: It is recommended that the value of Weight should be more than 0. Otherwise, Verdi
Planner displays a warning message.
3. Click OK.
You can calculate the aggregate score using the Recalculate icon in the Hvp pane.
To specify the weight while editing a user-defined aggregate metric, perform the following steps:
1. Select the user-defined metric, say MyAggr_Line_Cond, and click the Edit Metric icon
in the Metrics pane of the HvpDetail pane to display the Edit Metric dialog box:

143 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Figure: Edit a Metric

2. Click Define to open the Metrics dialog box to edit Weight of the selected metric.
3. Click OK.
You can calculate score using the Recalculate icon in the Hvp pane.

Using HVP
To specify weight in a user-defined aggregate metric, use the following HVP syntax:
metric metric-type identifier;
goal = goal-specification;
aggregator = aggregator-specification;
endmetric

where,
metric-type: Specify metric type as aggregate and its syntax is as follows:
metric aggregate {metric_reference(weight=<value>)}

Consider the following example in which MyAgg_Line_Cond is a user-defined aggregate metric


that calculates average of Line and Condition metrics:

Feedback Verdi Coverage User Guide and Tutorial 144


Using Verification Planner

metric aggregate {Line(weight=1.0), Cond(weight=2.0)} MyAgg_Line_Cond;


apply = explicit;
goal = (MyAgg_Line_Cond > 0.1);
endmetric

You can calculate the aggregate score of the metric using the following:
Score of the user-defined metric = (metric1 * metric1_weight + metric2 *
metric2_weight)/(metric1_weight + metric2_weight)

Therefore, you can calculate the score of MyAgg_Line_Cond using the following:
(Line*1 + Cond*2)/(1 + 2)

Descriptions for Attribute and Metric Definitions


Verification Planner provides two types of attributes and metrics: Built-in and User-defined.
Built-in attributes and metrics are implicitly computed during annotation for every verification
plan and you cannot customize them. On the other hand, you can create your own user-defined
attributes and metrics based on your requirements. For details on creating user-defined attributes
and metrics in Verdi, see Creating Attributes and Creating Metrics.
Verification Planner provides a new feature, which allows you to add a description to your user-
defined attributes and metrics. The feature works as follows:
• You can add descriptions to all attribute types, that is, integer, real, string, enum,
and set. Also, this option is applicable to all metric types, that is, integer, enum, real,
and percent.
• You might specify more than one line as a description.
• You might use special and escape characters in the description.
This section consists of explaining how the description feature works with the following
interfaces:
• HVP
• Verdi GUI
This section also consists of the following subsection:
• Limitation

145 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

HVP
To add a description to an attribute definition in a plan, use the following syntax:
<att_name>.description = <enquoted_description_string>

For example, to add a description to the definition of a user-defined attribute Attr_Integer,


use the following in the plan:
attribute integer Attr_Integer = 1;
Attr_Integer.description = "This is an integer-type attribute. \n This is a
user-defined attribute.";

To add a description to a metric definition in your plan, use the following syntax:
metric metric-type identifier;
goal = goal-specification;
aggregator = aggregator-specification;
description = <enquoted_description_string>;
endmetric

For example, to add a description to a user-defined metric color, use the following in the plan:
metric enum {red, yellow, green, purple, black} color;
goal = (color.green >=4);
aggregator = sum;
description = "This is a color metric. \nThis is a user-defined metric.";
endmetric

To add a description to a user-defined attribute or metric in the spreadsheet XML plan, add a new
column for the description in its attribute and metric definition sheet as follows:

Feedback Verdi Coverage User Guide and Tutorial 146


Using Verification Planner

Verdi GUI
To add a description to an attribute definition in a plan, perform the following steps:
1. Click the Create an attribute icon to display the New Attribute dialog box.
2. In the New Attribute dialog box, specify Identifier as the name of the attribute (say,
Attr_Integer). To make an attribute of type integer, select Type as integer.
3. To add the values of this attribute in the sub-plans along with the main plan, mark
Propagation to Yes.
4. To specify the default value of this attribute, use the Default value field.
5. To add a description to the attribute, use the Description field as follows

6. Click OK to add the attribute in the Attributes tab of the HvpDetail pane. To see the
description of this attribute, hover the pointer over the attribute in the Attributes tab. For
example, see the figure below for the description of Attr_Integer:

147 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

To add a description to a metric definition in your plan, perform the following steps:
1. Click the Create a metric icon to display the New Metric dialog box.
2. In the New Metric dialog box, specify Identifier as the name of the metric (say, color).
To make a metric of type enum, select Type as enum and specify its values as {red,
yellow, green, purple, black}.
3. You can specify the coverage goal of the metric in the Goal field. For example, specify
(color.green >=4); in the Goal field.
4. Select Aggregator as sum or uniquesum based on your requirement.
5. To add a description to the metric, use the Description field (see the figure below):

6. Click OK to add the metric in the Metrics tab of the HvpDetail pane. To see the description
of this metric, hover the pointer over the metric in the Metrics tab. For example, see the
figure below for the description of color:

Feedback Verdi Coverage User Guide and Tutorial 148


Using Verification Planner

Limitation
The feature has the following limitation:
• If you add a description for an attribute in the main plan, the planner does not add the
description to its sub-plans. Similarly, if you add the description in a sub-plan, the planner
does not add the description to the attribute/metric in the main plan.

149 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Using Modifiers
You can load modifiers to modify a plan hierarchy outside of Hvp planner definition files using
plan modifiers: override and filter.
You can use one of the following methods to load modifiers:
• Click the icon and select the modifier file(s) in the invoked Load Modifier form.
• Add the -mod <modifier_file> option on the command line when you invoke Verdi
Coverage. For example,
%> verdi -cov -plan <plan>.hvp -mod <modifier_file>.hvpmod

After the modifier is loaded into Hvp planner, the planner is modified accordingly and the
Modifier pane is shown with the modifier.

Figure: Load Modifier

You can recover the modification by disabling the check-box in the beginning of the row.
The first listed modifier (in the top) modifies the plan first. You can also use the or icons
to change the order of the modifiers.

Feedback Verdi Coverage User Guide and Tutorial 150


Using Verification Planner

Hiding Complete Features Using the Toggle


Filter
Verdi enables you to toggle between complete and incomplete features of a plan. A feature is an
incomplete feature if it satisfies the following rules:
• A feature is a leaf feature if it does not have any sub-feature or sub-plan.
• A feature has no measures or a feature has measures but these measures have no source.

To toggle between complete and incomplete features, Verdi provides the


Hide Complete Feature icon in the Hvp pane. The icon hides all complete features of a plan
to focus mainly on its incomplete features.
Consider the P1 plan in the following figure that consists of a complete feature, F1, and
incomplete features, F2, F3, and Sub1:

To hide complete features of P1, click the Hide Complete Feature icon. The following figure
shows only the incomplete features, such as F2, F3, and Sub1:

where, F2 is an incomplete feature as its measure M1 does not have any source.
F3 is a leaf feature as it does not have any sub-feature or sub-plan.

151 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Propagation of Values
Starting with this release, Verdi Planner highlights attribute values in a plan or sub-plan that are
modified. If you edit an attribute field in Verdi Planner, its Origin field becomes assigned. In
addition, Verdi provides you an option to revert to the default values of the fields. Once the values
are reverted, their Origin field is assigned as default or derived based on the propagation property
of the field.
This section consists of the following subsections:
• Highlighting Values
• Reverting to Default Values

Highlighting Values
Consider the following figure that shows the P1 plan, the owner column and the weight
column:

If you change the weight value of F1 from 1 to 5, Verdi Planner highlights this updated value in
bold and italics format as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 152


Using Verification Planner

You might propagate a value of an attribute from a feature to its sub-features or a plan to its sub-
plan. For this, specify the Propagation field of the attribute to Yes. For example, the following
figure shows an attribute, weight_prop, whose Propagation field is marked as Yes:

Once you click Ok in the New Attribute dialog box, the default value of this attribute is applied
to all features and their sub-features as shown in the following figure:

153 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

If you change the weight_prop value of F1 to 100, this value gets propagated to the sub-
features of F1. The following figure shows that the weight_prop value of F11, F12, and
F121 is 100:

Though the values of F11, F12, and F121 are propagated, you might change the values as per
your requirement. For example, you might update the value of F11, F12, and F121 to 101, 102,
and 103 respectively. Once the values are updated, Verdi Planner highlights these updated values
as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 154


Using Verification Planner

Calculating the Count of Covergroup Bins


Verdi enables you to view the covered, uncovered, excluded, and total unweighted count of
covergroup bins under a feature in an HVP plan. Verdi provides the following Group.*_count
built-in submetrics in the HVP pane:
• Group.covered_count: Enable this submetric to view the number of covered bins for each
feature in a plan.
• Group.uncovered_count: Enable this submetric to view the number of uncovered bins for
each feature in a plan.
• Group.excluded_count: Enable this submetric to view the number of excluded bins for
each feature in a plan.
• Group.bin_count: Enable this submetric to view the total number of covered and
uncovered bins for each feature in a plan.
For details on Group.*_count submetrics, see the following sections:
• Enabling Group.*_count Submetrics
• Generating the URG Report to View Group.*_count Submetrics

Enabling Group.*_count Submetrics


To enable the covered, uncovered, and excluded count of covergroup bins, perform the following
steps:
1. Click the Configure Columns icon in the HVP pane to display built-in and user-defined
submetrics. The following figure shows the Score and Group.bin_count columns in the
HVP pane as their check boxes are selected under Columns:

155 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

2. Select Group.covered_count, Group.uncovered_count, and Group.excluded count to


display the number of covered, uncovered, and excluded bins respectively for all features in
a plan. For example, the Group.*_count columns are highlighted in the following figure:

In the figure, note that the Score aggregation mode: self + children icon is clicked. This
icon calculates the aggregate of each Group.*_count submetric of a plan. For example, Verdi
calculates the aggregate of Group.bin_count, Group.covered_count,
Group.uncovered_count, and Group.excluded count of the ex212 plan when is
clicked and displays their aggregate in the top row as highlighted in the following figure:

Defining Source Targets


For the features having groups, group instances, or bins as source targets, Verdi returns the
covered, uncovered, excluded, and total count of matched groups, instances, or bins respectively
in a plan. The syntax of a source target in a measure in an HVP plan is as follows:
measure Group, Group.bin_count, Group.covered_count, Group.uncovered_count,
Group.excluded_count measure_1;
source = "group/group instance/group bin/
group instance bin: <group object name>";
endmeasure

Feedback Verdi Coverage User Guide and Tutorial 156


Using Verification Planner

Example of Source Targets


Consider the following covergroup definition, variant, instance, coverpoint, and cross coverpoint:

Table 1 on page 157 shows the examples of source targets:

TABLE 1. Source Targets Examples

Source Targets Examples


Covergroup source = "group: coin_fsm::Cvr";
Definition
Covergroup Variant source =
"group: test_jukebox.st0.coin1::Cvr";
Coverpoint source =
"group: test_jukebox.st0.coin1::Cvr.RD";
Cross Coverpoint source =
"group: test_jukebox.st0.coin1::Cvr.RDxWD";
Group Bin source =
"group bin: test_jukebox.st0.coin1::Cvr.RDxWD.HIGH-
MED";
Group Instance Bin source =
"group instance bin:
test_jukebox.st0.coin1.state_cvr.RDxWD.HIGH-MED";
Group Instance source =
"group instance: test_jukebox.st0.coin1.state_cvr";
Group Instance source =
Coverpoints "group instance: test_jukebox.st0.coin1.state_cvr.*";

157 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Managing Exclusions
If a group, group instance, or bin is excluded from coverage computation, the
Group.excluded_count submetric shows the count of excluded bins. Other Group.*_count
submetrics show 0.
For example, consider the following figure that shows the count of Group.bin_count,
Group.uncovered_count, and Group.covered_count submetrics of the cross coverpoint,
test_jukebox.st0.coin1::Cvr.RDXWD as 484, 474, and 10 respectively:

In this figure, note that Group.excluded_count of this cross coverpoint is 0.


Consider the following figure in which test_jukebox.st0.coin1::Cvr.RDXWD is
excluded:

In this figure, Group.excluded_count shows the count as 484 and other Group.*_count
submetrics show 0 because test_jukebox.st0.coin1::Cvr.RDXWD is excluded.

Feedback Verdi Coverage User Guide and Tutorial 158


Using Verification Planner

Generating the URG Report to View Group.*_count


Submetrics
To generate a URG report in Verdi, use Tools -> Generate URG Report. For generating a URG
report for Group.*_count submetrics, Verdi uses the following URG command:
urg -plan <filename.hvp> -dir <simv.vdb> -elfile <filename.el> -format text
-show ratios

For example, if a source target is a covergroup definition, coin_fsm::Cvr, Verdi generates the
following URG report:

159 Verdi Coverage User Guide and Tutorial Feedback


Using Verification Planner

Reverting to Default Values


To revert the updated values to their default values, right-click the values and select the
Revert Default option (see the figure below).

Consider the example in the Highlighting Values section. To revert the weight_prop value of
F1 to its default value, select the Revert Default right-click option. The option reverts only the
weight_prop value of F1 and not the weight_prop value of its sub-features, F11, F12,
and F121 (see the figure below):

Feedback Verdi Coverage User Guide and Tutorial 160


Using Verification Planner

161 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Using the Exclusion Manager


Verdi Coverage provides the Exclusion Manager feature to increase coverage by
taking out the exclusions that are not needed for the design. When a design has a
lot of code or combinations that never occur or there are parts of the design that
designer does not care about, then the exclusion features are used to exclude the
above coverage targets from the coverage score. Thus, you can focus on the
coverage results from the design that can happen.
When you identify a coverage target that can be ignored, or is impossible by
design, you can mark it for exclusion directly in the GUI and add an annotation
explaining why it is excluded. You can then save those exclusions and
annotations to an exclude file that can be reused in the next and future sessions.
Excluded objects are removed from the coverage score calculation and appear
disabled in reports.
You might exclude an object either at a module level or an instance level. An
exclusion on a module excludes the corresponding object in all of its instances.
For example, consider the coin_fsm module that has five instances as shown
in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 162


Using the Exclusion Manager

If coin_fsm is excluded, all the instances under it are automatically excluded


as shown in the following figure:

If a new instance is created for the excluded module, the new instance is
automatically excluded. On the other hand, if you exclude an object at the
instance level, then its other instances are not excluded automatically. For
example, if you exclude test_jukebox.st0.coin1 at the instance level,
then its other instances in test_jukebox.st1, test_jukebox.st2,
test_jukebox.st3, and test_jukebox.st4 are not excluded as shown
in the figure below:

Instance exclusions do not affect the coverage score of a module, even if all of
its instances are excluded. For example, if you exclude

163 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

test_jukebox.st0.coin1, Line 73, Line 78, Line 90, and so on are


excluded as shown in the following figure:

Note that these lines are not excluded at the module level (see the figure below).

If you intend to exclude an object for all instances of a module, ensure that you
are in the module exclusion mode and not the instance exclusion mode. These
two modes look similar. The main difference is that for module exclusions, a
module scope is selected in the Modules tab of the Summary pane. For instance-
based exclusions, you select an instance scope in the Hierarchy tab of the

Feedback Verdi Coverage User Guide and Tutorial 164


Using the Exclusion Manager

Summary pane. As it is not possible to convert instance exclusions to module


exclusions, if you intend to create module exclusions confirm that you are in the
module exclusion mode before excluding objects.
The Exclusion Manager pane of Verdi Coverage combines all the exclusions
from the different Verdi Coverage panes together.
This chapter discusses the following topics:
• Using the Exclusion Manager Pane
• Using the Toolbar to Manage Exclusions
• Reviewing Exclusions
• Filter Support for Annotations and Elfile
• Displaying Multiple Annotated Exclusions
• Exclusions With Checksum Mismatch
• Adding Annotations to an Excluded Object
• Handling Duplicate Annotations of an Excluded Object
• Saving Exclusions to a File
• Seed and Propagated Exclusions
• Exclusions on a Topology Folder
• Exclusion Propagation to Connections
• Exclusion Propagation From Line Coverage

165 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Using the Exclusion Manager Pane


The Exclusion Manager pane is displayed by default. As shown in
Figure Add Exclusion Through Exclusion Column, you can mark an instance for
exclusion by clicking an item in the Hierarchy page of the Summary pane.

Figure: Add Exclusion Through Exclusion Column

The following table shows the icons marked at the beginning of the row when the
exclusion is set or executed.

Icon Status
The item can be marked to exclude.
The item is marked to be excluded.
The previously excluded item is marked to be included.
The item is excluded.
The item is partially excluded.
The item is marked to be partial excluded in the Coverage
Source Code pane.
The item is excluded as propagated from other exclusions.

Feedback Verdi Coverage User Guide and Tutorial 166


Using the Exclusion Manager

After being marked, the item is added into the Exclusion Manager pane. You can
also mark some signals of a line in the CovSrc pane per different coverage types
or some bits of a signal in the Toggle page of the pane on demand.
When the exclusions are set and automatically located in the Exclusion Manager
pane, use the Recalculate command in the right-click menu or the icon to
apply the exclusions and update the coverage scores.
After the coverage scores are updated, the icons in the Exclusion column change
to show the exclusions that are excluded from the coverage score. As shown in
Figure Recalculate With Exclusions, the icon in the Exclusion column and
in the coin1 row shows the coin1 instance is excluded at this calculation.

Figure: Recalculate With Exclusions

You can also include the previously excluded items again by clicking the
icon to change it to the icon in the exclusions summary of the Exclusion
Manager pane or in the Exclusion column of the Summary, CovSrc, or panes. For
example, as shown in Figure Recalculate for Re-included Items, you can see the
previously excluded item that was marked to be included is now reincluded in the
coverage score. You can also exclude/include a line in the expanded macro.

167 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Figure: Recalculate for Re-included Items

Feedback Verdi Coverage User Guide and Tutorial 168


Using the Exclusion Manager

Using the Toolbar to Manage Exclusions


You can select items in the Exclusion Manager pane and use the toolbar icons of
the Exclusion Manager pane to change the exclusion status of the selected items,
and to save and load exclusions. The rows in the Summary pane can also be
selected.

Icon Description

To exclude marked items

To re-include the selected items

To delete all exclusions in the Exclusion Manager window.

To save exclusions

To load exclusions

If you select a directory in the Exclusion Manager pane, you can use the icon
or icon to exclude or re-include all items belonging to this directory. As
shown in the Figure Apply to All Items by Using Toolbar Icon , the exclusion
status of all items that belong to the selected directory is changed.

Figure: Apply to All Items by Using Toolbar Icon

169 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Using Advanced Exclusion Options


You can enable the advanced exclusion options by toggling the button in the
toolbar as shown in Figure Advanced Exclusion Options:

Figure: Advanced Exclusion Options

Options for Metrics


Figure Metric Options lists the metrics available; you can choose one of the
metrics or can choose the last option <All Metrics>.

Figure: Metric Options

The metric combos are enabled /disabled using the rules listed in the following
table:

Item Selected Enable/Disable


Detail object Disabled
Covergroup is disabled; all other loaded metrics
Module/Instance/Tree item
are enabled.
Covergroup Disabled

Feedback Verdi Coverage User Guide and Tutorial 170


Using the Exclusion Manager

Options for Targets


Figure Target Options lists the targets you can choose from:

Figure: Target Options

It provides the following options:


• Self Only: The exclusion action is applied to the selected scope itself.
• Children Only: The exclusion action is applied to the selected scope’s
children only.
• Self & Children: It is complete tree exclusion. The option is enabled only
when an instance is selected, otherwise it is disabled.
For example, if you want to exclude the child instances of an instance, use the
following steps:
1. Turn on Advance Exclusion Options from the toolbar.
2. Select an instance on the Hierarchy summary.
3. Select Children Only from the toolbar.
4. Click the Exclude Marked Items button from the toolbar.

171 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Figure Excluding Child Instances shows how you can exclude child instances.

Figure: Excluding Child Instances

Following are the three ways to save exclusions:


• Save all exclusions: Saves all exclusions in the Exclusion Manager pane
into a specified file. To save all exclusions in an *.el exclusion file, click
File-> Save all exclusions.
• Save exclusions not saved: Saves exclusions that are not yet saved into a
specified file including the exclusions that are already existing in the file.
To save new exclusions for entire design, click the
Save Exclusions Not Saved icon from the toolbar. Alternatively, click
File> Save Exclusions Not Saved.
• Save selected exclusions: Saves exclusions for selected instances, trees,
modules, and groups into a specified file including the exclusions that are
already existing in the file. To save exclusions for the selected instances,
trees, modules, and groups, click
Exclusion->Save Exclusions for Selected Objects/Trees.

Feedback Verdi Coverage User Guide and Tutorial 172


Using the Exclusion Manager

To save the exclusion file with the selected metrics, enable the
Save propagated exclusions from module of covergroup variant
Metrics option.

Loading Exclusion Files


You can click the icon to load an *el exclusion file to the Exclusion Manager
pane.
You can load exclusion files (.el files) using the File menu commands Load
Exclusions from File or Load Exclusions from File List as shown in the
following figure:

Figure: Loading Exclusion Files From the File Menu

You can specify the .el file that needs to be loaded using the Load Exclusions
from File option. You can also load a file which contains a list of .el files using
the Load Exclusions from File List option.

173 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

These options are also available in the Exclusion menu as shown in the following
figure:

Figure: Loading Exclusion Files From the Exclusion Menu

The command corresponding to the Load Exclusions from File option is


vdCov -elfile <ElFile>. The command corresponding to the Load
Exclusions from File List option is vdCov -elfilelist
<ElFileList>.
Here, the elfile file path specified in the <ElFileList> file can be the
absolute path or relative path. By default, the relative path in the
<ElFileList> is relative to the <ElFileList> itself. Therefore, there is
no effect on the path even if you change the current working directory. However,
if you want <ElFileList> to consider the relative path to the working
directory, you can use the -relative_to_workingdir option while
specifying the elfile.
You can also specify the file path using a user-defined environment variable
added in the <ElFileList> file. For example, run the command
setenv ANY_ENV_VAR_NAME /remote/exclude_dir in the console,
then add $ANY_ENV_VAR_NAME/exclusion1.el in the
<ElFileList>.

Feedback Verdi Coverage User Guide and Tutorial 174


Using the Exclusion Manager

Adding Annotations for Exclusions


The icons are provided in the Coverage toolbar
to add the annotation for an added exclusion as listed in table Icons for
Annotation. Before using the icon to add an annotation to the selected
exclusion, you need to use the icon to create annotation(s) first. Icons for
Annotation lists the descriptions for each icon.

TABLE 1. Icons for Annotation


Icon Description

Add an annotation selected in the field to the selected


exclusion.
Delete the annotation from the selected exclusion.

Edit annotations in the invoked Edit Annotation form.

Add annotation automatically when excluding.


Specify the advanced options in the invoked

field for the added


annotation.

Module Exclusion Annotations at the Instance Level


When an object is excluded at the module level, it is also excluded in all of the
module's instances. Also, when you add exclusion annotations to the object at the
module level, these annotations are added to the object at the instance level.
These annotations are visible at the instance level in the tooltips of the object.
The tooltips display the exclusion annotations from the module level. The scope
of these annotations is applicable to Hierarchy and Modules tabs in the Summary
pane.
For example, in the figure below, the exclusion annotation is added for cd in the
Modules tab. Now, hover the pointer over its object at the instance level, that is

175 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

test_jukebox.cd1. It shows the exclusion annotation of cd in its tooltip at


the instance level.

An instance might also contain its own annotations. In this scenario, the tooltip
of the instance shows both annotations, that is, from the instance level and from
the module level. To identify the module-level annotations, see the exclusion
annotations in italics in Annotation from Module in the tooltip. In the figure
below, the annotations from the module and the instance are as follows:
Module
the object was excluded, for reason B
Instance
the object was excluded, for reason A

Feedback Verdi Coverage User Guide and Tutorial 176


Using the Exclusion Manager

Reviewing Exclusions
As described in the Using the Toolbar to Manage Exclusions section, you can
load a saved exclusion file into the Exclusion Manager pane. You might have an
exclusion file that was created recently, in the latest format, but the design has
evolved. There might be some conflicting exclusions when you load an exclusion
file with old format into the latest database. In these cases, unresolved exclusions
need to be reviewed after loading the exclusion file.
The following sections describe how to use the features for the exclusion review.

Using the Exclusion Review Flow


After loading an exclusion file, you can find unresolved icons in the Exclusion
Review columns if some unresolved exclusions exist in the loaded exclusion file
(see figures Load Exclusion File With Unresolved Exclusions). You have to
inspect and review the unresolved exclusions.

Figure: Load Exclusion File With Unresolved Exclusions

The Unresolved Exclusion Summary field in the toolbar of


the Exclusion Manager pane shows how many unresolved exclusions are needed
to be reviewed. Table Unresolved Exclusion Status shows the icons marked at the

177 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Exclusion Review columns when the exclusion is unresolved or needs to be


reviewed.

TABLE 2. Unresolved Exclusion Status


Unresolved Icon Status
Unresolved mappable exclusions with signatures matching
Unresolved mappable exclusions with signatures
mismatching
Unresolved un-mappable exclusions
Both reviewed and un-reviewed exclusions under the
hierarchy
Exclusions are rejected. They include un-reviewed and
reviewed exclusions
Exclusions under the hierarchy have been reviewed and
accepted

Reviewing Line Coverage Exclusions


To review the exclusion in the Exclusion Manager pane, double-click on the
exclusion row (with or ). The corresponding source code of the unresolved
exclusion in the CovSrc pane is shown. You can check the highlighted source
code to see whether it maps the adaptive exclusion shown in the Signature field
in the Exclusion Manager pane or not.
You can also search the adaptive exclusion in the source code. Use the “Ctrl” and
“S” hotkey in the Coverage Source Code to bring up the Search field and click
the or icons to find the previous or next matched string in the source code.
When you review and discover the signature matched, you can click in the circle
icon in CovSrc to both accept the exclusion and exclude the item in the Exclusion
Manager pane. The Exclusion Manager pane is updated with another row of the
same line with exclusion icon.

Feedback Verdi Coverage User Guide and Tutorial 178


Using the Exclusion Manager

179 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

If you cannot find the mapped signature in the source code when using the search
field to find the adaptive exclusion as shown, a pop-up window is displayed with
an error code.

Figure: Search Adaptive Exclusion in Source Code

After reviewing the line, for the exclusion with the icon, you can mark the line
as reviewed and accept it by using the Accept right-click menu item.
command or click the icon in the Exclusion Review column to cycle to the
reviewed and accept icon. You can also reject the exclusion by using the Reject
right-click menu item or selecting the reviewed and reject icon.
For the exclusion with the icon, you can mark the line as reviewed by using
the Mark Unmap Reviewed right-click menu item or click the icon in the
column to cycle to the reviewed icon.
After you set a line as reviewed, the Unresolved Exclusion Summary field is
also updated accordingly to show one less exclusion for reviewing.
After all the unresolved exclusions are reviewed and either accepted or rejected,
the Summary Review displays 0 and disappears to signify that there are no more
exclusions to review. Then, you can click the icon to update the coverage
scores with the new exclusions.
You can clean out the reviewed exclusions after all the exclusions are reviewed.
Then, you can click the icon to save the latest exclusion since the exclusions
are updated to the current reviewed exclusions.

Feedback Verdi Coverage User Guide and Tutorial 180


Using the Exclusion Manager

Filter Support for Annotations and Elfile


The Exclusion Manager pane enables you to filter exclusion items based on
Name, Annotations, and Elfile columns. Filtering based on annotations enables
you to view the annotations of searched items. Filtering based on exclusion file
names provides you the list of searched results having the required exclusion file
name.
Consider the following example that shows Name, Annotations, and Elfile
columns for the Exclusion Manager pane:

To search for the excluded items whose name is RD, Annotation is Anno3, and
file name contains CoverGroup, use the following filter string in the Search
field of the Exclusion Manager pane:
RD Annotation=Anno3 Elfile=CoverGroup

This filter string provides the following search results:

The Exclusion Manager pane allows you to use AND and OR operators. If no
operator is specified between the column names in the filter string, the
Exclusion Manager pane considers it as AND.
Consider a scenario in which you need to search the excluded items for the name
as RD with either annotation as Anno3 or file name as CoverGroup. For this,
use the following filter string:
RD AND Annotation=Anno3 OR Elfile=CoverGroup

181 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

This filter string provides the following search results:

The Exclusion Manager pane also supports wildcard and regular expressions as
filter string. For example, if you input the filter string, Elfile="Cov_*.el",
the Exclusion Manager pane shows the following search results:

Note:
All filter strings are automatically saved in the novas.rc file. When
Verdi Coverage is invoked from the directory in which novas.rc is
saved, the filter string list is restored.
You can drag-and-drop a scope or an object from the Summary pane or the
CovDetail pane to the Search field of Exclusion Manager to find exclusions. In
this case, you do not need to type a string in the Search field. Note that this
drag-and-drop method works properly in the default Wildcards mode. In the
Regular Expression mode, you need to add the escape character "\" to the special
characters of a regular expression to display search results.

NOTE:
To change the Filter mode from Wildcards to Regular Expression, click
Tools  Preferences  Global  View Filters.
For example, consider the chg_cnt[2:0] signal in the
test_jukebox.st0.coin1 scope. If you drag-and-drop this signal to the
Search field of Exclusion Manager, you get the search string as
test_jukebix.st0.coin1.chg_cnt[2:0]. This search string does not
give any search result in the Regular Expression mode as it contains special
characters ".", "[", and "]". In this case, you need to add the escape character
"\" to these special characters to display search results as shown in the following
figure:

Feedback Verdi Coverage User Guide and Tutorial 182


Using the Exclusion Manager

Displaying Multiple Annotated Exclusions


Coverable objects in Verdi are marked as excluded when they have one or more
exclusions applied to them. Exclusions can be loaded from one or more exclusion
files or can be applied interactively in Verdi.
By default, if an object is excluded due to exclusions loaded from multiple
exclusion files, and two or more of those exclusions have annotations, the
exclusion file that is loaded last overwrites the annotation from any previous
exclusion file. If Verdi Coverage is invoked with the
-excl_append_annotation switch, Verdi appends annotations from all
exclusions to the excluded coverable object. For example, there are exclusions of
cd1 in both 1.el and 2.el, and each of those files contains an annotation on
its exclusion, then the switch concatenates both in the Exclusion Manager pane
for cd1, as follows:

The -excl_append_annotation switch is now removed. If more than one


annotation exists for an excluded object, then all annotations are displayed as
separate rows (see the figure below):

183 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Exclusions With Checksum Mismatch


When the design changes and exclusions that were created with a previous
version are loaded, Verdi may require that you review some of the exclusions
before it will apply them to remove corresponding coverable objects from
coverage scoring. An exclusion is flagged when the checksum saved for it in the
elfile does not match the checksum saved in the coverage database. Flagged
exclusions can be accepted, rejected. or left unreviewed.
If a reviewed exclusion is accepted, it is saved to its associated elfile with a new
checksum. If a reviewed exclusion is rejected, it gets removed from Verdi. If an
exclusion is unreviewed, it is saved to its associated elfile with its original
checksum.

Adding Annotations to an Excluded Object


You may add an annotation to an excluded coverable object that is propagated to
its exclusion objects. The following figure shows a coverable object, cd1 and its
exclusions:

To add an annotation to an exclusion, perform the following steps:


1. Double-click the object to enter the edit mode.
2. Specify an annotation in its Annotation column. The specified annotation
is propagated to the Annotation column of all of its contained excluded
objects.

Note: For more details on how to add annotations to an exclusion, see the
Adding Annotations for Exclusions section.

Feedback Verdi Coverage User Guide and Tutorial 184


Using the Exclusion Manager

Handling Duplicate Annotations of an


Excluded Object
If the annotation of an excluded object is changed and is similar to another
annotation of the same excluded object, then only one entry of that exclusion is
retained in Exclusion Manager. For example, consider the following two
exclusions with annotations anno1 and anno2 in the 1.el file:

Consider a scenario in which anno2 is renamed to anno1. Now, there are two
excluded objects with same annotations, anno1, in the exclusion file, 1.el. Verdi
retains only one of the excluded objects from the exclusion file and removes the
other excluded objects, as shown in the following figure:

185 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Saving Exclusions to a File


There are certain scenarios related to saving exclusions to a file. These scenarios
are explained in the following subsections:
• Saving All Exclusions for Selected Objects
• Saving Selected Exclusions for an Object

Saving All Exclusions for Selected Objects


To save all exclusions for selected objects to a file, perform the following steps:
1. In Exclusion Manager, select an object whose all exclusions you want to
save. For example, select the Instance:cd1 object, as shown in the
following figure:

2. Right-click the selected object in Exclusion Manager and select


Save Exclusions for Selected Objects to save all its exclusions to a file,
say 4.el. Once saved, these exclusions appear in
Exclusion Manager, as shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 186


Using the Exclusion Manager

Saving Selected Exclusions for an Object


To save selected exclusions for an object to a file, perform the following steps:
1. In Exclusion Manager, select the exclusions for an object that you want to
save. For example, select exclusions with annotations anno1 and anno2,
as shown in the following figure:

2. Right-click the selected exclusions and select


Save Exclusions for Selected Objects to save the selected exclusions to a

187 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

file, say 4.el. Once saved, these exclusions appear in


Exclusion Manager, as shown in the following figure:

Note that duplicate exclusions are saved only once. For example, when the
Instance:cd1 object and its two exclusions with annotations anno1 and
anno2 are saved to 4.el, exclusions with anno1 and anno2 become duplicates
in 4.el. These duplicate exclusions are saved only once, as shown in the
following figure:

Feedback Verdi Coverage User Guide and Tutorial 188


Using the Exclusion Manager

Seed and Propagated Exclusions


Seed exclusions are excluded objects that are excluded directly either manually
or via an exclusion file. Propagated exclusions are the exclusions that are
propagated by seed exclusions and are not excluded directly.
Here are certain scenarios for seed and propagated exclusions:
• If a parent object is excluded, its child exclusions are excluded as
propagated exclusions, as shown in the following figure:

189 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

• If all instance groups are excluded, then its variant is also excluded, as
shown in the following figure:

Feedback Verdi Coverage User Guide and Tutorial 190


Using the Exclusion Manager

• If all child exclusions of a parent object are excluded, then the parent object
is excluded as a propagated exclusion, as shown in the following figure:

191 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Exclusions on a Topology Folder


Verdi now enables you to apply exclusions on all coverable objects inside a
topology folder with one action. A topology folder can be a module, class,
generate block, parameterized module, program block, or UVM hierarchy.
Excluding one of these folders now excludes all coverable objects inside it.
This section consists of the following subsections:
• Marking Exclusions
• Tree Exclusions
• Saving Exclusions
• Adding Exclusion Annotations

Marking Exclusions
You can mark exclusions on a topology folder using the Exclude icon. The
icon applies exclusions on all coverable objects in the topology folder. The icon
is available in the main menu, the Exclusion toolbar, and in the right-click menu.
For example, consider a topology folder, instruction that contains
coverable objects as trackgroup, ticksgroup, tickcoincross,
opgroup, and coingroup. To mark this folder as excluded, perform the
following steps:
1. Click the Display Covergroup Instance tree icon in the Summary
pane.
2. In the Groups tab, select the topology folder, instruction. When you
select the topology folder, the Exclude icon becomes enabled.
3. To exclude the instruction folder and all the coverable objects under it,
click the icon in the main menu or in the Exclusion menu.
Alternatively, right-click the folder to select Exclude as shown in the
following figure:

Feedback Verdi Coverage User Guide and Tutorial 192


Using the Exclusion Manager

4. After the exclusions are applied on the folder, exclusion markers are applied
on the coverable objects. For exclusion markers, see the highlighted icons in
the following figure:

NOTE: No exclusion marker is displayed next to the topology folder (see


instruction in the above figure).

193 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Tree Exclusions
You can apply exclusions to either a topology folder or its sub-folders, or a tree
(that is, both a topology folder and its sub-folders). When you select a topology
folder, Verdi enables the Advanced Exclusion Options icon in the main
toolbar. When you click this icon, Verdi displays the following exclusion toolbar:

You can decide the scope of applying exclusions using any of the following
options from the exclusion toolbar:
• Self Only:
If you select this option, Verdi applies exclusions to the coverable objects
that exist in a topology folder. The exclusions are not applied on the
coverable objects that are present inside the sub-folders of the topology
folder.
For example, consider the following figure that shows a topology folder,
cd1, its direct coverable object, disc, and its sub-folder, honker. The
honker sub-folder contains one coverable object, song.

If you select Self Only, Verdi applies exclusions only to its direct coverable
object, which is disc.

• Children Only
If you select this option, Verdi applies exclusions to the coverable objects
that exist in the sub-folders of a topology folder. The exclusions are not
applied on the coverable objects that are present directly in the topology
folder.
In the example, if you select Children Only, Verdi applies exclusions only
to the coverable objects inside the honker folder, which is song.

Feedback Verdi Coverage User Guide and Tutorial 194


Using the Exclusion Manager

• Self&Children
If you select this option, Verdi applies exclusions to all coverable objects
inside the selected topology folder. In the example, if you select Self&Chil-
dren, Verdi applies exclusions to both song and disc.

Saving Exclusions
Verdi allows you to save exclusions for coverable objects that you want to
exclude. Note that exclusions are not saved for a topology folder but for its
coverable objects. For example, consider a folder, cd1, which contains
coverable objects cg1, cg2, and cg3. If you save exclusions for cd1,
exclusions are saved for cg1, cg2, and cg3, and not for cd1. Therefore, if a
new coverable object, cg4, is added to the cd1 folder and it needs to be
excluded, you need to explicitly exclude cg4.
To save exclusions, Verdi provides the following two options:
• Save Exclusions for Selected Objects: This option saves all exclusions
applied to only direct coverable objects in the topology folder. This option
does not save exclusions applied to the coverable objects in its sub-folders.
• Save Exclusions for Selected Trees: This option saves all exclusions
applied to coverable objects in the topology folder and its sub-folders.
To save exclusions, perform the following steps:
1. Right-click the folder on which the exclusions are already applied and select
Save Exclusions for Selected Objects or Save Exclusions for Selected
Trees.
2. Specify the exclusion file name, excl_instruction.el, in the
Save Exclusions for Selected Objects or
Save Exclusions for Selected Trees dialog box and click Save.

195 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

In the figure above, the Also, Save module/covergroup based exclusions for
this instance option enables you to save exclusions that are applied on modules
and covergroups. This option is selected by default.

NOTE:
The Also, Save module/covergroup based exclusions for this
instance option is removed from P-2019.06 and later releases.

Adding Exclusion Annotations


Verdi enables you to add annotations for exclusions on a topology folder or its
sub-folders or a tree. There are two ways to add annotations:
1. Exclude a coverable object and perform the following steps to add
annotations:
a. Select the coverable object for which the annotation needs to be added.
b. Specify the annotation in the Annotations box in the main
toolbar.
c. Click the Add an annotation to the selected items button from
the main toolbar to add the annotation to the selected coverable object.
2. Add an annotation for a coverable object before excluding it. For this,
perform the following steps:
a. Select the coverable object for which the annotation needs to be added.
b. Click the Adding Annotations Automatically When Excluding
icon from the main toolbar. This icon is enabled by default.

Feedback Verdi Coverage User Guide and Tutorial 196


Using the Exclusion Manager

c. Specify the annotation in the Annotations box in the main


toolbar.
d. Exclude the coverable object and note that the specified annotation is
automatically attached to the object.
You can also add exclusion annotations by right-clicking a topology folder and
selecting Add Exclude Annotation. It opens the Add Exclusion Annotation
dialog box (as shown below):

In the Add Exclusion Annotation dialog box, click Add to display a field to add
an exclusion annotation. Then, click OK.
You can add exclusion annotations for either a topology folder or its sub-folders,
or a tree (that is, both a topology folder and its sub-folders) using the
Advanced Exclusion Options icon in the main toolbar as explained in the
Tree Exclusions section.
To delete an annotation either click the
Delete the selected annotation from the selected items button in the main
toolbar or click Delete Exclusion Annotation from the right-click menu.

197 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Exclusion Propagation to Connections


Verdi Coverage supports toggle exclusion propagation to signal connections and
can automatically exclude the related exclusion signals for a given signal.
As an example, consider the following design:
module Add(a,b b, c);
input a;
input b;
output c;
assign c = a+b;
endmodule

module Add2(a2,b2,c2);
inpbgut a2;
input b2;
output c2;
Add inst2(a2,b2,c2);
endmodule

module TOP;
wire w1;
reg [3:0] w2;
wire w3;
Add2 inst(w1,w2[3],w3);
endmodule

TOP.w3 connected ports are:


TOP.inst.c2
TOP.inst.inst2.c

With this enhancement, if you exclude the TOP.w3 signal for vdCov, the
connected ports, TOP.inst.c2 and TOP.inst.inst2.c also get excluded
automatically.
This also works for vector/bus signals as follows:
For Top.inst.b2, the connected ports are as follows:
TOP.inst.inst2.b
TOP.w2[3]

Verdi Coverage recognizes the related signals connected to the user-selected


signal and excludes them automatically. This feature is discussed in more detail
in the subsequent sections.

Feedback Verdi Coverage User Guide and Tutorial 198


Using the Exclusion Manager

Prerequisite
As Verdi Coverage needs the Elaboration database to retrieve the connected
signals, you need to load the corresponding Elaboration database. It is
recommended to use the Unified Front end flow to generate the Elaboration
database.

Use Model
To automatically exclude the connected signals for the selected signals in toggle
exclusion, perform the following steps:
1. After importing a design, you can select the signal or multiple signals in the
toggle list view for which you want to exclude connected signals. For this,
use the new CSM Exclude Connected Signals offered by Verdi Coverage.

Figure: Excluding Selected Signals

199 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Figure: New Option - Exclude Connected Signals

2. Verdi Coverage needs the Elaboration database to be loaded to get the


connected signals, so you must load the Elaboration database into vdCov.

Figure: Verdi ELAB Database Dialog Box

If you have not already loaded the Elaboration database, the


Verdi ELAB Database dialog box is displayed. Specify the Elaboration
database that needs to be loaded and click the Load button. This opens the
following dialog box that lets you browse for and load the Elaboration database:

Feedback Verdi Coverage User Guide and Tutorial 200


Using the Exclusion Manager

Figure: Browse for the Verdi ELAB Database File

After you have selected the Elaboration database that needs to be loaded, Verdi
Coverage loads it.

NOTE: It is recommended to use the Elaboration database from the Unified


Front end flow.
3. After loading the Elaboration database, the Connected Signals dialog box
is shown with the loaded Elaboration database path. The signals connected
to the selected signal(s) are also shown in the Connected Signals List View
pane along its direction (input, output, or inout). The items are grouped by
the selected signals in the Connected Signals List View pane.
In the following figure, if you select one signal, multiple signals connected
to the signal are selected in the Connected Signals List View pane:

201 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Figure: Signals Connected to User Selected Signal(s)

Figure: Signals Connected to User Selected Signal(s)

You can select/deselect the signals to exclude and can check the transition
0->1 and 1->0 to exclude a signal. When the dialog box is displayed, you
can double-click a signal on the dialog box to view its source.

Feedback Verdi Coverage User Guide and Tutorial 202


Using the Exclusion Manager

4. Once you have selected the signals to be excluded, click the Exclude button
to exclude the signal in the Connected Signals List View pane and its
associated signals. These signals are displayed in Exclusion Manager.

Managing the Verdi ELAB Database


As the Elaboration database is already loaded, the next time you want to exclude
a signal (and its connected signals), you can get the connected signals
automatically.
Verdi Coverage offers a new menu item Manage Verdi ELAB Database in the
File main menu. Clicking this menu item to display the Verdi ELAB Database
dialog box that indicates whether there is already an ELAB database loaded
along with its path, as follows:

Figure: No Verdi ELAB Loaded

Figure: Loaded the ELAB Database With Its Path

203 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

New/Updated Tcl Commands


The following Tcl commands are added/updated with this release:
• gui_load_kdb: Loads the KDB library file.
gui_load_kdb -path <KDB_library_path>

• gui_unload_kdb: Unloads the existing loaded KDB library file.


• gui_dump_connected_signals: Dumps all the connected signals’
names.
gui_dump_connected_signals -name <signalFullPath>

• If there is an MDA element, add the -mda parameter as follows:


gui_dump_connected_signals –name top.inst.mda[3][4][1:5] -mda

• gui_exclude_signal: Excludes the specified signal, even though the


signal is actively shown in the current UI.
gui_exclude_signal –name <signalFullName>

• If you want to specify the transition, add a parameter:


-transition 0to1 or -transition 1to0.
• If we want to un-exclude (include) the signal, add the -include
parameter.
• If we want to add exclusion annotations, add the -annotation <anno>
parameter.

Feedback Verdi Coverage User Guide and Tutorial 204


Using the Exclusion Manager

Exclusion Propagation From Line Coverage


Verdi allows you to automatically propagate line exclusions to condition and
branch coverage metrics. This propagation reduces manual effort in creating the
same exclusions again for condition and branch metrics.
This section consists of the following subsections:
• Use Model
• Example
• Limitations

Use Model
To propagate line coverage exclusions to condition and branch metric, use the
following command while invoking Verdi:
verdi -cov -excl_propagation
You can also enable exclusion propagation from inside Verdi. For this, perform
the following steps:
1. Select Tools -> Preferences to display the Application Preferences dialog
box (Figure: Application Preferences Dialog Box).
2. In the Application Preferences dialog box, select the Exclusion category.
3. In the Exclusion category, select the following option:
Propagate Exclusion from Line metric to Condition and Branch metric.
This only takes effect after reloading the database.
4. Reload the database.
5. Right-click a signal in the Hierarchy pane and select Exclude to propagate
line coverage exclusions to condition and branch metric.

205 Verdi Coverage User Guide and Tutorial Feedback


Using the Exclusion Manager

Figure: Application Preferences Dialog Box

Example
Consider the following code snippet in which Line 93 and Line 94 are marked as
excluded:
93 else if (stall && (x not ^ y_tot))
94 n_state = idle;
95 else if (qtr)
96 n_state = paid;
97 else if (qtr)
98 n_state = paid;

When verdi -cov -excl_propagation is used while invoking Verdi,


the exclusions at Line 93 and Line 94 are propagated to condition and branch
coverage metrics, as shown here:

Feedback Verdi Coverage User Guide and Tutorial 206


Using the Exclusion Manager

Limitations
This feature has the following limitations:
• Propagating condition and branch exclusions is not supported.
• Exclusions are not propagated for MISSING_ELSE and
MISSING_DEFAULT.

207 Verdi Coverage User Guide and Tutorial Feedback


Loading and Saving Sessions

Loading and Saving Sessions


Verdi Coverage provides save and load session features to save the current
process or restore a previously saved session to continue the unfinished process.
The analyzed coverage, Exclusion Manager and HVP planner status can be
recorded using the File  Save Session command. Specify a name and path for
the session file in the Save Session form and click the Save button. The following
information is saved in the session file:
• General status
• Preferences settings
• Docked panes layout
• Coverage status in the Summary pane
• Each Coverage Source Code and corresponding Coverage details status
• Exclusion Manager status
• HVP Planner and corresponding status in the HvpDetail pane
You can use the File  Restore Session command to restore the saved session,
and the Verdi Coverage session is restored.

NOTE: To save the session including additional changes in the HVP Planner and
Exclusion Manager panes, the changes must first be saved in these
separate panes.

Feedback Verdi Coverage User Guide and Tutorial 208


Loading and Saving Sessions

209 Verdi Coverage User Guide and Tutorial Feedback


Interacting With Verdi Debug

Interacting With Verdi Debug


Verdi Coverage is interlinked with the Verdi platform using which you can locate
covered and uncovered situations in your design. You can also check whether a
signal, module, or instance found in the Verdi platform is covered or uncovered
by using this ability.
The following sections describes how you can invoke the Verdi platform and use
the Interactive Debug capabilities between Verdi Coverage and the Verdi
platform:
• Invoking the Verdi Platform
• Using Interactive Debug Between Verdi and Verdi Coverage

Invoking the Verdi Platform


You can use the Tools  Debug command to invoke the main window of the
Verdi platform from Verdi Coverage. The Invoke Verdi Debug form is opened
(see Figure Invoke the Verdi Platform for Debugging) and you can input the
options for invoking the Verdi platform. For example, you can load the work
library into the Verdi platform while invoking the Verdi platform by entering -
lib work in the blank field and then clicking the Run button in the Invoke
Verdi Debug form.

Figure: Invoke the Verdi Platform for Debugging

The contents from the last five executions are provided in the drop-down menu.

NOTE: The invoked Verdi platform does not automatically load the design. You
need to manually load your design and ensure the designs are the same
between Verdi Coverage and the Verdi platform.

Feedback Verdi Coverage User Guide and Tutorial 210


Interacting With Verdi Debug

Using Interactive Debug Between Verdi and Verdi


Coverage
After loading the design in the Verdi platform, you can drag and drop a signal,
module or instance from Verdi Coverage to the Verdi platform. As shown in
Figure Drag and Drop Signal to Verdi Platform, drag the state signal from the
FSM tab of the CovDetail pane and drop it to the Verdi platform. The
Hierarchy Browser pane highlights the module that the state signal belongs to
and this signal is highlighted in the source code pane. Also, the Trace page of the
Message pane shows the tracing results of the state signal.

Figure: Drag and Drop Signal to Verdi Platform

The table Drag and Drop to Verdi Platform Behaviour describes the drag and
drop behavior from Verdi Coverage to the Verdi platform.

NOTE:
- Dragging the line, condition, and branch expressions is not supported.

211 Verdi Coverage User Guide and Tutorial Feedback


Interacting With Verdi Debug

Verdi drag and drop location depends on the top-left corner of the icon, which is
present on the right-side of the cursor.

Figure: Drag and Drop location

For example, in the above image, the drop location is on F1, as the top-left corner
of the m icon is present on F1.

TABLE 1. Drag and Drop to Verdi Platform Behaviour


Source Item
Cover- Cover- FSM FSM
/Destination Module
Signal Assert group point/ State Transition
Window/ /Instance
Instance Cross Signal /Sequence
Pane
Show Show
Show Show Show state
nWave signals of NA NA state
signal signal signal
scope signal
Show the
Show in Show in Show in Show in Show in Show in
Source code parent in
source source source source source source
source
Locate in Locate in
Hierarchy Hierarchy
Show the
Browser Browser Locate in
Hierarchy parent in
tree and NA tree and decl_tree NA NA
Browser decl_tree
sync with sync with page
page
the source the source
code pane code pane
Show in
Show in
nState
nState with
nState NA NA NA NA NA with
correspond
correspon
ing FSM
ding FSM

Feedback Verdi Coverage User Guide and Tutorial 212


Interacting With Verdi Debug

TABLE 1. Drag and Drop to Verdi Platform Behaviour


Show
Show
Assertion assertions NA NA NA NA NA
assertion
of scope
Show Show Show in Show in
nSchema NA NA NA
schematic schematic schematic schematic

You can also drag and drop a signal, module or instance from the Verdi platform
to Verdi Coverage. As shown in Figure Drag and Drop Signal to Verdi Coverage,
the cd1 instance is dragged from the Hierarchy Browser pane in the Verdi
platform and dropped into the Toggle tab of the CovDetail pane in
Verdi Coverage. The signals of cd1 are listed and the toggle coverage is shown
in the Toggle page. The source code of the cd1 instanced module in the CovSrc
pane is also shown.

Figure: Drag and Drop Signal to Verdi Coverage

The table Drag and Drop to Verdi Coverage Behavior describes the drag and drop
behavior from the Verdi platform to Verdi Coverage.

213 Verdi Coverage User Guide and Tutorial Feedback


Interacting With Verdi Debug

TABLE 2. Drag and Drop to Verdi Coverage Behavior


Source Item Signal Assert Covergroup nState
Module
/Destina-
/Instance
tion Pane
Show in the Show in the
Summary Summary
Show in the
Summary NA pane; pane; NA
Summary pane
Switch to the Switch to the
Asserts tab Groups tab
Show in the
Show in the Show in the Show in the
Covergroup
Change to the Toggle tab of Assert tab of FSM tab of the
tab of the
scope the CovDetail the CovDetail CovDetail
CovDetail
pane pane pane
pane
Show Show
Show Assert
Show in the Show in the covergroup in covergroup in
CovSrc in the CovSrc
CovSrc pane CovSrc pane the CovSrc the CovSrc
pane
pane pane
Add
Add scope Add assert
covergroup
source into source into
HVP pane NA source into NA
HVP HVP
HVP
hierarchy hierarchy
hierarchy

Feedback Verdi Coverage User Guide and Tutorial 214


Interacting With Verdi Debug

215 Verdi Coverage User Guide and Tutorial Feedback


Using VC Execution Manager

Using VC Execution Manager


VC Execution Manager ("ExecMan") is a versatile, modular system for
managing compilation, regression, and tracking of the design verification
process. The execution engine automatically merges VCS coverage data from
each test run.
ExecMan's main functionality is to run a set of regression simulations, collect
results, and generate interactive reports for exploring those results. ExecMan
stores regression results in a relational database. A web-based user interface is
provided to enable browsing of regression results as well as files generated by
verification tools. In addition, results can be viewed from within Verdi Coverage.
To aid in quick analysis of simulation failures, ExecMan can rerun the fastest
running examples of each unique failure category, and automatically prepare
detailed debug results for analysis.
As regressions involve running many tests on a large set of hardware, ExecMan
includes features to overcome common system failures. Disk access
interruptions and failed hosts are tolerated, for example.
ExecMan is preconfigured to work with VCS and UVM methodologies but can
be configured to run any verification tool. It works in conjunction with grid
managers, such as LSF of Sun Grid, as well as directly executing simulation jobs
on local hosts.
ExecMan requires two license keys: VC-EXECMAN-SERVER and
VC-EXECMAN-CLIENT.
You can run VC Execution Manager and view run results from Verdi Coverage.
To invoke ExecMan from the Verdi Coverage GUI, use either of the following
methods:
• Tools > Open Tests Browser
• Tools > Run Tests
For more details on ExecMan, see the VC Execution Manager User Guide on
SolvNetPlus.

Feedback Verdi Coverage User Guide and Tutorial 216


Using VC Execution Manager

217 Verdi Coverage User Guide and Tutorial Feedback

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy