Technical data

force
ModelSim EE/SE Command Reference ModelSim Commands CR-87
force
The force command allows you to apply stimulus to VHDL signals and Verilog
nets interactively. Since force commands (like all VSIM commands) can be
included in a macro file, it is possible to create complex sequences of stimuli.
Forcing of Virtual signals
(9-145) is supported if the number of bits correspond to
the signal value; forcing of virtual functions is not supported.
Syntax
force
[-freeze | -drive | -deposit] [-cancel <period>] [-repeat <period>]
<item_name> <value> [<time>] [, <value> <time> ...]
Arguments
-freeze
Freezes the item at the specified value until it is forced again or until it is unforced
with a noforce command
(CR-101). Optional.
-drive
Attaches a driver to the item and drives the specified value until the item is forced
again or until it is unforced with a noforce command
(CR-101). Optional.
This option is illegal for unresolved signals.
-deposit
Sets the item to the specified value. The value remains until there is a subsequent
driver transaction, or until the item is forced again, or until it is unforced with a
noforce command
(CR-101). Optional.
If one of the -freeze, -drive, or -deposit options is not used, then -freeze is the
default for unresolved items and -drive is the default for resolved items.
If you prefer -freeze as the default for resolved and unresolved VHDL signals, you
can change the default force kind in the imodelsim.tcl file (see "Preference
variables located in INI and MPF files"
(B-394)), or by using the DefaultForceKind
(B-398).
-cancel <period>
Cancels the force command after the specified <period> of current time units.
Cancellation occurs at the last simulation delta cycle of a time unit. A value of zero
cancels the force at the end of the current time period. Optional.