- •Contents
- •Introducing Comparescan
- •Features
- •Applications
- •Organization of this Guide
- •Getting Started
- •Starting Comparescan
- •Specifying Input Files
- •Specifying Simulation Results Databases for Comparison
- •Specifying a Comparescan Rules File
- •Specifying a Comparescan Error Database for Viewing
- •Using Automatically Generated Files
- •Using the State File
- •Using the Preferences File
- •Using X Resources
- •Understanding Comparescan Exit Status Codes
- •Comparescan Tutorial
- •Accessing the Tutorial Source Files
- •Simulation Results Databases
- •Comparescan Rules Files
- •Generating a Comparescan Error Database
- •Viewing a Comparescan Error Database
- •Viewing Errors in Hierarchical Order
- •Viewing Errors in Signalscan Waves
- •Viewing Multiple Objects in Signalscan Waves
- •Viewing Errors in Time Order
- •Exiting Comparescan
- •Giving More Information in the Rules File
- •Reviewing the demo.rules Rules File
- •Using the demo.rules Rules File
- •Viewing Clocked Miscompares in Signalscan Waves
- •Comparescan Graphical User Interface
- •Comparescan Window
- •Menu Bar
- •File Menu
- •Tools Menu
- •View Menu
- •Window Menu
- •Button Bar
- •Application Examples
- •Making Absolute Comparisons
- •Specifying the Filename of an Object
- •Comparing Two Objects from the Same File
- •Comparing Two Objects on a Condition
- •Making Clocked Comparisons
- •Using One Clock and Two Simulation Files
- •Using One Clock and One Simulation File
- •Using Two Clocks and Two Simulation Files
- •Using Two Clocks and One Simulation File
- •Performing a Clock Compare with Timing Checks
- •Checking Stability
- •Specifying Objects in the Design Hierarchy
- •Command Option Examples
- •Specifying Start and End Times for Golden and Test Files
- •Specifying Start and End Times for Comparison
- •Specifying a Time Shift
- •Specifying compare Command Tolerance Windows
- •Special Syntax Examples
- •Commenting
- •Continuing Long Lines
- •Specifying Both a Golden and a Test File
- •Specifying Filenames Using UNIX Filename Syntax
- •Writing Comparescan Rules
- •Default Comparison Rules
- •Absolute and Clocked Comparisons
- •Rules File Parsing and Execution
- •Command Syntax and Options
- •General Command Syntax
- •Command Summary
- •General Command Options
- •datafile1
- •datafile2
- •compare
- •clkdef
- •clkcompare
- •stability
- •sequencetime
- •nosequencetime
- •statemapping
- •threshold
- •report
- •savedata
- •loaddata
- •translate
- •Frequently Asked Questions
- •Comparescan Input
- •Comparescan Output
- •How do I view a comparison report that I have generated?
- •Can I print a report of my errors?
- •Can I run the tool in batch mode?
- •Graphical User Interface (GUI)
- •How do I run the program without the user interface?
- •Why can’t Comparescan allocate colors?
- •How do I change the colors in the GUI?
- •Why can’t I read the text in the GUI?
- •Comparescan Features
- •How can I compare a digital simulation with an analog simulation?
- •How do I match an X value?
- •How do I compare only the top-level signals in my design?
- •How do I compare modules at different levels in the hierarchy?
- •What if I want a different tolerance window for every signal?
- •Comparescan Error Messages
- •What does “Out of Memory” mean?
- •What does “fork failed” mean?
- •Index
Comparescan User Guide
Comparescan Tutorial
Exiting Comparescan
When you are finished with this part of the tutorial, exit Comparescan.
To exit Comparescan, perform the following steps:
1.Choose File—Exit.
2.Click OK when prompted.
Giving More Information in the Rules File
In the previous example, there was only one global compare rule in the rules file. The command that you used to generate the Comparescan error database from the operating system command line was long.
This section shows you how to create a rules file that specifies the two simulation results databases for the comparison, the name of the text error report, and the name of the binary
Comparescan error database. The rules file also specifies compare rules that are particular to the two simulation results databases that are being compared.
Reviewing the demo.rules Rules File
Look at the contents of the file demo.rules in the tools/simvisdai/examples/ directory. The contents of this file are listed below:
datafile1 golden.trn datafile2 test.trn report -r2 demo.rpt savedata demo.csd
compare top.golden top.s1 -shift 200 -pos 7 -neg 3
compare top.golden top.s2 -start 500 -tol 50 clkdef clk1 top.c2
clkcompare clk1 top.golden top.s3
clkcompare clk1 top.golden top.s4 -posedge -tol 3 stability clk1 top.goodBus
clkdef clk3 top.c3 -setup 20 -hold 20 clkcompare clk3 top.bus1 top.golden stability clk3 top.bus1
December 2000 |
31 |
Product Version 1.9 |
Comparescan User Guide
Comparescan Tutorial
clkcompare clk1 2::top.goodBus clk3 2::top.bus1 -tol 3 \ when "(2::top.bus1 | 3’b001) || (2::top.goodBus==2)"
// clock compare for entire module clkdef clk4 top.clk2
clkcompare clk4 hello.d1 -internal -depth 3
The first four lines of this file specify the names of the golden database file, the secondary database file, the text report file, and the Comparescan database file. The remaining commands in the file are compare commands.
For a complete list of the commands and options that you can use in your rules files, see Chapter 6, “Writing Comparescan Rules.”
Using the demo.rules Rules File
Because the demo.rules file already specifies the input and output files, you can greatly shorten your command to invoke Comparescan. Enter the following at the operating system command prompt:
comparescan -run demo.rules
The Comparescan GUI starts up. If you did not specify the -run option as shown above, then you must click Run in the Comparescan window.
Click on top, and click on golden. Your Comparescan window resembles Figure 3-10 on page 33.
December 2000 |
32 |
Product Version 1.9 |
Comparescan User Guide
Comparescan Tutorial
Figure 3-10 Comparescan Window Showing demo.csd
The compare mismatch errors are displayed the same way that they were in the previous example, except for the object names. By default, each object in the golden database is compared with its counterpart in the secondary database.
In the previous example, the first object that was listed in an error message was from the golden database, and the second object was from the secondary database, as shown in
Figure 3-2 on page 22.
December 2000 |
33 |
Product Version 1.9 |
Comparescan User Guide
Comparescan Tutorial
In this example, the demo.rules file sometimes uses the 2:: syntax to compare two objects from the same database. In Figure 3-10 on page 33, for example, bus1 is from the golden database, but bus1[0:2] exists only in the secondary database.
Viewing Clocked Miscompares in Signalscan Waves
You can use Signalscan Waves to view the clocked miscompares in this comparison, as follows:
1.Double-click on the first error that is listed under golden to open Signalscan Waves.
2.In the Signalscan Waves Waveform window, click on the title Groups at the top of the Multi-List pane, and choose Markers.
3.In the Comparescan window, click Next nine times to display all of the errors that are listed under golden in Signalscan Waves. Your Signalscan Waves Waveform window resembles Figure 3-11 on page 34.
Notice that a new marker is created automatically for each clocked compare mismatch.
Figure 3-11 Clock Miscompares Marked in Signalscan Waves
December 2000 |
34 |
Product Version 1.9 |
Comparescan User Guide
Comparescan Tutorial
4.In the Markers list, click on Mismatch3. Your Signalscan Waves Waveform window resembles Figure 3-12 on page 35.
The Markers list is a convenient way to navigate to any of your clocked compare mismatches.
Figure 3-12 Navigating Among Clocked Compare Mismatches
5.When you are finished with this example in the tutorial, exit Signalscan Waves and
Comparescan by choosing File—Exit in each window.
December 2000 |
35 |
Product Version 1.9 |