# Force Clock - 2022.2 English

## Vivado Design Suite User Guide: Logic Simulation (UG900)

Document ID
UG900
Release Date
2022-10-19
Version
2022.2 English

The Force Clock command lets you assign a signal a value that toggles at a specified rate between two states, in the manner of a clock signal, for a specified length of time. When you select the Force Clock option in the Objects window menu, the Force Clock dialog box opens, as shown in the following figure.

Figure 1. Force Clock Dialog Box

The options in the Force Clock dialog box are shown below.

• Signal name: Displays the default signal name; the full path name of the item selected in the Objects window or waveform.
Tip: The Force Clock command can be applied to any signal (not just clock signals) to define an oscillating value.
• Value radix: Displays the current radix setting of the selected signal. Select one of the displayed radix types from the drop-down menu: Binary, Hexadecimal, Unsigned Decimal, Signed Decimal, Signed Magnitude, Octal, or ASCII.
• Leading edge value: Specifies the first edge of the clock pattern. The leading edge value uses the radix defined in Value radix field.
• Trailing edge value: Specifies the second edge of the clock pattern. The trailing edge value uses the radix defined in the Value radix field.
• Starting after time offset: Starts the force command after the specified time from the current simulation. The default starting time is 0. Time can be a string, such as 10 or 10 ns. If you enter a number without a unit, the Vivado simulator uses the default user unit.
• Cancel after time offset: Cancels the force command after the specified time from the current simulation time. Time can be a string, such as 10 or 10 ns. When you enter a number without a unit, the Vivado simulator uses the default simulation time unit.
• Duty cycle (%): Specifies the percentage of time that the clock pulse is in an active state. The acceptable value is a range from 0 to 100 (default is 50%).
• Period: Specifies the length of the clock pulse, defined as a time value. Time can be a string, such as 10 or 10 ns.
Note: For more information about radixes, see Changing the Default Radix and Using Analog Waveforms.

Example Tcl command:

``add_force /testbench/TENSOUT -radix bin {0} {1} -repeat_every 10ns -cancel_after 3us``