0% found this document useful (0 votes)
346 views

Training Tutorial Jaspergold® Apps Property Visualization and Debugging

JASPER AHB ASSERTIONS

Uploaded by

madhukir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
346 views

Training Tutorial Jaspergold® Apps Property Visualization and Debugging

JASPER AHB ASSERTIONS

Uploaded by

madhukir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Training Tutorial

JasperGold® Apps Property


Visualization and Debugging
Version July 2013

Jasper Confidential — for sole use by authorized and licensed Jasper users.
Publish date: July 24, 2013

Jasper® Design Automation, Inc.


Copyright © 2006-2013
All rights reserved

Copyright Notice and Proprietary Information


Copyright © 2006-2013 Jasper Design Automation, Inc. All rights reserved. This software
and documentation (“Materials”) are owned by Jasper Design Automation, Inc. and may
be used only as authorized in the license agreement controlling such use. No part of these
Materials may be reproduced, transmitted, or translated, in any form or by any means,
electronic, mechanical, manual, optical, or otherwise, without prior written permission of
Jasper Design Automation, or as expressly provided by the license agreement.

These Materials are for information and instruction purposes. Jasper Design Automation
reserves the right to make changes in specifications and other information contained in
these Materials without prior notice, and the reader should, in all cases, consult Jasper
Design Automation to determine whether any changes have been made.

Disclaimer
JASPER DESIGN AUTOMATION, INC. DISCLAIMS AND MAKES NO WARRANTIES,
EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH REGARD TO THESE
MATERIALS, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT.
IN NO EVENT SHALL JASPER DESIGN AUTOMATION, INC. BE LIABLE FOR ANY
DIRECT, INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES
WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT
OF OR RELATED TO THESE MATERIALS OR THE INFORMATION CONTAINED IN
THEM, HOWEVER CAUSED AND WHETHER BASED IN CONTRACT, TORT
(INCLUDING NEGLIGENCE) OR ANY OTHER THEORY OF LIABILITY, EVEN IF
JASPER DESIGN AUTOMATION, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.

Trademarks
Jasper Design Automation, Jasper Design, Jasper, the Jasper Design Automation logo,
JasperGold, and Visualize are trademarks of Jasper Design Automation, Inc.
All other trademarks or registered trademarks are the property of their respective owners.

Jasper Design Automation, Inc.


707 California Street
Mountain View, CA 94041
Tel: (650) 966-0200
Fax: (650) 625-9840
jasper-da.com
Overview

Overview

This tutorial introduces the JasperGold® Apps Visualize™ feature. Property visualization
is useful for debugging properties early in the design cycle when the design under
verification (DUV) is not available. With complex properties written in Property
Specification Language (PSL) or SystemVerilog Assertions (SVA), the property
visualization feature lets you reduce your debugging time by quickly identifying and fixing
incorrect properties.

NOTE: This tutorial uses Verilog® and PSL as target languages. Commands and GUI
results can differ if you use the VHDL or SVA files.

Tutorial Objectives

In the course of this hands-on tutorial, you will do the following:


 Read properties
 Set up the Visualize environment
 Visualize properties using JasperGold Apps
 Configure the Visualize environment

Property Visualization and Debugging 3


Tutorial Components

Tutorial Components

The following graphic illustrates the directory structure for this tutorial.

Figure 1: Tutorial Directory Structure


tutorial_jg_property_visualization Main directory

doc
tutorial_jg_property_visulaization.pdf Tutorial guide

<language> Selected design + property language


- Verilog + PSL
- VHDL + PSL
- Verilog + SVA
solution

saved_signals.sig Saved signal list

setup.tcl Setup Tcl script (not always included)

source
<property files>

Property Visualization and Debugging 4


Conventions

Conventions

The following table lists conventions used in Jasper training materials.

Table 1: Jasper Text Conventions

Convention Definition

This icon identifies notes and tips showing different means to


achieve the same result, useful features, and so on.

Click Left-click unless otherwise specified with "right-click."


Double-click Left-click two times in rapid succession.
Courier font This style indicates:
 Text you will type in GUI fields
 Commands and options
 File names and paths
 Code samples

Italics User interface items such as button, menu option, and dialog
field names.
Menu – Option GUI command sequence.

Example: Help – Command Reference Manual


Meaning: Click on the Help menu and choose the option
Command Reference Manual.
Blue text Hyperlinked cross-reference.

When you view the PDF version of Jasper manuals from a


computer screen, click on the blue text to view related
information.

Property Visualization and Debugging 5


Property Visualization Flow

Property Visualization Flow

Figure 2 illustrates a property visualization flow using JasperGold Apps. This tutorial
targets several steps in the flow.

Figure 2: Property Visualization Flow

Starting JasperGold Apps

In the first procedure, you will launch JasperGold Apps.


1. Begin this tutorial in your shell window.
2. Go to the tutorial directory for the combination of languages you selected. For
example, if you selected Verilog as the design language and PSL as the property
language, use the command cd verilog_psl.

Property Visualization and Debugging 6


Starting JasperGold Apps

3. Start JasperGold Apps with the following command: % jaspergold


The JasperGold console appears.

Figure 3: JasperGold Console


Title bar
Menu bar
Apps tabs
Application
wizard

Property
Table

Tabs

Message
pane

Command
line
Message
pane tabs
Footer

See the JasperGold Apps User’s Guide for a detailed description of the console.

You will see that the tool automatically creates a directory called jgproject in your
working directory. It contains information such as log and command files, saved
sessions, and user preferences.

Property Visualization and Debugging 7


Analyzing Property Files and Defining the Visualize Environment

Analyzing Property Files and Defining the Visualize


Environment

The first operation before starting the verification is to analyze design and property files
and set up the proof environment. You can use the GUI to trigger these commands, type
them directly on the command line, or use the following procedure to source a Tcl script.
1. Click File – Tcl Scripts – Source.
The Tcl File dialog appears.
2. Double-click solution.
3. Click the Tcl file setup.tcl, and then click Open.

Figure 4: Sourcing a Tcl Script

JasperGold Apps analyzes the property files and sets up the Visualize environment.

Property Visualization and Debugging 8


Adding Global Assumptions

Adding Global Assumptions

JasperGold Apps lets you add assumptions in the environment before you start to
Visualize properties. Since the signals used in the properties are undriven due to the
absence of the design logic, assumptions let you constrain these signals so that the
generated waveforms do not exhibit illegal behaviors.
1. Click Application – Task – Add Property.
The Add Property dialog appears.
2. Ensure Global is checked so that the assumption affects all tasks in the environment.
3. Type gnt_zero_onehot in the Name field.
4. Type the following expression to specify that the grant signal is always zero or
onehot:
$onehot0(gnt)
5. Click OK.

Property Visualization and Debugging 9


Adding Global Assumptions

Figure 5: Add Property Dialog

The global assumption shows in the list of properties in the Property Table. The figure
below shows a view that is available when you select the Task Table tab and then click
on the task v_arbiter_fairness.

Property Visualization and Debugging 10


Visualizing a Property Violation

Figure 6: Adding Global Assumptions

Visualizing a Property Violation

JasperGold Apps provides Visualize for properties as a cover trace (reachable), sanity
trace (proven), or violation trace (counterexample found). A sanity trace shows a design
behavior that does not contradict the property, while a violation trace exhibits a failure of
the property.
1. Right-click the assertion property
arbiter.v_arbiter_fairness.a_arbiter_fairness and choose Visualize.
The Visualize dialog appears.
2. In the Visualize dialog, click OK to accept the default values.
The Visualize window appears showing the shortest violation trace based on the
proof environment. The waveform starts with the first cycle after reset. This point is
also defined as the initial state.

Property Visualization and Debugging 11


Visualizing a Property Violation

Figure 7: Visualizing a Violation Trace

Add signals (Signal Browser tab), modify the signal order (drag-and-drop signals where
desired), and create signal groups (right-click on selected signal names and choose
Group from the menu) to obtain a waveform similar to the one shown in Figure 8.

Property Visualization and Debugging 12


Visualizing a Property Violation

Figure 8: Manipulating a Violation Trace

Tip

All debugging features such as Why, trace explanation, and so on, are available
in the Visualize window. For example, doing Why on the property signal brings
up the source code view with context-sensitive information.

Property Visualization and Debugging 13


Configuring the Waveform

Configuring the Waveform

You can configure the Visualize trace in many ways. You can specify the minimum length
of the trace or constrain an expression to hold at a specific cycle. Figure 9 shows the
various configurations available and other features in the property visualization flow.

Figure 9: Visualize Flow Configurations and Features

Stop Explore / Tcl


Add Constraint Extract Constraint
Command Go Forward
Freeze All Replot

Set Visualize Stop


Options
Quiet Trace Explore Go Backward

Configuring the Initial Trace

The following steps show how to configure the initial trace to make it more interesting.

1. Click the Set Visualize Options button.


2. Enter 10 as the minimum length.
3. Click OK.

Property Visualization and Debugging 14


Configuring the Waveform

Figure 10: Extending Trace to 10 Cycles

4. Press F5 or click the Replot button to update the waveform.

5. Click the Zoom Fit button.


The trace now displays 10 cycles.

Figure 11: Updating a Configured Trace

Property Visualization and Debugging 15


Configuring the Waveform

Forcing an Expression for All Cycles

The following steps show how to force an expression for all cycles.
1. Select signals req[2] and gnt[2] at cycle one.

2. Click the Add Constraint button.

Figure 12: Forcing an Expression for All Cycles

3. Modify the expression to force that signal gnt[2] cannot be asserted if signal
req[2] is not asserted. Ensure All Cycles is checked.
4. Click OK.
5. Do the same for signals gnt[0] and req[0].

6. Press F5 or click the Replot button to update the waveform.

Property Visualization and Debugging 16


Configuring the Waveform

Figure 13: Updating a Configured Trace

Property Visualization and Debugging 17


Configuring the Waveform

Forcing an Expression at a Specific Cycle

The following steps show how to force an expression after a specific cycle or at a specific
cycle.
1. Select signal gnt at cycle four.

2. Click the Add Constraint button.


3. Modify the expression and cycle interval (use [1:4]) to force that signal gnt is 0
until and including cycle four.

Figure 14: Forcing an Expression after a Specific Cycle

4. Click OK.
5. Select signal gnt[0] at cycle six.

6. Click the Add Constraint button to force gnt[0]to be 0 at cycle six

Property Visualization and Debugging 18


Configuring the Waveform

Figure 15: Forcing an Expression at a Specific Cycle

7. Click OK.

8. Press F5 or click the Replot button to update the waveform.

Property Visualization and Debugging 19


Viewing the Active Configuration

Figure 16: Updating a Configured Trace

You can further configure the trace to lock known values, freeze all signal values to
concatenate a new behavior to the existing trace, and so on.

Viewing the Active Configuration

You can view the configuration for the current trace directly in the configuration pane.
You can undock this pane from the Visualize window or drag it to a new location in the
window. You can also add, edit, or remove configurations in the configuration pane with
the context menu (right-click).

Property Visualization and Debugging 20


Saving a Visualize Script

Saving a Visualize Script

JasperGold Apps generates a Visualize script for you to check whether a trace can be
computed when the properties change.
1. Click File – Save Visualize Configuration.
The Save Visualize Configuration dialog appears.
2. Enter the name of the Visualize script you want to save.
3. Click OK to accept the default options.

Figure 17: Saving a Visualize Script

Property Visualization and Debugging 21


Using QuietTrace

Using QuietTrace

The QuietTrace™ feature decreases the number of signals toggling at the boundary and
in the internal logic that are of no consequence to the behavior being illustrated.
1. In the Visualize window, click the Quiet Trace button.

2. In the Visualize window press F5 or click the Replot button to update the
waveform.

Figure 18: Viewing a QuietTrace

If you compare the QuietTrace to the previous trace (Figure 16), which is also displayed
in the side-by-side view in Figure 18, you can see that sample_transfer_ready and
other signals now have fewer transitions. The trace is less complicated and debugging
the failing condition is easier and faster than before. The Visualize Configuration pane
includes a tree node for Quiet data with figures that show, out of the total number of
soft constraints or preferences that were possible, how many were satisfied and how
many were not satisfied in the final waveform.

Property Visualization and Debugging 22


Checking for Unreachable Conditions

Checking for Unreachable Conditions

JasperGold Apps tries to compute a trace that exhibits the active configuration based on
the environment. Constraints and active configuration can cause the target expression to
become unreachable (no trace of the selected type can be found).

For example, using the last updated trace, add the following configuration:

1. Click the Add Constraint button.


2. For signal req[0] to be always 0, type the following in the dialog: req[0] == 1'b0

Figure 19: Making a Violation Unreachable

3. Click OK.

4. Press F5 or click the Replot button to update the waveform.

Property Visualization and Debugging 23


Exiting JasperGold Apps

JasperGold Apps shows that no violation trace could be found. Indeed, the last
configuration in combination with the configuration that signal gnt[0] cannot be
asserted without signal req[0] being asserted prevents the violation.

Figure 20: Checking for Unreachable Conditions

Exiting JasperGold Apps

In the Command Line pane of the main window, type the following command to exit this
session:

% exit -force

Property Visualization and Debugging 24


Command Summary

Command Summary

The following table lists commands you used in this tutorial with their equivalent Tcl
commands and toolbar buttons.

Table 2: Summary of Commands Used

Operation Menu Button Tcl Command

Analyze design and Design – Analyze RTL % analyze …


property files

Elaborate design Design – Elaborate % elaborate …


hierarchy and extract RTL
embedded properties
Define primary clock Design – Clock % clock …

Define global reset Design – Reset % reset …


expression

Add global Application – Task – % assume …


assumptions Add Property

Visualize property % visualize …

References

JasperGold Apps User’s Guide

JasperGold Apps Command Reference Manual

Formal Expert Online Support System: jasper-da.com/fe

Property Visualization and Debugging 25


Jasper Design Automation, Inc.
707 California Street
Mountain View, CA 94041
Direct: (650) 966-0200
jasper-da.com

You might also like