- •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
Application Examples
Making Absolute Comparisons
This section contains example code for rules that use the compare command. See “compare” on page 67 for more information about this command.
The following rule compares signalA in golden.trn with signalA in test.trn for an exact match (a match within a window of 0 time units). Comparescan reports an error if golden.trn or test.trn does not exist or if signalA does not exist in both databases.
datafile1 golden.trn
datafile2 test.trn
compare signalA
The following rule compares signalB in golden.trn with signalB in test.trn for a match within a window of 5 time units after the golden signal.
compare signalB -pos 5
The following rule compares signalC in golden.trn with signalC in test.trn for a match within a window of 10 time units before the golden signal.
compare signalC -neg 10
The following rule compares signalD in golden.trn with signalE in test.trn for a match within a tolerance window of [-10,5]. Comparescan reports an error if signalD and signalE are not the same in both databases.
compare signalD signalE -pos 5 -neg 10
Specifying the Filename of an Object
For a description of the :: notation used in this example, see “Variable and Module Naming in Different Files” on page 70. The notation 1:: refers to datafile1, and 2:: refers to datafile2.
// The following rules are equivalent:
compare signalA signalB
compare 1::signalA 2::signalB
compare |
signalA |
2::signalB |
compare |
1::signalA |
signalB |
// The following rules are legal but not equivalent: compare 1::signalA 1::signalB
compare 2::signalA 2::signalB compare 2::signalA 1::signalB
See “Specifying Filenames Using UNIX Filename Syntax” on page 53 for more information on specifying filenames in rules files.
December 2000 |
47 |
Product Version 1.9 |
Comparescan User Guide
Application Examples
Comparing Two Objects from the Same File
//Compares signalA with signalB in test.trn: datafile1 test.trn
compare signalA signalB
//Compares signalA with signalB in test.trn: datafile1 golden.trn
datafile2 test.trn
compare 2::signalA 2::signalB
Comparing Two Objects on a Condition
The following rules compare signalA in datafile1 with signalB in datafile2 only at times when the condition inside the quotation marks is true in datafile1. All when evaluations are performed in datafile1.
compare signalA signalB when "data[23:32] == 1"
compare signalA signalB when \
"(data[23:32] == addr[23:32]) && !reset && (cnt > 10)"
For more information on the when statement, see “Using when Statements with Verilog or VHDL Expressions” on page 75.
Creating Clock Definitions
This section contains example code for rules that use the clkdef command. See “clkdef” on page 77 for more information on this command.
The following rule defines two symbolic clocks, c1 and c2, to be used in a later clkcompare statement. These two clocks are based on the same signal from the simulation, but have different setup times.
clkdef c1 top.clockgen.clk1 -setup 100
clkdef c2 top.clockgen.clk1 -setup 200
The following rule defines a clock named c3 from datafile1.
clkdef c3 1::top.clockgen.clk3
The following rule defines a clock named c4 from datafile2.
clkdef c4 2::top.clockgen.clk3
In the following rules, a clock comparison triggers on the positive edge of the symbolic clock c5, on the negative edge of c6, and on both edges of c7.
December 2000 |
48 |
Product Version 1.9 |