Coverage Tut
Coverage Tut
Verdi Coverage
®
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.
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
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.
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.
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.
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
• You have the Verdi license and the Verdi Coverage add-on licenses.
1. For details on the compilation options, see the VCS User Guide.
2. For details on the compilation options, see the VCS User Guide.
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> &
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.
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.
• 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.
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
Cover Items Description. All the columns can be used to sort the data by clicking
the column name field.
The Figure Configuring Columns for Hierarchy Tab displays the configuration
options available for the Hierarchy tab.
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
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.
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 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:
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
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.
• 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:
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.
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).
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.
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:
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.
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:
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:
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.
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..
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.
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.
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.
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.
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.
You can use the View Show Condition IDs command to show the condition
names in the Condition page of the CovDetail pane.
See Section Using the Asserts Tab for more details about the Assert coverage.
The Modules page usage is the same as the Hierarchy page usage. Refer to the
Using the Hierarchy Tab section for details.
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.
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.
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.
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.
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.
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:
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”
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 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.
NOTE: Coverage information does not exist in the database for assume
statements.
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.
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),
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".
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
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]
An example of the PDF document after setting its color using Spec Colors is
shown in the following figure:
4. To change plan colors, select Plan Colors to show the following list:
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:
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.
Score(Auto) = [sum_of_meteric-score_times_metric-point] /
[sum_of_ metric-point]
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.
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.
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.
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
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.
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.
• 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.
• 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.
When multiple sources are dragged and then dropped to a planner, sources are combined under
the measure (refer to Figure Selecting Multiple Features).
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.
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).
• Right-click instance2 and select New Sibling Feature (see the figure below).
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.
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:
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:
Selection Action
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:
The following actions are performed when creating features from a single and multiple
instances. Different selections in the summary table result in different actions.
The following sections describe the position, order, and naming of the features created:
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.
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.
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.
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.
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:
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:
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.
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).
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.
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
use the icon to create a new sibling feature of the selected one and link it to the section in the
specification.
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).
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.
4. Click the icon to create a new sibling feature and link to the selected 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.
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).
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).
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.
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.
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.
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:
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
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
Limitations
The specification-linking feature has the following limitation:
• 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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):
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).
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):
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).
For user data, Verdi Planner generates a user data file with the following naming convention:
<plan_filename>.hud
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.
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.
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:
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
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:
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).
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
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:
test.hvp
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:
NOTE: Main plans and subplans should share the same margin for merging the specification
coverage, otherwise, coverage merge cannot happen among plans.
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
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:
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.
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
Conflict Resolution
When Verdi Coverage detects a conflict, it resolves it using the following rules:
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:
Now, consider that you also load user data; the test status changes to the following:
As user data results takes precedence over VDB test results as user data gets higher precedence
in a conflict situation.
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.
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.
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.
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
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:
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 {}.
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):
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).
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).
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.
You can toggle the button to display or hide the metrics as shown in
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:
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.
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:
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:
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>)}
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)
HVP
To add a description to an attribute definition in a plan, use the following syntax:
<att_name>.description = <enquoted_description_string>
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:
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:
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:
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.
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.
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.
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.
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:
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:
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:
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:
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, Group.excluded_count shows the count as 484 and other Group.*_count
submetrics show 0 because test_jukebox.st0.coin1::Cvr.RDXWD is excluded.
For example, if a source target is a covergroup definition, coin_fsm::Cvr, Verdi generates the
following URG report:
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):
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
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
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.
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.
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.
Icon Description
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.
The metric combos are enabled /disabled using the rules listed in the following
table:
Figure Excluding Child Instances shows how you can exclude child instances.
To save the exclusion file with the selected metrics, enable the
Save propagated exclusions from module of covergroup variant
Metrics option.
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.
These options are also available in the Exclusion menu as shown in the following
figure:
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
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.
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.
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.
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
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
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:
Note: For more details on how to add annotations to an exclusion, see the
Adding Annotations for Exclusions section.
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:
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:
• If all instance groups are excluded, then its variant is also excluded, as
shown in the following figure:
• 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:
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:
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:
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.
• 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.
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.
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.
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
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]
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.
After you have selected the Elaboration database that needs to be loaded, Verdi
Coverage loads it.
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.
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.
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.
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;
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.
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.
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.
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.
Verdi drag and drop location depends on the top-left corner of the icon, which is
present on the right-side of the cursor.
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.
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.
The table Drag and Drop to Verdi Coverage Behavior describes the drag and drop
behavior from the Verdi platform to Verdi Coverage.