beautypg.com

Create_simulation_breakpoint, Usage, Options – Altera Quartus II Scripting User Manual

Page 481: Description, Example, Create_simulation_breakpoint –351

background image

Chapter 3: Tcl Packages & Commands

3–351

simulator

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

create_simulation_breakpoint

Usage

create_simulation_breakpoint -action
-breakpoint -equation [-user_message ]

Options

-action : Action to be done at the breakpoint

-breakpoint : Name of the breakpoint to be created

-equation : Equation used to trigger the breakpoint

-user_message : Optional user-customized message to be displayed when
breakpoint is triggered

Description

Creates a breakpoint with the specified equation and action.

Example

project_open one_wire

initialize_simulation

# Create breakpoint bp1 which gives warning when it reaches 10ns
create_simulation_breakpoint -breakpoint bp1 equation "TIME_EQ(10ns)" \
-action "GIVE_WARNING"

# Create breakpoint bp2 which gives info when in_br has 0 in value
create_simulation_breakpoint -breakpoint bp2 -equation \
"EQUAL_TO(HPATH(|one_wire|in_br),BUS(0)))" -action "GIVE_INFO"

# Create breakpoint bp3 which gives error when value of in_br and out_br
# is 1
create_simulation_breakpoint -breakpoint bp3 -equation \
"EQUAL_TO(HPATH(|one_wire|out_br),BUS(1)),EQUAL_TO(HPATH(|one_wire|in_br), \
BUS(1))" -action "GIVE_ERROR"

# Before running simulation, disable bp2
# Therefore it shouldn't break at time=0ns when in_br=0
disable_simulation_breakpoint -breakpoint bp2

# When running simulation for the first 50ns,
# expect to see bp1 breaks at time=10ns
run_simulation -time 50ns

delete_simulation_breakpoint -breakpoint bp1

enable_simulation_breakpoint -breakpoint bp2

# Since bp2 is enabled, expect to see bp2 breaks at time=100ns
# when in_br becomes 0 again
run_simulation -time 60ns

# Run simulation until the end of completion
run_simulation

project_close