create_clock (::quartus::sdc)

The following table displays information for the create_clock Tcl command:

Tcl Package and Version

Belongs to ::quartus::sdc 1.5

Syntax create_clock [-h | -help] [-long_help] [-add] [-name <clock_name> ] -period <value> [-waveform <edge_list> ]
[ <targets> ]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-add Adds clock to a node with an existing clock
-name <clock_name> Clock name of the created clock
-period <value> Speed of the clock in terms of clock period
-waveform <edge_list> List of edge values
<targets> List or collection of targets
Defines a clock. If the -name option is not used, the clock name is
the same as the first target in the list or collection. The clock name
is used to refer to the clock in other commands.

The -period option specifies the clock period. It is also possible to
use this option to specify a frequency to define the clock period.
This can be done by using -period option followed by either
<frequency>MHz or "<frequency> MHz". However, this is a Timing
Analyzer-only extension and makes the SDC syntax non-standard.

The -waveform option specifies the rising and falling edges (duty
cycle) of the clock, and is specified as a list of two time values:
the first rising edge and the next falling edge. The rising edge must
be within the range [0, period]. The falling edge must be within one
clock period of the rising edge. The waveform defaults to (0,

If a clock with the same name is already assigned to a given target,
the create_clock command will overwrite the existing clock.  If a clock
with a different name exists on the given target, the create_clock
command will be ignored unless the -add option is used.  The -add 
option can be used to assign multiple clocks to a pin or port.

If the target of the clock is internal (i.e. not an input port), the
source latency is zero by default.

If a clock is on a path after another clock, then it blocks or
overwrites the previous clock from that point forward.

The value of the targets is either a collection or a Tcl list of
wildcards used to create a collection of the appropriate type.  The
values used must follow standard Tcl or Timing Analyzer-extension
substitution rules.  See the help for use_timing_analyzer_style_escaping for
Example Usage
# Create a simple 10ns with clock with a 60% duty cycle
create_clock -period 10 -waveform {0 6} -name clk [get_ports clk]

# Create a clock with a falling edge at 2ns, rising edge at 8ns,
# falling at 12ns, etc.
create_clock -period 10 -waveform {8 12} -name clk [get_ports clk]

# Assign two clocks to an input port that are switched externally
create_clock -period 10 -name clk100Mhz [get_ports clk]
create_clock -period 6.667 -name clk150Mhz -add [get_ports clk]

# Two ways to use MHz to define clock period (Timing Analyzer only)
create_clock -period 250MHz -name clk250MHz [get_ports clk]
create_clock -period "250 MHz" -name clk250MHz [get_ports clk]
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Timing netlist does not exist. Use create_timing_netlist to create a timing netlist.