Description, Example – Altera Quartus II Scripting User Manual

Page 477

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–347

simulator

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

Description

Compare two simulation waveform vectors or two waveform files.

Notes:

The "-file" and "-expected" options are optional for waveform comparisons performed in Quartus II
simulation. For comparisons performed outside of the simulation flow, these 2 options are required.

Waveform comparisons are performed from 0ns to file end time in the expected waveform if neither
the "-begin" or "-end" option is specified.

To determine comparison scope, either the "-signals" or the "-all_signals" option must be specified. If
both options are specified, the "-signals" option has higher precedence than the "-all_signals" option.

Examples 1 - 15 illustrate different ways of manipulating the compare_vector command. Refer to
example 16 to see how this command is used in the simulation flow.

Example

Example 1

---------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf
# from 10ns to 50ns. Any mismatches found beyond the time frame are ignored.
# All signals are compared.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf -begin \
10ns -end 50ns -all_signals on

Example 2

---------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Only signal "dir" and "ticket" are compared. Mismatches of signal "dir"
# which come within 0.02ns earlier or later than the expected results are
# ignored.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf -signals \
{dir, ON, 0.02ns} {ticket, ON}

Example 3

---------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Signal settings for both parent and child exist, but parent settings
# are honored. Only "dir" and its children are compared. Mismatches
# of signal "dir" and its children signals which come within 0.01ns
# earlier/later than the expected results are ignored.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf -signals \
{dir[1], ON, 0.02ns} {dir, ON, 0.01ns}

Example 4

---------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# All signals will be compared. Comparison stops when 50 mismatches are
# identified and reported.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-max_mismatches 50 -all_signals on

Example 5

---------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# All signals are compared. Any mismatches which come <=0.02ns earlier/
# later than the expected results are ignored.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-default_tolerance 0.02ns -all_signals on

Advertising