DAI Comparescan User's Guide
Application Examples


Next Prev Top Contents Index Home Page Send Feedback

Simple Examples
Absolute Compare Examples
Comparing a signal from two different files
Comparing two signals from the same file
Clock Compare Examples
Using one clock to compare two signals from different files
Using one clock to compare two signals from the same file
Using two clocks to compare two signals from different files
Using two clocks to compare two signals from the same file
Stability Check Examples
Checking setup only
Checking hold only
Checking setup and hold
Hierarchical Variations
Comparing signals at different levels in the hierarchy
Comparing modules at different levels in the hierarchy
Comparing all internal signals at the top level only
Comparing all internal signals down three levels
Comparing all module ports at the top level only
Comparing all module ports at the top two levels
Design Examples
More Examples
Comment Styles
Continuing long lines.
Specifying both a golden and a test file
Specifying a shift for the unnamed golden file.
Specifying start and end times for golden and test files.
Specifying file names using UNIX filename syntax.
Specifying files for compare.
Options can be specified in any order.
Specfiying start and end times for comparison.
Shifting events.
Skipping ranges of time. (NOT YET IMPLEMENTED)
Specifying compare command tolerance windows.
Simple compare commands.
More complex compare commands.
Using when constructs.
Clock definitions.
Specifying files for clock compare.
A clock compare.
Stability checks.


Application Examples

Simple Examples


Absolute Compare Examples


Comparing a signal from two different files

datafile1 golden.sst

datafile2 test.sst

compare top.adder.i0.reg1.sum

Comparing two signals from the same file

datafile1 sim.sst

compare top.adder.i0.reg1.sum top.adder.i1.reg2.sum

Clock Compare Examples


Using one clock to compare two signals from different files

datafile1 golden.sst

datafile2 test.sst

clkcompare top.clk top.sig1

Using one clock to compare two signals from the same file

datafile1 test.sst

clkcompare top.clk top.sig1 top.sig2

Using two clocks to compare two signals from different files

datafile1 golden.sst

datafile2 test.sst

clkcompare top.clk top.sig1

Using two clocks to compare two signals from the same file

datafile1 test.sst

clkcompare top.clk1 top.sig1 top.clk2 top.sig2

Stability Check Examples


Checking setup only

datafile1 golden.sst

stability top.clk top.sig1 -setup 20ns

Checking hold only

datafile1 golden.sst

stability top.clk top.sig1 -hold 10ns

Checking setup and hold

datafile1 golden.sst

stability top.clk top.sig1 -setup 20ns -hold 10ns

Hierarchical Variations


Comparing signals at different levels in the hierarchy

datafile1 golden.sst

datafile2 test.sst

compare top.sig1 top.module1.sig1

Comparing modules at different levels in the hierarchy

datafile1 golden.sst

datafile2 test.sst

compare top.adder1 top.module1.adder1

Comparing all internal signals at the top level only

datafile1 golden.sst

datafile2 test.sst

compare . -internal -depth 1

Comparing all internal signals down three levels

datafile1 golden.sst

datafile2 test.sst

compare . -internal -depth 3

Comparing all module ports at the top level only

datafile1 golden.sst

datafile2 test.sst

compare . -boundary -depth 1

Comparing all module ports at the top two levels

datafile1 golden.sst

datafile2 test.sst

compare . -boundary -depth 2

Design Examples


Simple three-in-a-row counter.

More Examples


Comment Styles

# Comment to end of line

// Comment to end of line

Continuing long lines.

datafile1 file1

compare top.module1.module2.module2.signalA \

top.module1.module4.module25.signalZ

//

// Long lines can be continued by using a

// backslash at the end of the line.

Specifying both a golden and a test file

datafile1 file1.sst

datafile2 file2.sst

Specifying a shift for the unnamed golden file.

datafile1 -shift 10

// No input file specified, but when

// it is specified, shift it

// by 10 time units.

// The golden file will need to be specified

// on the command line, or in the options menu.

Specifying start and end times for golden and test files.

datafile1 file1.sst -start 300 -end 2000

datafile2 file2.sst -start 200 -end 1000

// Compare file1.sst and file2.sst,

// starting at 300, and ending at 1000.

// The end time for comparison is

// the minimum end time specified.

// The start time for comparison is

// the maximum start time specified.

Specifying file names using UNIX filename syntax.

datafile1 ../../file1.sst -start 200 -end 2000

datafile1 /tmp/file2.sst -start 200 -end 2000

datafile1 ~/sim/file2.sst -start 200 -end 2000

datafile1 ~bobh/../sim/file2.sst -start 200 \

-end 2000

// File names can be specified in the rules file,

// from the command line or from the GUI.

// The unix "../.." constructs and ~ filename

// specifications are supported.

// An error is generated if a file name is not

// specified either in the rules file, on the

// command line or in the GUI.

// datafile1 and datafile2 "commands"

// are optional.

// If they are ommitted, or if the file

// name is ommitted,

// it must be supplied on the command line,

// or in the graphics window.

Specifying files for compare.

// The following four lines are equivalent.

compare signalA signalB

compare 1::signalA 2::signalB

compare signalA 2::signalB

compare 1::signalA signalB

Options can be specified in any order.

datafile1 -start 200 -end 2000

datafile1 -end 2000 -start 200

// Order of the options does not matter.

Specfiying start and end times for comparison.

compare signalA signalB -start 100000

// Compare signalA to signalB, but don't start

// the compare until after time=100000.

//

// Parameters specified in a compare command

// override the datafile1 or datafile2

// specifications.

compare signalA signalB -end 1000

// Compare signalA to signalB.

// End compare when time=1000.

Shifting events.

datafile2 -start 500 -end 5000 -shift -40

// File 2 will be shifted -40 time units

// relative to File 1 for all comparisons.

Skipping ranges of time. (NOT YET IMPLEMENTED)

datafile1 -start 200 -end 2000 -skiptime 500 1000

datafile2 -start 500 -end 5000

// Skiptime causes all errors in the skipped

// time period to be ignored. It does not

// cause elimination of this time from the

// simulation.

// Multiple skiptime statements may be

// specified on either or both files.

// The skiptimes are "OR'ed" together to create

// the total skiptime space.

Specifying compare command tolerance windows.

datafile2 -tol 10

// Both the negative and positive

// tolerances are 10.

// "tol" is a short-cut for specifying

// both pos and neg.

datafile2 -pos 10 -neg 20

// The tolerance is the window where a signal

// compare can be equal.

// -neg specifies time before the

// golden event, and

// -pos specifies time after the golden event.

Simple compare commands.

datafile1 file1

datafile2 file2

compare signalA

// Compares signalA in file1 and file2 for

// an exact match.

// Generates an error if no signalA in file1

// or file2. (signalA must exist in both files.)

// Generates an error if no file1 or file2.

// (file1 and file2 must exist.)

compare signalB

// Compares signalB in file1 and file2 for a

// match with a window of 0 time units.

compare signalC -pos 5

// Compares signalC in file1 and file2 for

// a match with a window of 5 time units

// after the golden signal.

compare signalD -pos 10

// Compares signalD in file1 and file2 for

// a match with a window of 10 time units

// after the golden signal.

More complex compare commands.

compare signalE signalF -pos 5 -neg 10

// Compares signalE from file1 with

// signalF from file2.

//

// Tricky:

// If file2 does not exist and if signalE and

// signalF are not the same, then compare

// signalE from file1 with

// signalF from file1.

//

// Uses a tolerance window of [-10, 5]

//

Using when constructs.

compare signalA signalB when "data[23:32] == 1"

// Compare signalA to signalB only when expression

// is true in file1.

// All "when" evaluations are performed in file1.

compare signalC signalD when \

"(data[23:32] == addr[23:32]) && !reset && (cnt > 10)"

Clock definitions.

clkdef c1 top.clockgen.clk1 -setup 100

clkdef c2 top.clockgen.clk1 -setup 200

// Define two "symbolic" clocks ("c1" and "c2")

// to be used in a later clkcompare statement.

// These two clocks are based on the same signal

// from simulation but have different setup times.

clkdef c3 1::top.clockgen.clk3

// Define a clock named c3 from file1.

clkdef c4 2::top.clockgen.clk3

// Define a clock named c4 from file2.

clkdef c4 2::top.clockgen.clk3 -posedge

clkdef c4 2::top.clockgen.clk3 -negedge

clkdef c4 2::top.clockgen.clk3 -bothedge

// A clock comparison can trigger on the

// positive edge, negativeedge or both

// edges of the simulated clock.

clkdef c5 top.clockgen.clk4 -setup 100 \

-hold 120 -shift 400 -posedge \

when "data[0:7] == 8'xaa"

// Define a clock named "c5", with lots of

// parameters:

// setup=100

// hold=120

// shift=400

// edge=posedge

// ignore errors unless data[0:7] == 0xAA

Specifying files for clock compare.

// The following four lines are equivalent.

clkcompare c1 signalA c2 signalB

clkcompare c1 1::signalA c2 signalB

clkcompare c1 signalA c2 2::signalB

clkcompare c1 1::signalA c2 2::signalB

// The following four lines are equivalent.

clkcompare c1 signalA signalB

clkcompare c1 1::signalA signalB

clkcompare c1 signalA 2::signalB

clkcompare c1 1::signalA 2::signalB

// The following three lines are equivalent.

clkcompare c1 signalA

clkcompare c1 signalA signalA

clkcompare c1 signalA c1 signalA

// The following two lines are equivalent.

clkcompare c1 signalA signalB

clkcompare c1 signalA c1 signalB

A clock compare.

clkcompare c1 signalA signalB \

-setup1 100 \

-hold1 50 \

-setup2 1200 \

-hold2 300

Stability checks.

stability c5 cpu.shifter.z1

// Performs a "stability" check on signal

// cpu.shifter.z1,using the clock defined in c5.

// A Stability check is just a special case

// of a clock compare.

// It checks only setup and hold times; no

// signal sampling or signal compare is performed.

stability c5 cpu.shifter.z2 -setup 10 -hold 20

stability c5 cpu.shifter.z2 -setup 5 -hold 10

stability c5 cpu.shifter.z2 -setup 2 -hold 2



Next Prev Top Contents Index Home Page Send Feedback

DAI Comparescan User's Guide - Generated 26 FEB 1997
©Copyright 1997 Design Acceleration, Inc. All rights reserved