create_relative_clock (::quartus::project)

The following table displays information for the create_relative_clock Tcl command:

Tcl Package and Version

Belongs to ::quartus::project 2.0

Syntax create_relative_clock [-h | -help] [-long_help] -base_clock <Base clock> [-comment <comment> ] [-disable] [-divide <integer> ] [-duty_cycle <integer> ] [-entity <entity> ] [-invert] [-multiply <integer> ] [-no_target] [-offset <offset> ] [-phase_shift <integer> ] [-target <name> ] [-virtual]
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-base_clock <Base clock> Base clock name
-comment <comment> Comment
-disable Option to disable assignment
-divide <integer> Base clock division factor
-duty_cycle <integer> Duty cycle
-entity <entity> Entity to which to add clock assignment
-invert Option to invert base clock
-multiply <integer> Base clock multiplication factor
-no_target Option to not assign clock to node
-offset <offset> Offset from base clock
-phase_shift <integer> Phase shift from base clock
-target <name> Clock node name
-virtual Option to specify the clock as a virtual clock
<clock_name> Clock name
Creates a relative clock that derived from the absolute clock.

The "-offset" option can take the format:

<floating point time value><time unit>

For example, if the offset is 10.55ns, "10.55" is the
<floating point time value> and "ns" is the <time unit>.

The following table displays possible time units:

Time Unit                 Description
---------                 --------------
s                         second(s)
ms                        millisecond(s)
us                        microsecond(s)
ns                        nanosecond(s)
ps                        picosecond(s)
fs                        femtosecond(s)

The "-phase_shift" option takes an integer that represents
degrees of phase shift from the base clock period. For example, 
if a base clock has a period of 10ns and clk2 is a relative
clock derived from the base clock. A phase shift value of 45
applies a 45 degree phase shift to clk2, producing an offset
of 1.25ns from the base clock. For a given relative clock,
you may specify a phase shift, an offset, or both. If both
are specified, they are additive.

If you specify the "-virtual" option, the relative clock
is not assigned to any node in the timing netlist. You cannot
specify the "-virtual" option and the "-target" option 
at the same time.

For entity-specific assignments, use the "-entity" option to 
force the assignment to specified entity. If you do not specify
the "-entity" option, the value for the FOCUS_ENTITY_NAME 
assignment is used. If the FOCUS_ENTITY_NAME value is not found, 
the revision name is used.

Assignments created or modified by using this Tcl command are 
not saved to the Quartus Prime Settings File (.qsf) unless you
explicitly call one of the following two Tcl commands:

1) export_assignments
2) project_close (unless "-dont_export_assignments" is specified)

These two Tcl commands reside in the ::quartus::project Tcl 
package. You must save assignment changes before you run 
Quartus Prime command-line executables. Note, however, that 
the Tcl commands "execute_flow" and "execute_module" (part 
of the ::quartus::flow Tcl package) automatically call 
"export_assignments" before they run command-line executables.
Example Usage
## Specify a base clock of 10ns
create_base_clock -fmax 10ns clk10

## Specify a relative clock with 2/3 the period
create_relative_clock -base_clock clk10 -multiply 2 -divide 3 clk2_3

## Specify a relative clock with a phase shift of 45 degrees
create_relative_clock -base_clock clk10 -phase_shift 45 clk_45
## or, equivalently, with an offset of 1.25ns
create_relative_clock -base_clock clk10 -offset 1.25ns clk_45

## Specify the entity name to which the clock
## is added, using the -entity option
## This is needed if the top-level entity name is 
## other than that of the project
## The following command generates a "top_level" entity
create_relative_clock -base_clock clk10 -entity top_level -multiply 2 -divide 3 clk2_3
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Can't find active revision name. Make sure there is an open, active revision name.
TCL_ERROR 1 ERROR: Entity does not exist or uses illegal name characters: <string>. Specify a legal entity name.
TCL_ERROR 1 ERROR: Can't run Tcl command while a process is in progress: <string>. To run the command, stop the compilation or simulation; or wait for the compilation or simulation to complete.
TCL_ERROR 1 ERROR: Options are mutually exclusive: <string> and <string>. Specify only one of the two options.
TCL_ERROR 1 ERROR: You must open a project before you can use this command.