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

Page 501: Description, Example, Set_simulation_clock –371

Advertising
background image

Chapter 3: Tcl Packages & Commands

3–371

simulator

© July 2013

Altera Corporation

Quartus II Scripting Reference Manual

set_simulation_clock

Usage

set_simulation_clock -clock <clock_name> [-duty_cycle <duty_cycle>] [-offset <offset>]
-period <period in ns>

Options

-clock <clock_name>: Name of the clock signal

-duty_cycle <duty_cycle>: Duty cycle of the clock signal

-offset <offset>: Offset of the clock signal

-period <period in ns>: Period of the clock signal in nanoseconds

Description

Creates a continuous clock signal in the Simulator.

The default value for the duty cycle of the clock signal is 50 and for the offset is zero nanoseconds.

Example

project_open lelut

initialize_simulation -ignore_vector_file on -end_time 100ns

# Group "inDataa inDatab inDatac inDatad" under the name "input_bus"
group_simulation_signal -name input_bus {inDataa inDatab inDatac inDatad}

# Create continuous clock signal named "clk0" with duty_cycle = 50
# and offset = 25ns
set_simulation_clock -clock clk0 -period 10ns -duty_cycle 50 -offset 25

# Set value "1011" for the group of signals
force_simulation_value -node input_bus 1011

# Set value 0 for node "clk1"
force_simulation_value -node clk1 0

run_simulation -time 20ns

# Set value 1 for node "clk1"
force_simulation_value -node clk1 1

run_simulation

project_close

Advertising