Altera Quartus II Scripting User Manual

Page 479

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–349

simulator

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

Example 12

----------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Signal "ticket" are compared with tolerance settings as 0.01ns.
# Signal "dir" will be compared using the default tolerance value
# that is only available during execution of the comparison process.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-all_signals off -signals {ticket; ON; 0.01ns} {dir; ON; <<default>>}

Example 13

----------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Signal "ticket" is compared with tolerance settings as 0.01ns.
# Signal "dir" is compared using the default tolerance value that is
# only available during execution of the comparison process.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-all_signals off -signals {ticket; ON; 0.01ns} {dir; ON; ; OFF}

Example 14

----------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Default compare tolerance of 0.02ns applies to signal "dir".
# Signal "ticket" is compared with tolerance settings as 0.01ns.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-default_tolerance 0.02ns -all_signals off -signals {ticket; ON; 0.01ns} \
{dir; ON; ; OFF}

Example 15

----------
# Compare db/chiptrip.sim.vwf against expected results in chiptrip.vwf.
# Change comparison rule for signal value 1 - match 1 in expected results
# with values 1 and DC in compared vector file.
# Signal "ticket" is compared with tolerance settings as 0.01ns.
compare_vector -file db/chiptrip.sim.vwf -expected chiptrip.vwf \
-all_signals off -signals {ticket; ON; 0.01ns} -compare_rule_value_1 {1, \
DC}

# Specify waveform compare settings in simulation flow

Example 16

----------
project open chiptrip

# Initialize simulator and turn on check_outputs option
initialize_simulation -check_outputs on

# Compare simulation results against source vector, from 20ns to 80ns.
# Only signal "clock" and "ticket" are involved in comparison
compare_vector -begin 20ns -end 80ns -signals {clock; ON} {ticket; ON}

# Run simulation and waveform comparison will be performed upon
# simulation completion
run_simulation

Advertising