The Force Constant option lets you fix a signal to a constant value, overriding the assignments made within the HDL code or another previously applied constant or clock force.
Force Constant and Force Clock are options in the Objects or wave window right-click menu (as shown in the following figure) or in the text editor (source code).
The Force options are disabled for the objects for which the Vivado simulator does not support forcing. The type of object or limitations in the Vivado simulator's modeling for those objects might be the cause for not supporting such objects.
add_force
Tcl
command (for example, add_force myObj 0
) to view
the reason why the options are disabled.When you select the Force Constant option, the Force Constant dialog box opens so you can enter the relevant values, as shown in the following figure.
The following are Force Constant option descriptions:
- Signal name: Displays the default signal name, that is, the full path name of the selected object.
- Value radix: Displays the current radix setting of the selected signal. You can choose one of the supported radix types: Binary, Hexadecimal, Unsigned Decimal, Signed Decimal, Signed Magnitude, Octal, and ASCII. The GUI then disallows entry of the values based on the Radix setting. For example, if you choose Binary, no numerical values other than 0 and 1 are allowed.
- Force value: Specifies a force constant value using the defined radix value. (For more information about radixes, see Changing the Default Radix and Using Analog Waveforms.)
- Starting after time offset: Starts after the specified time. The default starting time is zero. 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 (ns).
-
Cancel after time offset:
Cancels after the specified time. Time can be a string such as 10 or 10 ns. If
you enter a number without a unit, the default simulation time unit is used.
Tcl command:
add_force /testbench/TENSOUT 1 200 -cancel_after 500