- •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
Writing Comparescan Rules
stability
stability clockDefinitionName name [options]
The stability command directs Comparescan to perform setup and hold timing checks at the sample points in a clock cycle. The stability command performs the same setup and hold timing checks that the clkcompare command performs, but the stability command does not perform a comparison between two signals. You use a stability check to guarantee that signals do not change within a specific window of time around an event.
Note: The signal that you specify as the clockDefinitionName does not have to be a true clock. It can be any single-bit signal in either the golden or test simulation.
stability Command Examples
The following stability command:
stability clk top.s1 -setup 20ns -hold 10ns
performs the same setup and hold timing checks as this clkcompare command:
clkcompare clk1 top.s1 -setup 20ns -hold 10ns
but the clkcompare command performs a clocked compare between signal top.s1 in the golden file and signal top.s1 in the test file, whereas the stability command does not perform a level comparison at all.
stability Command Options
All of the clkcompare options that are listed in Table 6-8 on page 80 are also available with the stability command.
December 2000 |
84 |
Product Version 1.9 |
Comparescan User Guide
Writing Comparescan Rules
sequencetime
sequencetime [options]
The sequencetime command toggles sequence timing within a comparison. If you turn on sequence timing, Comparescan treats zero-delay events on a signal as regular events.
Therefore, if you use the sequencetime command within an absolute comparison,
Comparescan checks for all events that match.
Note: If you specify the sequencetime rule, there are more events to process and the comparison runs more slowly. The sequencetime command can cause Comparescan to report many unimportant mismatches. These mismatches are caused by event queue order-processing differences.
nosequencetime
nosequencetime [options]
The nosequencetime command directs Comparescan to ignore zero-delay events on a signal. This is the default state.
December 2000 |
85 |
Product Version 1.9 |
Comparescan User Guide
Writing Comparescan Rules
statemapping
statemapping stateMapName \
testState1 testState2 [testStateN] \
goldenState1:1 |
{1|0} |
[{1|0}] \ |
goldenState2:{1|0} |
1 |
[{1|0}] \ |
[goldenStateN:{1|0} |
{1|0} |
1] |
The statemapping command defines a mapping between signal states. You use this command to define the method by which Comparescan matches states. If you use this command, you must also use the -statemapping option to the compare command.
By default, no state mapping is used. Values must match exactly, but strength is ignored. For information on how to force Comparescan to consider strengths, see the options
-checkstrength and -ignorestrength, described in Table 6-2 on page 61.
statemapping Command Syntax
The syntax of the statemapping command forms a table that defines which pairs of values match. A 1 in the table body tells Comparescan to treat these two values as a match; a 0 in the table body tells Comparescan to treat these two values as a mismatch.
Each state map probably has at least one 1 in each row, since you probably want to define state1 to match state1, state2 to match state2, and so forth.
It is an error to redefine a state map, so it is an error to use the same stateMapName with more than one statemapping command in one Comparescan comparison.
statemapping Command Examples
In the following example, 0 matches 0 but no other states, 1 matches 1 but no other states, x matches only another x, and z matches only another z:
statemapping Default \
01xz \
0:1000 \
1:0100 \
x:0010 \
z:0001
December 2000 |
86 |
Product Version 1.9 |
Comparescan User Guide
Writing Comparescan Rules
The following three state maps are similar. In GoldXMatches01, an x state in the golden signal matches both 0 and 1 states in the test signal.
statemapping GoldXMatches01 \
01xz \
0:1000 \
1:0100 \
x:1110 \
z:0001
In GoldXMatchesAll, an x state in the golden signal matches any state in the test signal.
statemapping GoldXMatchesAll \
01xz \
0:1000 \
1:0100 \
x:1111 \
z:0001
In AllXsMatch, an x state in the golden signal matches any state in the test signal, and an x state in the test signal matches any state in the golden signal.
statemapping AllXsMatch \
01xz \
0:1010 \
1:0110 \
x:1111 \
z:0011
statemapping Example in a Rules File
A chip design that you want to use in a comparison contains a signal named net12. You have generated a golden RTL simulation output and a test gate-level simulation output. The problem is that in the RTL simulation, net12 is sometimes X, and in the gate-level simulation, net12 is always 1 or 0.
To allow an X value in the golden simulation to match a 1 or a 0 in the test simulation, use the statemapping command in your rules file, as follows:
datafile1 rtl-golden.trn
datafile2 gate-test.trn
statemapping goldenXok \
01xz \
0:1000 \
1:0100 \
December 2000 |
87 |
Product Version 1.9 |
Comparescan User Guide
Writing Comparescan Rules
x:1110 \
z:0001
compare top.net12 -statemapping goldenXok
compare top.n_weak -checkstrength
December 2000 |
88 |
Product Version 1.9 |