You are on page 1of 52

DesignChecker Tutorial

Release v2019.4

© 2005-2019 Mentor Graphics Corporation


All rights reserved.

This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this
document may duplicate this document in whole or in part for internal business purposes only, provided that this entire
notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable
effort to prevent the unauthorized use and distribution of the proprietary information.

Note - Viewing PDF files within a web browser causes some links not to function (see MG595892).
Use HTML for full navigation.
This document is for information and instruction purposes. Mentor Graphics reserves the right to make
changes in specifications and other information contained in this publication without prior notice, and the
reader should, in all cases, consult Mentor Graphics to determine whether any changes have been
made.

The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in
written agreements between Mentor Graphics and its customers. No representation or other affirmation
of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor
Graphics whatsoever.

MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE.

MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR
CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS)
ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT,
EVEN IF MENTOR GRAPHICS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at
private expense and are commercial computer software and commercial computer software
documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to
FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S.
Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth in
the license agreement provided with the software, except for provisions which are contrary to applicable
mandatory federal laws.

TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of
Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior
written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third-
party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to
indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’
trademarks may be viewed at: mentor.com/trademarks.

The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of
Linus Torvalds, owner of the mark on a world-wide basis.

End-User License Agreement: You can print a copy of the End-User License Agreement from:
mentor.com/eula.

Mentor Graphics Corporation


8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777
Telephone: 503.685.7000
Toll-Free Telephone: 800.592.2210
Website: mentor.com
Support Center: support.mentor.com

Send Feedback on Documentation: support.mentor.com/doc_feedback_form


Table of Contents

Chapter 1
DesignChecker Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
DesignChecker RuleSet and Policy Configuration Overview . . . . . . . . . . . . . . . . . . . . . . . . 7
Creating a RuleSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Copying a Base Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Configuring a Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Copying a RuleSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Creating a Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Running an Analysis on Files or Design Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

Chapter 2
DesignChecker Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
DesignChecker Window With Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using Viewpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exclusion of Files From Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Setting a Black Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using the Black Box Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Don’t Touch Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Enabling Pragma Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Viewing the Exclusion Pragmas in Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Excluding Rules From Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Results Cross-Referencing in DesignPad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Cross-Referencing to Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Exporting Results of DesignChecker Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Index
End-User License Agreement
with EDA Software Supplemental Terms

DesignChecker Tutorial, v2019.4 3


Table of Contents

4 DesignChecker Tutorial, v2019.4


List of Figures

Figure 1-1. DesignChecker High-Level Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8


Figure 2-1. DesignPad Violations Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

DesignChecker Tutorial, v2019.4 5


List of Figures

6 DesignChecker Tutorial, v2019.4


Chapter 1
DesignChecker Configuration

DesignChecker is a powerful and configurable design analysis and static checking tool. Use
DesignChecker to configure rulesets and policies, run analysis, and interpret the results.
DesignChecker operates with an interface tool or independently. You can use DesignChecker
with an interface tool in both GUI (Graphical User Interface) and batch mode, or you can use
DesignChecker independently in batch mode only.
The DesignChecker Tutorial explains how to use DesignChecker with HDL Designer Series as
the interface tool in which a design is already created.
DesignChecker RuleSet and Policy Configuration Overview . . . . . . . . . . . . . . . . . . . . . 7
Creating a RuleSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Copying a Base Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Configuring a Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Copying a RuleSet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Creating a Policy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Running an Analysis on Files or Design Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

DesignChecker RuleSet and Policy


Configuration Overview
Use DesignChecker to validate different aspects of your code and ensure that your design
conforms to your coding standards. Frequently, you will not want to use the full range of checks
applied by a comprehensive ruleset. You can create as many policies as you need. You can use
these policies to apply different subsets of your ruleset. The ability to apply the different subsets
enables you to channel the powerful static checking features of DesignChecker toward specific
sets of development issues, so you can focus your attention on your development projects.

DesignChecker Tutorial, v2019.4 7

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Creating a RuleSet

Figure 1-1. DesignChecker High-Level Flow

The ruleset and policy configurations are for all members of a development team and contain
the full set of checks that DesignChecker applies. You should only update the configurations
when coding standards are updated.

Creating a RuleSet
A ruleset is a folder that contains one or more configured rules. Typically, you create a ruleset
folder, and then place one or more configured rules in the folder.
For example, you might create a ruleset called Allowed Options and then place rules about
allowed constructs, libraries, and types within that ruleset.

DesignChecker comes with a built-in set of parameterized, optimized base rules. Each of these
base rules has a set of configurable parameters. DesignChecker can implement hundreds of
common rules from a set of approximately 100 parameterized base rules.

8 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Creating a RuleSet

The rulesets are typically defined by a project administrator and shared by all the team members
working on a project. This ensures that all designs in the project meet the same common project
standards.

Procedure
1. Invoke DesignChecker from the HDL Designer Series Design Manager window by
choosing Tools > Manage Policies/RuleSets.
The Setup window contains three default folders for Policies, RuleSets, and Base Rules.

DesignChecker Tutorial, v2019.4 9

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Creating a RuleSet

2. Expand the RuleSets folder.

The preconfigured Reuse Methodology Manual (RMM) is available in the RuleSets


folder, in addition to the preconfigured Altera, Checklist, DO-254, Essentials,
Safety-Critical, Verification_OVM, Verification_SV, Verification_UVM and Xilinx
rulesets.
3. Right-click the RuleSets folder, and then choose New RuleSet.
4. Change the name of your new ruleset to Basic.

Note
The overlay indicates that your new ruleset has not been saved.

10 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Copying a Base Rule

Results
You have created a new ruleset titled Basic. You can now add rules to the Basic ruleset by
copying from the available DesignChecker base rules. See “Copying a Base Rule” on page 11.
Note
You can also copy an existing ruleset or base rule folder into your Basic ruleset folder. See
“Copying a RuleSet” on page 14.

Copying a Base Rule


You need to add the rules you will use to check your coding standards into your ruleset folder.
DesignChecker provides a wide range of parameterized base rules. You can copy the base rules
you need into your ruleset.
Procedure
1. Expand the Base Rules folder and select the Style category.
A set of base rules for this category displays in the Content pane.

2. Select the Length base rule, and then create a copy in your Basic ruleset folder using
drag-and-drop, or using the Copy and Paste popup menu items.

DesignChecker Tutorial, v2019.4 11

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Configuring a Rule

Your ruleset should now contain a copy of the Length rule, which appears in the Content
pane when the Basic ruleset is selected.

Results
You have added the Length base rule into the Basic ruleset. You can now configure the
parameters of this rule to match your coding standards. See “Configuring a Rule” on page 12.

Configuring a Rule
After creating a ruleset folder and copying base rules, you need to configure the parameters of
the copied base rules according to your coding standards. On running DesignChecker later, it
analyzes your source code against these parameters and reports any violations.
Procedure
1. In the Content pane, select the copy of the Length rule for your Basic ruleset.
The parameters for your configured rule appear in the Parameters pane.

2. Analyze the Length rule by choosing Help > Base Rule Reference Guide.

12 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Configuring a Rule

3. Scroll through the list to the Length rule entry under the Style Base Rules heading.
The Name, Severity, Language, Hint, Short Description, and Keywords parameters are
common to all rules. These are displayed in the Parameters pane.

Note
You can access information about these parameters by choosing Help > Common
Base Rule Parameters.

Many rules have additional parameters that are specific to that rule. In this example, you
will change several parameters.

Tip
You can resize any column in the parameters pane by dragging the symbol in the
column heading.

4. Configure the copy of the Length base rule to warn against the use of lines longer than
45 characters by double-clicking the Severity parameter default value and selecting
Warning from the dropdown list.

5. Double-click the default value for the Hint parameter and type the new text:
Line exceeds 45 characters.

6. Place your cursor in the Max. Length field and change the value from 72 to 45.
7. Double-click the default value for the Language parameter.
The Parameters for Language dialog box appears.
8. Select both the VHDL Any and Verilog Any check boxes, if they are not already
selected.

DesignChecker Tutorial, v2019.4 13

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Copying a RuleSet

Note
You can access the full description of a base rule by using the menu button or, in
the Content pane by right-clicking the required rule, and then choosing Base Rule
Details. The corresponding page of the Base Rule Reference Guide appears in your
HTML browser. Alternatively, you can choose Help > Base Rule Reference Guide to
display the contents page of the Base Rule Reference Guide in your HTML browser.

9. Click OK.
Results
You have configured the Length base rule you had previously copied to the Basic ruleset.
You can also copy existing predefined DesignChecker ruleset and/or base rule folders to your
user-defined Basic ruleset folder. See “Copying a RuleSet” on page 14.

Copying a RuleSet
You can copy an existing ruleset or base rule folder into your own ruleset folder. You may copy
several rulesets, delete rules that are not required, and then configure the remaining rules. Using
the copy functionality helps you quickly create a new ruleset.
Procedure
1. In the Folders pane, under Base Rules, click the Declarations category and drag it into
your Basic ruleset.

14 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Copying a RuleSet

2. In the Content pane, double-click the Declarations folder, select the Hard Coded
Numeric Values rule, and then change its severity value to Note.

3. Add a rule to check the naming conventions used. Click Search in the toolbar and type
the text “name,” and then click Find Now.
4. Select the Mixed Case Naming rule from the Search results pane and drag and drop it
into your Basic ruleset.
5. Click Close to close the search window.
6. Under RuleSets, open the RMM folder and examine the range of rules available.

DesignChecker Tutorial, v2019.4 15

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Copying a RuleSet

These rules have been preconfigured to meet the specifications of the Reuse
Methodology Manual.
7. Copy the 4 - Clocks & Resets subfolder and paste it into your Basic ruleset folder.
8. Under Base Rules, analyze the Allow folder and drag and drop a copy of the Allowed
Constructs rule in your ruleset.
9. Save your configured rules and ruleset by clicking Save All or File > Save All.

Note
The overlay is cleared to indicate that your rules and ruleset have been saved since
they were last changed.

Results
You have now done the following:
• Copied the Declarations base rule folder to your Basic ruleset and configured the Hard
Coded Numeric Values rule.
• Searched for the Mixed Case Naming rule and copied it to your Basic ruleset using drag-
and-drop.
• Opened the RMM ruleset and copied the 4 - Clocks & Resets subfolder.
• Opened the Allow base rule category and copied the Allowed Constructs rule using
drag-and-drop.
You can now create a policy that references the Basic ruleset. See “Creating a Policy” on
page 17.

16 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Creating a Policy

Creating a Policy
A policy is a high-level folder that references your rulesets. Use your policies to enable and
disable subsets of checks defined in a ruleset. You can configure policies to apply at different
stages of the development process.
DesignChecker applies policies to provide only results that are pertinent to your current work.
For example, early in the design process, you may want to run your Basic ruleset to check
language issues. Later, as the design moves forward, you may want to apply a more rigorous set
of checks. You can also disable rulesets or individual rules using your policies.

Procedure
1. In the Folders pane, right-click the Policies folder and choose New Policy.
2. Change the name of the new policy to Tutorial.
The overlay indicates that the new policy has not yet been saved.

3. Create a reference to your Basic ruleset by clicking and dragging your Basic ruleset
from the RuleSets folder into the Tutorial policy.

You can quickly build up multiple policies by referencing rulesets.


4. Set your Tutorial policy as your default policy by right-clicking it and choosing Set As
Default.
The indicator moves to the Tutorial policy, and the policy name is bold.

DesignChecker Tutorial, v2019.4 17

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Running an Analysis on Files or Design Units

You can enable or disable the rulesets and individual rules in a policy before any
analysis takes place using the check marks in the Folders and Content panes.

Note
You should enable all rulesets and rules in the Tutorial policy for this tutorial.

5. Save your policy by clicking Save All or File > Save All.
The overlay is cleared to indicate that your policy has been saved since it was last
changed.
Results
You have created a policy that references your Basic ruleset. You can now run a DesignChecker
analysis of your code to check if there are any rule violations. See “Running an Analysis on
Files or Design Units” on page 18.

Running an Analysis on Files or Design Units


You can run an analysis on single or multiple levels of hierarchy from within the HDL Designer
Series Design Explorer, within the DesignPad text editor, or by running in batch mode from the
command line.
You can select files and design units and run an analysis from the design explorer of your HDL
Designer Series tool. In this tutorial, you will analyze a design unit hierarchically through
components using the policy and rules you created to run an analysis.

Note
You can run the DesignChecker analysis either on a file in the Files pane or on a design unit
in the Design Units pane. If you run the analysis on a file, the file and all its pertinent design
units are checked; alternatively, if you run analysis on a design unit, only this design unit is
checked (and its underlying design units if you run hierarchically).

18 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Running an Analysis on Files or Design Units

Procedure
1. In the main HDL Designer Series Design Manager window, open the examples project
by clicking the Open Project shortcut or by choosing File > Open > Project.
The Open Project dialog box opens.

2. In the Design Explorer, open the UART library and select the uart_tb design unit.
3. Set uart_tb as your design root by right-clicking it, and then choosing Set Design Root.

DesignChecker Tutorial, v2019.4 19

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Running an Analysis on Files or Design Units

4. Select and run the flow through components from the dropdown palette on the
DesignChecker toolbar or by choosing Tasks > DesignChecker Flow > Run Through
Components.

20 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Running an Analysis on Files or Design Units

A list of all objects analyzed and a completion message are shown in the HDL Designer
Log window, and the Results window opens in DesignChecker.

DesignChecker Tutorial, v2019.4 21

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Configuration
Running an Analysis on Files or Design Units

22 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Chapter 2
DesignChecker Results

This chapter describes how to work with DesignChecker results. You will view in detail the
results from your analysis. You will be introduced to viewpoints and learn how to use filters to
customize the available information. You will also investigate DesignChecker’s powerful cross-
referencing capabilities and use the DesignPad editor. Finally, you will learn how to export your
DesignChecker results in a variety of formats.
DesignChecker Window With Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Using Viewpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Exclusion of Files From Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Setting a Black Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using the Black Box Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Don’t Touch Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Enabling Pragma Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Viewing the Exclusion Pragmas in Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Excluding Rules From Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Results Cross-Referencing in DesignPad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Cross-Referencing to Graphics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Exporting Results of DesignChecker Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44

DesignChecker Tutorial, v2019.4 23

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
DesignChecker Window With Results

DesignChecker Window With Results


To access: DesignChecker (window), Results (tab), Checked Files/Design Units (tab), Rule
Details (tab), or Exclusions (tab)
Use this window to examine your results in DesignChecker.
Description

Your results may vary if you have selected a different set of files for analysis, or if your ruleset
does not match the Basic ruleset or the Tutorial policy. If this happens, repeat the setup steps in
“DesignChecker Configuration” on page 7, because they are necessary for the successful
completion of the analysis in this tutorial.

24 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
DesignChecker Window With Results

Objects
Table 2-1. Results Tab
Object Description
Results Describes the details of rule violations encountered during
an analysis. This view also shows a range of summary
tables providing information about the analysis run. You
can use the table to drill down to specific issues and cross-
reference between DesignChecker and your source code
using DesignPad. Additionally, you can cross-reference
results using the available graphical editors.

Table 2-2. Checked Files/Design Units Tab


Object Description
Checked Files/Design Units Describes the files and design units that have been
analyzed in the latest DesignChecker analysis.

Table 2-3. Rule Details Tab


Object Description
Rule Details Shows the policy applied to your latest DesignChecker
analysis. This view provides the names of the policy,
ruleset, and configured rules.

Table 2-4. Exclusions Tab


Object Description
Exclusions Shows the exclusions settings related to the latest analysis
results, if any.

Table 2-5. Results Summary Pane


Object Description
Settings Shows basic information about the analyzed design.
Exclusions Shows information on only the exclusion settings that
affected the latest analysis results. This pane shows, for
example, the number of Policy Disabled Rules, Code/Rule
Exclusions, Black Box Files, and Exclusion Pragmas for
the latest run.
Design Quality Shows the results of the design quality analysis if the
Design Quality Metric feature is activated. However, if
this feature is not activated, then this pane does not display
any information and only indicates that “Analysis is turned
off.” Refer to Design Quality Metric in the DesignChecker
User Guide for information about measuring your design
quality.

DesignChecker Tutorial, v2019.4 25

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using Viewpoints

Table 2-5. Results Summary Pane (cont.)


Object Description
Violations Summarizes the number of error, warning, and note rule
violations for each type of design object. Your results may
vary depending on the contents of the Basic ruleset that
you created. You can view the details of the violations for
each scope by double-clicking its row in the table.
Rules Summarizes the number of violations within the rulesets/
rules of your policy. Additional rows may be shown
depending on the contents of the Basic ruleset that you
created with the totals shown on the All row.
Design Units Shows the rule violations for each design unit.

Table 2-6. Viewpoints Sidebar


Object Description
Viewpoints Controls how the detailed results are displayed. The
default viewpoint shows the results hierarchically by
severity (Error, Warning, or Note), and then by ruleset,
design unit, or violation.
Viewpoint Manager Opens the viewpoint manager.

Table 2-7. Viewpoint Manager


Object Description
Available Viewpoints Shows the default viewpoint and other available
viewpoints.
Columns, Groups, Filters Controls how the results are displayed.

Usage Notes
Cross-Referencing Rule/RuleSet from Rule Details Tab to Setup Tab
In the Rule Details tab, double-clicking a rule, or right-clicking a rule and then choosing Show
Rule/RuleSet, opens the corresponding rule/ruleset in the Setup tab.

Viewing Rules Violation Details


In the violations table, double-click any scope, such as the Entity row, to view its corresponding
violations. The viewpoint Violations for Scope Entity appears in the Results window.

Using Viewpoints
You have the ability to control how DesignChecker displays your analysis results through
viewpoints. DesignChecker provides a number of viewpoints with different sorting of analysis

26 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using Viewpoints

results. For example, you may choose to display your violations sorted by severity and ruleset,
by severity and file, and so on.
In addition, you have the ability to select certain columns to display in the Results window,
group results by a specific column, and/or filter results as needed.

Procedure
1. Open the viewpoint manager by clicking the Viewpoint Manager button.
A default viewpoint and other example viewpoints are available.
2. Make the Severity & RuleSet viewpoint active by selecting it and clicking the Set
Active button.

This viewpoint displays the results hierarchically by severity (Error, Warning, or Note),
then by ruleset, design unit, or violation.
3. Expand the Error for the Declarations ruleset by doing one of the following:
• Click the icons.

• Right-click the Declarations error, and then choose Expand From Here.

DesignChecker Tutorial, v2019.4 27

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using Viewpoints

A series of error violation messages prefixed by the red icon appear.

When you hover the mouse cursor over one of the violation messages, an object tip
appears showing the rule that has been violated, the line number containing the
violation, and the full message text.
4. Right-click and choose Base Rule Details.
A browser window appears that contains the appropriate entry in the Base Rule
Reference Guide.
5. Expand one of the violation messages to reveal the code snippet that contains the rule
violation and a hint message that suggests the corrective action.

28 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using Viewpoints

The line containing the rule violation is shown in red text in addition to being
highlighted in yellow.

Note
Expand the code snippet to display additional lines by placing your cursor over the
bounding line between the code snippet and the hint message. The bounding line is
highlighted in red, and the mouse cursor changes to a vertical double arrow that you can
drag to show a broader or narrower context for your code snippet.

6. Select the rule violation (shown with a blue background when selected) and choose
Results > Show Rule.
The Setup window appears with the Declarations ruleset folder and the Unused
Declarations rule selected. Tracing to the rule in this way, you can easily check the rule
parameters to determine the reason for the rule violation.
7. Click the Results tab to return to the Results window.
You can also cross-reference to the policy or ruleset using the Base Rule Details button
or right-click and choose Base Rule Details from the popup menu. The rule description
opens on the relevant page of the Base Rule Reference Guide in your HTML browser.

DesignChecker Tutorial, v2019.4 29

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using Viewpoints

Results
You have now set up the viewpoint of analysis results. The last used viewpoint is stored in your
preferences and automatically used when you re-invoke DesignChecker.

30 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exclusion of Files From Analysis

Exclusion of Files From Analysis


Configure the DesignChecker to exclude certain files from analysis using the Black Box and
Don’t Touch settings. You can set any component as a black box. If a black box is set,
DesignChecker does not examine it for errors, but includes it within the overall analysis so that
a complete design can be checked. The Don’t Touch setting excludes a component from the
entire analysis. You can also exclude certain code blocks from analysis using the Exclusion
Pragmas settings.
Setting a Black Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Using the Black Box Setting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Don’t Touch Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Enabling Pragma Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Viewing the Exclusion Pragmas in Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

Setting a Black Box


You can set any component as a black box. If a black box is set, DesignChecker does not
examine the component for errors.
Procedure
1. Open the UART example library in the Design Explorer and be sure you are using the
Design Units mode.
2. Right-click the xmit_rcv_control block and choose DesignChecker > Edit Black-Box
Settings.
The Black-Box Settings dialog box opens.
3. Select the Black-Box selected file(s) check box and click OK.

DesignChecker Tutorial, v2019.4 31

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Using the Black Box Setting

An icon appears, indicating that a black box has been set. If this is not visible,
right-click the header of the Design Unit view and choose Black Box Indicator.

Results
You have now set the xmit_rcv_control block as a black box. Refer to “Using the Black Box
Setting” on page 32 to see how DesignChecker excludes this block from analysis.

Using the Black Box Setting


After you set part of the UART library as a black box, you can rerun your analysis to see the
impact this setting has on your results.

32 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Don’t Touch Setting

Procedure
1. In DesignChecker, choose Run > Re-run last Analysis.
Examine the results. The number of violations reported in the summary window is
reduced.
2. Open the Exclusions pane in the summary window.
One Black Box File is reported.

Note
The added Black Box file is shown in the DesignChecker Exclusions tab in the
Black Boxed Files pane. This tab shows all the available exclusion settings whether
they affect the analysis results or not, whereas the Results Summary window shows
information on only the exclusions that have affected the analysis results.

3. (Optional) To remove the black box setting, perform the following steps:
a. In the HDL Designer Series Design Explorer, right-click the xmit_rcv_control
block, and then choose DesignChecker > Edit Black-Box Settings
The Black-Box Settings dialog box opens.
b. In the Black-Box Settings dialog box, clear the Black-Box selected file(s) check box,
and then click OK.

Don’t Touch Setting


The Don’t Touch setting excludes files completely from analysis. You can exclude specific files
with the Don’t Touch feature within the Design Manager.
Mark files as Don’t Touch by choosing Edit > Don’t Touch Settings and completing the fields
in the Don’t Touch Settings dialog box.

DesignChecker Tutorial, v2019.4 33

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Enabling Pragma Exclusion

Files marked with the Don’t Touch setting are marked with the icon in the design manager.

Enabling Pragma Exclusion


You can exclude certain parts of your code from analysis. Use Exclusion via Pragma Pairs to
force DesignChecker to skip specific RTL code blocks while running an analysis. For example,
parts of your code may be used only for debugging purposes, so it may not be necessary to have
these parts checked.
Prerequisites
• Be sure you have removed any Don’t Touch markers from your files.

34 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Viewing the Exclusion Pragmas in Results

Procedure
1. In the Files pane of the Design Manager, expand the DesignChecker tree.
2. Right-click the Exclusions: Pragmas node and choose Enable Pragma Exclusion.

Note
Synthesis pragmas are always enabled. You can disable pragma exclusion by right-
clicking, and then choosing Exclusion: Pragmas > Disable Pragma Exclusion.

3. Within your source code, use the exclusion pragmas to encase the excluded code. For
example:
a. In the Files pane, open the Design Files node.
b. Expand the UART library, and then double-click the file status_registers_spec.vhd.
c. Insert the start pragma --pragma checking_off at the beginning of the file and insert
the end pragma --pragma checking_on at the end of the file and save.
The start pragma placed as a comment before the beginning of the code block is an
indication for DesignChecker to stop analysis at this point; the end pragma’s
placement as a comment after the end of the code block is an indication to resume
analysis.
Results
You have now enabled pragmas exclusion in the status_registers_spec.vhd file. Refer to
“Viewing the Exclusion Pragmas in Results” on page 35 to see the impact on analysis.

Viewing the Exclusion Pragmas in Results


After you exclude part of your code from design checking, you can rerun your analysis to see
the impact this exclusion has on your results.
Procedure
1. Choose Run > Re-run last Analysis.
2. Examine the results.
The number of violations reported in the summary window is reduced.

DesignChecker Tutorial, v2019.4 35

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Viewing the Exclusion Pragmas in Results

When you open the Exclusions pane in the Summary window, it reports the existence of
two Exclusion Pragmas.

3. Click the Exclusions tab.


In the Exclusion Pragmas section, the checking_off/on pragma pair is enabled.

Note
The Exclusions tab shows all the available exclusion settings whether they affect the
analysis results or not, whereas the Results Summary window shows information on
only the exclusions that have affected the analysis results.
In the Exclusions tab, the exclusion settings affecting the results of the last analysis are
shown in bold.

4. Right-click the pragma and choose Open Source File(s).

36 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Viewing the Exclusion Pragmas in Results

The source file status_registers_spec.vhd opens in the DesignPad; excluded code is


highlighted in gray by default.

(Optional) Remove the exclusion pragma by doing one of the following:


• In the DesignChecker Exclusions tab, right-click the pragma, and then choose
Remove Exclusion.
• In the Files pane, expand the DesignChecker node, right-click the Exclusion:
Pragmas node, and then choose Disable Pragma Exclusion.

DesignChecker Tutorial, v2019.4 37

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Excluding Rules From Analysis

Excluding Rules From Analysis


At times you may want to turn off one or more of the checks. For example, you may want to
check that just one set of issues has been resolved. One solution is to create a new policy
containing only the rules you want to apply. However, this can quickly become cumbersome, so
DesignChecker enables you to selectively disable rules from the Results window.
Prerequisites
• Ensure you have removed any black box markers from your files.
Procedure
1. Open the Results window, and view the Warning messages (identified by a blue
symbol).
The warning messages should all relate to the Length rule you customized in
“Configuring a Rule” on page 12.
2. Expand any violation so that you can see the relevant code snippet.
3. Choose Results > Disable Rule For > Policy ‘Tutorial’.
The Edit Justification dialog box opens, if the “Prompt for justification” option is set.
Optionally, type an explanation for disabling the rule for future reference.
The background color of all violations relating to the Length rule changes, and then
these violations are removed from the Results tab.

4. Re-run your analysis.


Your results should not contain any warning messages.

38 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Results Cross-Referencing in DesignPad

5. Click the Setup tab, and then expand your Tutorial policy.
The policy icon now has a symbol indicating that the policy has been changed, and
that the Length rule in the Content pane is unchecked.

6. Select the Length rule in the Content pane, and then save your policy by clicking Save
All or choosing File > Save All.

Results Cross-Referencing in DesignPad


To access:
• Click the Results tab, click Open HDL
• Choose Results > Open HDL
You can open the DesignPad text editor at the line of code corresponding to any rule violation
you select in the DesignChecker results window.
DesignPad opens with the line containing the violation shown in dark blue in the Report pane.
The violation messages are shown in a separate split screen view below the HDL text.
Table 2-8. Default Violation Colors in DesignPad
Violation Color
Single error Red
Multiple violations (overlapping messages) Yellow
Warnings Blue
Notes Green

Note
You can change the syntax highlighting colors by setting preferences in DesignPad.

DesignChecker Tutorial, v2019.4 39

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Results Cross-Referencing in DesignPad

Figure 2-1. DesignPad Violations Report

Use the Go To Next Message and Go To Previous Message buttons in the DesignPad Search
toolbar to step through the messages in DesignPad.

You can also view the rule violations in the DesignPad code browser as accumulated totals after
each object name.

40 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Cross-Referencing to Graphics

For example: spec[0,9,3] indicates that there are no error violations (red), nine warning (blue),
and three note (green) violations for the spec module.

Many of the analysis commands are available from additional DesignChecker pulldown and
popup menus, which are added to DesignPad when it has been invoked from within
DesignChecker. For example, you can display the hint message for the violation under the
cursor, show the corresponding rule, or disable the rule.

Run the analysis task from within DesignPad by clicking the Run Analysis Single button. The
DesignChecker task selects the most appropriate design unit as the top unit. This is normally the
design unit in closest proximity to the selected code block.

Related Topics
DesignPad Text Editor User Manual

Cross-Referencing to Graphics
You can cross-reference between a rule violation in DesignChecker to a graphical source view
in one of the HDL Designer Series graphical editors. DesignChecker always launches the editor
with the appropriate design component selected. You can practice building your own rulesets
and policies, and then test them against the UART example library to explore this feature in
greater depth.

DesignChecker Tutorial, v2019.4 41

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Cross-Referencing to Graphics

Procedure
1. In the HDL Designer Series Design Explorer, open the UART library.
2. Select the address_decode design unit, and then click the button.

DesignChecker launches with an active Results window.

3. Click the Viewpoint Manager button, and then select the Filters option.
4. In the “Show objects if” field, select Full Message.

42 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Cross-Referencing to Graphics

5. In the “field contains” field, type the text “used,” and then click Apply.

In this example, there are two errors shown when you expand the Results window.

6. Click one of the violations and trace to the block diagram by clicking the Open Source
button or by choosing Results > Open Source.

DesignChecker Tutorial, v2019.4 43

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exporting Results of DesignChecker Analysis

The block diagram opens and is centered on the address_decode component.

Note
Tracing either violation selects the same component.

Exporting Results of DesignChecker Analysis


Export information on your latest DesignChecker analysis using the Export Results dialog box.
You can generate reports on the latest results, the summary, the exclusion settings applied to the
analysis, details on the rules used in the analysis, and information on the files and design units
that have been analyzed, and you can also generate a combined report of all or part of the
previously stated.
Procedure
1. In DesignChecker, choose File > Export Results.
The Export Results dialog box opens.

44 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exporting Results of DesignChecker Analysis

2. Click the Summary tab to generate a report showing the content of the Summary pane.

3. Select the Enable Export of Summary check box and specify the location and the type of
the file.
The file extensions are normally registered on a Windows® system to open CSV files
(.csv) in Microsoft® Excel, TSV files (.txt) in your default text editor, and HTML files
(.htm) in your default HTML browser.

DesignChecker Tutorial, v2019.4 45

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exporting Results of DesignChecker Analysis

Note
You can also import TSV files (or use drag and drop) into a Microsoft® Excel
spreadsheet.

4. (Optional) Specify the sections to show in the Summary report by checking them under
“Selectively Enable Export of Summary Pane Sub Section”: Settings, Exclusions,
Design Quality, Violations, Rules, and Design Units.
5. Click OK and navigate to the location specified in the Summary tab to examine your
file.
6. (Optional) Generate another report summarizing the details of the rules used in the
analysis by clicking the Rule Details tab, and then performing Steps 3 and 5.

Try exporting other reports (results, exclusions, checked files and design units) to a
location of your choice, and then view the results.

46 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exporting Results of DesignChecker Analysis

Note
For more information on creating combined reports, refer to Exporting Combined
Reports in the DesignChecker User Guide.

Note
In addition to the ability to export your results in CSV, TSV and HTML files, you
have the ability to save your results in .tbc files physically on your hard disk and
load them in DesignChecker in the future when needed. This feature allows you to run
DesignChecker operations on your saved results. For more information, refer to Saving
and Loading DesignChecker Results in the DesignChecker User Guide.

Related Topics
DesignChecker Window With Results
Exclusion of Files From Analysis
Excluding Rules From Analysis

DesignChecker Tutorial, v2019.4 47

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
DesignChecker Results
Exporting Results of DesignChecker Analysis

48 DesignChecker Tutorial, v2019.4

Note - Viewing PDF files within a web browser causes some links not to function. Use HTML for full navigation.
Index

Project
Index

—A— opening, 21
Analysis
excluding files, 31 —R—
running, 33, 36 Results
selecting files, 18 Cross-Referencing in DesignPad, 39
setting Design Root, 21 Cross-Referencing to Graphics, 41
Exporting, 44
—B— Reuse Methodology Manual, 10, 16
Base Rule, 10 Rule
Common Parameters, 13 configuring, 12
copying, 11 disabling, 38
Details, 28 enabling and disabling, 18
Reference Guide, 13, 29 RuleSet, 10, 17, 31
—D— copying, 14
Design Explorer, 18, 31 creating, 8
Design Manager, 9, 21, 34 enabling and disabling, 18
DesignChecker —V—
invoke, 9 Viewpoint, 43
toolbar, 21 using, 26
DesignPad, 18, 39
Dialog box
Open Project, 21
Parameters for Language, 14
Don’t Touch, 34
—E—
Edit Balck-Box Settings, 34
Edit Black-Box Settings, 31
—H—
HDL Designer Series, 9, 18
—M—
Manage Policies/ RuleSets, 9
—P—
Policies, 10, 17
Policy, 31
creating, 17
setting as default, 17

DesignChecker Tutorial, v2019.4 49


50 DesignChecker Tutorial, v2019.4
End-User License Agreement
with EDA Software Supplemental Terms
Use of software (including any updates) and/or hardware is subject to the End-User License Agreement together with the
Mentor Graphics EDA Software Supplement Terms. You can view and print a copy of this agreement at:

mentor.com/eula

You might also like