Create a clock object
Syntax
create_clock ‑period <arg> [‑name <arg>] [‑waveform <args>] [‑add] [‑quiet]
[‑verbose] [<objects>]
Returns
new clock object
Usage
Name | Description |
---|---|
-period
|
Clock period: Value > 0 |
[-name]
|
Clock name |
[-waveform]
|
Clock edge specification |
[-add]
|
Add to the existing clock in source_objects |
[-quiet]
|
Ignore command errors |
[-verbose]
|
Suspend message limits during command execution |
[<objects>]
|
List of clock source ports, pins or nets |
Description
Create a clock object with the specified period or waveform defined in nanoseconds (ns). This command defines primary clocks which are used by the timing engine as the delay propagation starting point of any clock edge. The defined clock can be added to the definition of an existing clock, or overwrite the existing clock.
A virtual clock can be created that has no source in the design. A virtual clock can be used as a time reference for setting input and output delays but does not physically exist in the design.
A clock can also be generated from an existing physical clock, and derive many of its properties from the master clock. Use the create_generated_clock
command to derive a clock from an existing physical clock.
create_clock
to create a generated clock, instead of create_generated_clock
, the created clock does not inherit any of the properties of its source clock. The insertion delay and jitter of the parent clock will not be propagated to the generated clock, causing incorrect timing calculations.The create_clock
command returns the name of the clock object that is created.
Arguments
-period
<arg> - (Required) Specifies the clock period of the clock object to be created. The value is specified as nanoseconds (ns) and must be greater than zero (>0).
-name
<arg> - (Optional) The name of the clock object to be created. If the name is omitted, a system-generated name will be used based on the specified source <objects>. You can also use the -name
option without source <objects> to create a virtual clock for the design that is not associated with a physical source on the design.
-waveform
<arg1 arg2 ...> - (Optional) The rising and falling edge times of the waveform of the defined clock, in nanoseconds, over one full clock cycle. You can use multiple rising and falling edges to define the characteristics of the waverform, but there must be an even number of edges, representing both the rising and falling edges of the waveform. The first time specified (arg1
) represents the time of the first rising transition, and the second time specified (arg2
) is the falling edge. If the value for the falling edge is smaller than the value for the rising edge, it means that the falling edge occurs before the rising edge.
-period/2
).
-add
- (Optional) Define multiple clocks on the same source for simultaneous analysis with different clock waveforms. Use -name
to specify the new clock to add. If you do not specify this option, the create_clock
command will overwrite any existing clock of the same name.
-quiet
- (Optional) Execute the command quietly, returning no messages from the command. The command also returns TCL_OK regardless of any errors encountered during execution.
-verbose
- (Optional) Temporarily override any message limits and return all messages from this command.
set_msg_config
command.-add
option. If no <objects> are specified to attach the clock object to, the clock will be created as a virtual clock in the design.
Examples
create_clock -name bftClk -period 5.000 [get_ports bftClk]
get_ports
command defining the objects is left off of this example, a virtual clock is created in the design rather than a physical clock.create_clock -name clk -period 10.000 -waveform {2.4 7.4} [get_ports bftClk]
create_clock -name virtual_clock -period 5.000
create_clock -name clk -period 10.000 -waveform {7 2} [get_ports bftClk]
-waveform
definition, although it is specified as arg2
, it occurs first in the waveform.